Test cleanup and fixes [c-d]

This commit is contained in:
Angelos Chalaris
2018-06-18 16:34:04 +03:00
parent d29974ebc9
commit 105185c213
136 changed files with 805 additions and 484 deletions

View File

@ -5,7 +5,13 @@ const join = require('./join.js');
test('join is a Function', () => {
expect(join).toBeInstanceOf(Function);
});
t.deepEqual(join(['pen', 'pineapple', 'apple', 'pen'], ',', '&'), "pen,pineapple,apple&pen", "Joins all elements of an array into a string and returns this string");
t.deepEqual(join(['pen', 'pineapple', 'apple', 'pen'], ','), "pen,pineapple,apple,pen", "Joins all elements of an array into a string and returns this string");
t.deepEqual(join(['pen', 'pineapple', 'apple', 'pen']), "pen,pineapple,apple,pen", "Joins all elements of an array into a string and returns this string");
test('Joins all elements of an array into a string and returns this string', () => {
expect(join(['pen', 'pineapple', 'apple', 'pen'], ',', '&'), "pen,pineapple).toEqual(apple&pen")
});
test('Joins all elements of an array into a string and returns this string', () => {
expect(join(['pen', 'pineapple', 'apple', 'pen'], ','), "pen,pineapple,apple).toEqual(pen")
});
test('Joins all elements of an array into a string and returns this string', () => {
expect(join(['pen', 'pineapple', 'apple', 'pen']), "pen,pineapple,apple).toEqual(pen")
});