<commit_before>
/**
 * Module dependencies
 */

var util = require('./util');
var assert = require('assert');

/**
 * Testing data
 */

var fixture = require('./fixture');

/**
 * Create a `Site` instance
 */

describe('wpcom.site.batch', function(){
  it('should require site data', function(done){
    var wpcom = util.wpcom_public();
    var batch = wpcom.batch();
    var site = wpcom.site(fixture.site.url);

    var url_site = '/sites/' + site._id;
    var url_posts = '/sites/' + site._id + '/posts';
    var url_me = '/me';

    batch
    .add(url_site)
    .add(url_posts)
    .add(url_me)
    .run(function(err, data){
      if (err) throw err;

      assert.ok(data);
      assert.ok(data[url_site]);
      assert.ok(data[url_posts]);
      assert.ok(data[url_me]);

      done();
    });
  });
});<commit_msg>test: use token for site.batch test<commit_after>
/**
 * Module dependencies
 */

var util = require('./util');
var assert = require('assert');

/**
 * Testing data
 */

var fixture = require('./fixture');

/**
 * Create a `Site` instance
 */

describe('wpcom.site.batch', function() {
  it('should require site data', function(done) {
    var wpcom = util.wpcom();
    var batch = wpcom.batch();
    var site = wpcom.site(fixture.site.url);

    var url_site = '/sites/' + site._id;
    var url_posts = '/sites/' + site._id + '/posts';
    var url_me = '/me';

    batch
    .add(url_site)
    .add(url_posts)
    .add(url_me)
    .run(function(err, data) {
      if (err) throw err;

      assert.ok(data);
      assert.ok(data[url_site]);
      assert.ok(data[url_posts]);
      assert.ok(data[url_me]);
      done();
    });
  });
});
{'fraction_non_alphanumeric': 0.18806509945750452, 'fraction_numerical': 0.0, 'mean_word_length': 2.6971046770601337, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5260966', 'n_tokens_mistral': 585, 'n_tokens_neox': 569, 'n_words': 127}