<commit_before>const ga = require('../lib/getArguments.js');
const test = require('tape');

test('getArguments: arguments for a function', t => {
  t.deepEqual(ga(function (a, b, c) { return c; }), [ 'a', 'b', 'c' ], 'found args for anon function');
  t.deepEqual(ga(function (c, b, a) { return a; }), [ 'c', 'b', 'a' ], 'found args for anon function (order preserved)');
  t.end();
});

test('getArguments: arguments for a class', t => {
  t.deepEqual(ga(class T { constructor(a, b, c) { return c; } }), [ 'a', 'b', 'c' ], 'found args for class');
  t.deepEqual(ga(class T { constructor(c, b, a) { return a; } }), [ 'c', 'b', 'a' ], 'found args for class (in order)');
  t.end();
});<commit_msg>failing tests: arrow function in getArgs<commit_after>const ga = require('../lib/getArguments.js');
const test = require('tape');

test('getArguments: arguments for a function', t => {
  t.deepEqual(ga(function (a, b, c) { return c; }), [ 'a', 'b', 'c' ], 'found args for anon function');
  t.deepEqual(ga(function (c, b, a) { return a; }), [ 'c', 'b', 'a' ], 'found args for anon function (order preserved)');
  t.end();
});

test('getArguments: arguments for an arrow function', t => {
  t.deepEqual(ga((a, b, c) => c), [ 'a', 'b', 'c' ], 'found args for anon function');
  t.deepEqual(ga((c, b, a) => a), [ 'c', 'b', 'a' ], 'found args for anon function (order preserved)');
  t.end();
});

test('getArguments: arguments for a class', t => {
  t.deepEqual(ga(class T { constructor(a, b, c) { return c; } }), [ 'a', 'b', 'c' ], 'found args for class');
  t.deepEqual(ga(class T { constructor(c, b, a) { return a; } }), [ 'c', 'b', 'a' ], 'found args for class (in order)');
  t.end();
});
{'fraction_non_alphanumeric': 0.23843416370106763, 'fraction_numerical': 0.0, 'mean_word_length': 4.222910216718266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '487758', 'n_tokens_mistral': 615, 'n_tokens_neox': 622, 'n_words': 199}