<commit_before>

var yaa = require('yaa');
var codec = require('../../../bin/index.js');
var runner = require('../../runner.js');
var testName = 'codec.form.encode';
var cases = [];

var input = {
  'a': [3, 4],
  'b': {
    'e': 5,
    'y': {
      'a&j': 1
    }
  },
  'c': [1, 2, 3]
};
var output = '' +
    'a=' + encodeURIComponent('[3,4]') + '&' +
    'b=' + encodeURIComponent('{\"e\":5,\"y\":{\"a&j\":1}}') + '&' +
    'c=' + encodeURIComponent('[1,2,3]');


console.log(output);
cases.push(yaa.assert.outputDeepEquals(
    yaa.insert(codec.form.encode(input)),
    yaa.insert(output),
    '[codec.form.encode]'
));


module.exports = runner(cases, testName);
<commit_msg>changed version<commit_after>

var yaa = require('yaa');
var codec = require('../../../bin/index.js');
var runner = require('../../runner.js');
var testName = 'codec.form.encode';
var cases = [];

var input = {
  'a': [3, 4],
  'b': {
    'e': 5,
    'y': {
      'a&j': 1
    }
  },
  'c': [1, 2, 3]
};
var output = '' +
    'a=' + encodeURIComponent('[3,4]') + '&' +
    'b=' + encodeURIComponent('{\"e\":5,\"y\":{\"a&j\":1}}') + '&' +
    'c=' + encodeURIComponent('[1,2,3]');


cases.push(yaa.assert.outputDeepEquals(
    yaa.insert(codec.form.encode(input)),
    yaa.insert(output),
    '[codec.form.encode]'
));


module.exports = runner(cases, testName);

{'fraction_non_alphanumeric': 0.27848101265822783, 'fraction_numerical': 0.02084884586746091, 'mean_word_length': 3.0481927710843375, 'pattern_counts': {'":': 6, '<': 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': '2612594', 'n_tokens_mistral': 559, 'n_tokens_neox': 554, 'n_words': 92}