<commit_before>const test = require('tape');
const Taira = require('../taira.js');
const importer = require('./importer.js');

test('Taira smooth', function (t) {
    t.plan(6);
    t.throws(() => {
        Taira.smoothen([], Taira.ALGORITHMS.AVERAGE, 1, 1);
        Taira.smoothen([1, 2, 4, 5], Taira.ALGORITHMS.AVERAGE, 20, 2);
    }, 'Empty array throws');
    t.throws(() => {
        Taira.smoothen(undefined, Taira.ALGORITHMS.AVERAGE, 1, 1);
    }, 'undefined throws');
    t.throws(() => {
        Taira.smoothen([1, 2, 4, 5], Taira.ALGORITHMS.AVERAGE, 20, 2);
    }, 'Too short array for size=20 throws');
    t.equal(Taira.smoothen([1, 2, 3, 4, 5], Taira.ALGORITHMS.AVERAGE, 1, 1).length, 5, 'Array in/out length');
    t.deepLooseEqual(Taira.from([1, 2, 3, 4, 5]), new Taira(1, 2, 3, 4, 5), 'Convert Array to Taira');
    t.deepLooseEqual(Taira.smoothen([1, 2, 3, 4, 5], Taira.ALGORITHMS.AVERAGE, 1, 1), [ 2.6666666666666665, 2, 3, 4, 3.3333333333333335 ], 'Expected output');
});<commit_msg>Fix test case<commit_after>const test = require('tape');
const Taira = require('../taira.js');
const importer = require('./importer.js');

test('Taira smooth', function (t) {
    t.plan(6);
    t.throws(() => {
        Taira.smoothen([], Taira.ALGORITHMS.AVERAGE, 1, 1);
        Taira.smoothen([1, 2, 4, 5], Taira.ALGORITHMS.AVERAGE, 20, 2);
    }, 'Empty array throws');
    t.throws(() => {
        Taira.smoothen(undefined, Taira.ALGORITHMS.AVERAGE, 1, 1);
    }, 'undefined throws');
    t.throws(() => {
        Taira.smoothen([1, 2, 4, 5], Taira.ALGORITHMS.AVERAGE, 20, 2);
    }, 'Too short array for size=20 throws');
    t.equal(Taira.smoothen([1, 2, 3, 4, 5], Taira.ALGORITHMS.AVERAGE, 1, 1).length, 5, 'Array in/out length');
    t.deepLooseEqual(Taira.from([1, 2, 3, 4, 5]), new Taira(1, 2, 3, 4, 5), 'Convert Array to Taira');
    t.deepLooseEqual(Taira.smoothen([1, 2, 3, 4, 5], Taira.ALGORITHMS.AVERAGE, 1, 1), [ 1, 2, 3, 4, 5 ], 'Expected output');
});
{'fraction_non_alphanumeric': 0.20913705583756345, 'fraction_numerical': 0.06802030456852792, 'mean_word_length': 3.5310344827586206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '1143556', 'n_tokens_mistral': 945, 'n_tokens_neox': 834, 'n_words': 186}