<commit_before>require('should');

const Primitive = require('../../build/classes/Primitive');
const List = require('../../build/classes/List');
const Range = require('../../build/classes/Range');

const types = require('../../build/constants/types');

const parser = require('../../build/transpile');

function int(number) {
  return Primitive(types.INTEGER, number);
}

describe('transpilers/list', () => {
  it('should transpile listings', () => {
    parser(List([int(1), int(23), int(12)])).should.be.exactly('[1, 23, 12]');
  });

  it('should transpile ranges', () => {
    parser(List(Range(int(1), int(3000)))).should.be.exactly('$range(1, 3000)');
  });
});<commit_msg>rename parse to transpile<commit_after>require('should');

const Primitive = require('../../build/classes/Primitive');
const List = require('../../build/classes/List');
const Range = require('../../build/classes/Range');

const types = require('../../build/constants/types');

const transpile = require('../../build/transpile');

function int(number) {
  return Primitive(types.INTEGER, number);
}

describe('transpilers/list', () => {
  it('should transpile listings', () => {
    transpile(List([int(1), int(23), int(12)])).should.be.exactly('[1, 23, 12]');
  });

  it('should transpile ranges', () => {
    transpile(List(Range(int(1), int(3000)))).should.be.exactly('$range(1, 3000)');
  });
});
{'fraction_non_alphanumeric': 0.24945612762871647, 'fraction_numerical': 0.029006526468455404, 'mean_word_length': 4.433070866141732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6620384', 'n_tokens_mistral': 480, 'n_tokens_neox': 442, 'n_words': 75}