<commit_before>'use strict';
var test = require('ava');
var fn = require('./');
var fixture = [1, 2, 3, 4, 5];

test(function (t) {
	t.same(fn(fixture, 3, 0), [4, 1, 2, 3, 5]);
	t.same(fn(fixture, -1, 0), [5, 1, 2, 3, 4]);

	var fixture2 = fixture.slice();
	fn.mut(fixture2, 3, 0);
	t.same(fixture2, [4, 1, 2, 3, 5]);

	t.end();
});<commit_msg>added tests for negative 'to' argument<commit_after>'use strict';
var test = require('ava');
var fn = require('./');
var fixture = [1, 2, 3, 4, 5];

test(function (t) {
	t.same(fn(fixture, 3, 0), [4, 1, 2, 3, 5]);
	t.same(fn(fixture, -1, 0), [5, 1, 2, 3, 4]);
	t.same(fn(fixture, 1, -2), [1, 3, 4, 2, 5]);
	t.same(fn(fixture, -3, -4), [1, 3, 2, 4, 5]);

	var fixture2 = fixture.slice();
	fn.mut(fixture2, 3, 0);
	t.same(fixture2, [4, 1, 2, 3, 5]);

	var fixture3 = fixture.slice();
	fn.mut(fixture3, 1, -2);
	t.same(fixture3, [1, 3, 4, 2, 5]);

	t.end();
});
{'fraction_non_alphanumeric': 0.2682926829268293, 'fraction_numerical': 0.09090909090909091, 'mean_word_length': 3.8031914893617023, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4448898', 'n_tokens_mistral': 482, 'n_tokens_neox': 420, 'n_words': 125}