<commit_before>const {assert} = require('chai');
const tutorial = require('../composer_transform_csv_to_json.js');

const lineTest = 'tampa, 106, january, null, null, 08-17-2019';

it('should separate out a line and turn into a json string', () => {
  const output = tutorial(lineTest);
  assert.match(
    output,
    new RegExp(
      '{"location":"tampa","average_temperature":" 106","month":" january","inches_of_rain":" null","is_current":" null","latest_measurement":" 08-17-2019"}'
    )
  );
});
<commit_msg>chore: refactor composer test (#1779)<commit_after>const {assert} = require('chai');
const tutorial = require('../composer_transform_csv_to_json.js');

const lineTest = 'tampa, 106, january, null, null, 08-17-2019';

describe('composer_transform_csv_to_json', () => {
  it('should separate out a line and turn into a json string', () => {
    const output = tutorial(lineTest);
    assert.match(
      output,
      new RegExp(
        '{"location":"tampa","average_temperature":" 106","month":" january","inches_of_rain":" null","is_current":" null","latest_measurement":" 08-17-2019"}'
      )
    );
  });
});

{'fraction_non_alphanumeric': 0.18423383525243578, 'fraction_numerical': 0.042515500442869794, 'mean_word_length': 4.824742268041237, 'pattern_counts': {'":': 12, '<': 3, '<?xml version=': 0, '>': 6, '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': '3221505', 'n_tokens_mistral': 406, 'n_tokens_neox': 358, 'n_words': 81}