<commit_before>'use strict';

var difi = require('../index')
  , assert = require('assert')
  , opts = {
      dataset: 'brreg/enhetsregisteret',
      query: {
        query:'Pythonia'
      }
    };

describe('Difi - formats', function(){

  it('Should have a length of 572 if format is csv', function(done){
    opts.format = 'csv';
    difi(opts, function(err, data){
      assert.equal(data.length, 572);
      done();
    });
  });

  it('Should have a length of 616 if format is json', function(done){
    opts.format = 'json';
    difi(opts, function(err, data){
      assert.equal(data.length, 616);
      done();
    });
  });

  it('Should have a length of 627 if format is jsonp', function(done){
    opts.format = 'jsonp';
    difi(opts, function(err, data){
      assert.equal(data.length, 627);
      done();
    });
  });

  it('Should have a length of 1380 if format is xml', function(done){
    opts.format = 'xml';
    difi(opts, function(err, data){
      assert.equal(data.length, 1380);
      done();
    });
  });

  it('Should have a length of 589 if format is yaml', function(done){
    opts.format = 'yaml';
    difi(opts, function(err, data){
      assert.equal(data.length, 589);
      done();
    });
  });

});<commit_msg>Updates tests<commit_after>'use strict';

var difi = require('../index')
  , assert = require('assert')
  , opts = {
      dataset: 'brreg/enhetsregisteret',
      query: {
        query:'Pythonia'
      }
    };

describe('Difi - formats', function(){

  it('Should have a length of 626 if format is csv', function(done){
    opts.format = 'csv';
    difi(opts, function(err, data){
      assert.equal(data.length, 626);
      done();
    });
  });

  it('Should have a length of 670 if format is json', function(done){
    opts.format = 'json';
    difi(opts, function(err, data){
      assert.equal(data.length, 670);
      done();
    });
  });

  it('Should have a length of 681 if format is jsonp', function(done){
    opts.format = 'jsonp';
    difi(opts, function(err, data){
      assert.equal(data.length, 681);
      done();
    });
  });

  it('Should have a length of 1494 if format is xml', function(done){
    opts.format = 'xml';
    difi(opts, function(err, data){
      assert.equal(data.length, 1494);
      done();
    });
  });

  it('Should have a length of 646 if format is yaml', function(done){
    opts.format = 'yaml';
    difi(opts, function(err, data){
      assert.equal(data.length, 646);
      done();
    });
  });

});
{'fraction_non_alphanumeric': 0.16932907348242812, 'fraction_numerical': 0.025559105431309903, 'mean_word_length': 2.705621301775148, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2929253', 'n_tokens_mistral': 885, 'n_tokens_neox': 822, 'n_words': 221}