Test cleanup and fixes [a-b]

This commit is contained in:
Angelos Chalaris
2018-06-18 15:54:48 +03:00
parent a78f5db260
commit 026c65a5e6
151 changed files with 753 additions and 373 deletions

View File

@ -10,7 +10,11 @@ const shuffle = require('./shuffle.js');
test('New array contains all original elements', () => {
expect(shuffle(arr).every(x => arr.includes(x))).toBeTruthy();
});
t.deepEqual(shuffle([]),[],'Works for empty arrays');
t.deepEqual(shuffle([1]),[1],'Works for single-element arrays');
test('Works for empty arrays', () => {
expect(shuffle([]),[]).toEqual()
});
test('Works for single-element arrays', () => {
expect(shuffle([1]),[1]).toEqual()
});