<commit_before>import caseDash from "../case-dash";
import assert from "assert";


describe("case-dash", function() {
    var tests = [
            ["T", ["T"]],
            ["t", ["t"]],
            ["Test", ["Test"]],
            ["test", ["test"]],
            ["this-Is-A-Test", ["this", "Is", "A", "Test"]],
            ["This-Is-A-Test", ["This", "Is", "A", "Test"]],
            ["THIS-Is-A-Test", ["THIS", "Is", "A", "Test"]]
        ];

    describe("#parse()", function() {
        tests.forEach(function(pair) {
            var name = pair[0],
                parsed = pair[1];

            it(JSON.stringify(name) + " -> " + JSON.stringify(parsed), function() {
                assert.deepEqual(caseDash.parse(name), parsed);
            });
        });
    });

    describe("#stringify()", function() {
        tests.forEach(function(pair) {
            var name = pair[0],
                parsed = pair[1];

            it(JSON.stringify(parsed) + " -> " + JSON.stringify(name), function() {
                assert.equal(caseDash.stringify(parsed), name);
            });
        });
    });

    describe("#is()", function() {
        tests.forEach(function(pair) {
            var name1 = pair[0],
                parsed = pair[1],
                name2 = pair[1].join("#"),
                val1 = parsed.length > 1;

            it(JSON.stringify(name1) + " (" + val1 + ")", function() {
                assert.equal(caseDash.is(name1), val1);
            });
            it(JSON.stringify(name2) + " (false)", function() {
                assert.equal(caseDash.is(name2), false);
            });
        });
    });
});<commit_msg>Fix standard errors in tests<commit_after>/* global it, describe */

import caseDash from '../case-dash';
import assert from 'assert';

describe('case-dash', function () {
  const tests = [
      ['T', ['T']],
      ['t', ['t']],
      ['Test', ['Test']],
      ['test', ['test']],
      ['this-Is-A-Test', ['this', 'Is', 'A', 'Test']],
      ['This-Is-A-Test', ['This', 'Is', 'A', 'Test']],
      ['THIS-Is-A-Test', ['THIS', 'Is', 'A', 'Test']]
    ]

  describe('#parse()', function () {
    tests.forEach(function (pair) {
      var name = pair[0],
        parsed = pair[1]

      it(JSON.stringify(name) + ' -> ' + JSON.stringify(parsed), function () {
        assert.deepEqual(caseDash.parse(name), parsed)
      })
    })
  })

  describe('#stringify()', function () {
    tests.forEach(function (pair) {
      var name = pair[0],
        parsed = pair[1]

      it(JSON.stringify(parsed) + ' -> ' + JSON.stringify(name), function () {
        assert.equal(caseDash.stringify(parsed), name)
      })
    })
  })

  describe('#is()', function () {
    tests.forEach(function (pair) {
      var name1 = pair[0],
        parsed = pair[1],
        name2 = pair[1].join('#'),
        val1 = parsed.length > 1

      it(JSON.stringify(name1) + ' (' + val1 + ')', function () {
        assert.equal(caseDash.is(name1), val1)
      })
      it(JSON.stringify(name2) + ' (false)', function () {
        assert.equal(caseDash.is(name2), false)
      })
    })
  })
})
{'fraction_non_alphanumeric': 0.21522646964343078, 'fraction_numerical': 0.01092194025056216, 'mean_word_length': 1.9799043062200956, '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': '761545', 'n_tokens_mistral': 1004, 'n_tokens_neox': 985, 'n_words': 179}