<commit_before>var one = function(a, e) { strictEqual(jorts.one(a), e) };
var many = function(a, e) { deepEqual(jorts.many(a), e) };

test('General: Basic scenarios needed to understand jorts', function() {
	one(1184, '1K'); // common use for one number
	one(0, '0'); // 0 is always 0
	many([0, 1000, 2000], ['0', '1K', '2K']); // 0 is always 0, but the others are Ks
	one(17, '17'); // 17 alone isn't worth shortening
	many([17, 500, 1000, 2000], ['0K', '1K', '1K', '2K']); // but mix 17 with K's, and for comparison it's 0K
	one(117, '117'); // 117 alone needn't be shortened
	many([117, 1000, 2000], ['0K', '1K', '2K']); // but mix 117 in with K's, and we shorten it again
	many([117, 1000, 2000, 2200], ['0K', '1K', '2K', '2K']);
	// note the tests above show we're not using decimals at all. We may reconsider adding decimals,
	// which in particular would change the final call expected to ['.1K', '1K', '2K', '2.2K']
});

test('General: Small numbers left alone', function() {
	many([0, 1, 2], ['0', '1', '2']);
	many([5, 1, 0], ['5', '1', '0']);
	many([3, 9], ['3', '9']);
});

test('General: Gamut', function() {
	many([0], ['0']);
	many([1], ['1']);
	many([1000], ['1K']);
	many([10000], ['10K']);
	many([100000], ['100K']);
	many([1000000], ['1M']);
	many([10000000], ['10M']);
	many([100000000], ['100M']);
	many([1000000000], ['1B']);
	many([10000000000], ['10B']);
	many([100000000000], ['100B']);
	many([1000000000000], ['1T']);
	many([10000000000000], ['10T']);
	many([100000000000000], ['100T']);			
});

test('General: Trillion is the largest supported scale', function() {
	many([1000000000000000], ['1000T']);
});

test('Many: Empty yields empty', function() {
	many([], []);
});

test('One: Unexpected values', function() {	
	one(undefined, undefined);
	one("<NAME>", undefined);
});

test("Many: Unexpected values", function() {
	many(undefined, undefined);
	many("Palomino", undefined);
	many({A:1}, undefined);	
});

test('Negatives: Not well defined yet so allowing this to fail', function() {<commit_msg>National debt as mentioned in readme tested<commit_after>var one = function(a, e) { strictEqual(jorts.one(a), e) };
var many = function(a, e) { deepEqual(jorts.many(a), e) };

test('General: Basic scenarios needed to understand jorts', function() {
	one(1184, '1K'); // common use for one number
	one(0, '0'); // 0 is always 0
	many([0, 1000, 2000], ['0', '1K', '2K']); // 0 is always 0, but the others are Ks
	one(17, '17'); // 17 alone isn't worth shortening
	many([17, 500, 1000, 2000], ['0K', '1K', '1K', '2K']); // but mix 17 with K's, and for comparison it's 0K
	one(117, '117'); // 117 alone needn't be shortened
	many([117, 1000, 2000], ['0K', '1K', '2K']); // but mix 117 in with K's, and we shorten it again
	many([117, 1000, 2000, 2200], ['0K', '1K', '2K', '2K']);
	// note the tests above show we're not using decimals at all. We may reconsider adding decimals,
	// which in particular would change the final call expected to ['.1K', '1K', '2K', '2.2K']
});

test('General: Small numbers left alone', function() {
	many([0, 1, 2], ['0', '1', '2']);
	many([5, 1, 0], ['5', '1', '0']);
	many([3, 9], ['3', '9']);
});

test('General: Gamut', function() {
	many([0], ['0']);
	many([1], ['1']);
	many([1000], ['1K']);
	many([10000], ['10K']);
	many([100000], ['100K']);
	many([1000000], ['1M']);
	many([10000000], ['10M']);
	many([100000000], ['100M']);
	many([1000000000], ['1B']);
	many([10000000000], ['10B']);
	many([100000000000], ['100B']);
	many([1000000000000], ['1T']);
	many([10000000000000], ['10T']);
	many([100000000000000], ['100T']);			
});

test('General: Trillion is the largest supported scale', function() {
	many([1000000000000000], ['1000T']);
});

test('General: National debt as mentioned in readme works', function() {
	many([17635936048534], ['18T']);
});

test('Many: Empty yields empty', function() {
	many([], []);
});

test('One: Unexpected values', function() {	
	one(undefined, undefined);
	one("<NAME>", undefined);
});

test("Many: Unexpected values", function() {
	many(undefined, undefined);
	many("Palomino", undefined);
	many({A:1}, undefined);	
});

test('Negatives: Not well defined yet so allowing this to fail', function() {
{'fraction_non_alphanumeric': 0.24250356972870063, 'fraction_numerical': 0.13612565445026178, 'mean_word_length': 5.109011627906977, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 18, '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': '3250398', 'n_tokens_mistral': 1896, 'n_tokens_neox': 1482, 'n_words': 483}