Linted tests
This commit is contained in:
@ -36,4 +36,3 @@ test('Falsy trues', () => {
|
||||
test('Falsy falses', () => {
|
||||
expect(allEqual([false, false, true])).toBeFalsy();
|
||||
});
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ test('deepFreeze is a Function', () => {
|
||||
});
|
||||
|
||||
test('modifying deeply freezed object prop throws an error in strict mode', () => {
|
||||
let freezedObj = deepFreeze({a: 42});
|
||||
let freezedObj = deepFreeze({ a: 42 });
|
||||
|
||||
expect(() => {
|
||||
'use strict';
|
||||
|
||||
@ -8,8 +8,8 @@ test('Initializes an array containing the numbers in the specified range (witout
|
||||
expect(initializeArrayWithRange(5)).toEqual([0, 1, 2, 3, 4, 5]);
|
||||
});
|
||||
test('Initializes an array containing the numbers in the specified range', () => {
|
||||
expect(initializeArrayWithRange(7,3)).toEqual([3, 4, 5, 6, 7]);
|
||||
expect(initializeArrayWithRange(7, 3)).toEqual([3, 4, 5, 6, 7]);
|
||||
});
|
||||
test('Initializes an array containing the numbers in the specified range (with step)', () => {
|
||||
expect(initializeArrayWithRange(9,0,2)).toEqual([0, 2, 4, 6, 8]);
|
||||
expect(initializeArrayWithRange(9, 0, 2)).toEqual([0, 2, 4, 6, 8]);
|
||||
});
|
||||
|
||||
@ -11,7 +11,7 @@ test('Returns the longest object from a spread array', () => {
|
||||
expect(longestItem(...['a', 'ab', 'abc'])).toEqual('abc');
|
||||
});
|
||||
test('Returns the longest object from mixed input', () => {
|
||||
expect(longestItem(...['a', 'ab', 'abc'],'abcd')).toEqual('abcd');
|
||||
expect(longestItem(...['a', 'ab', 'abc'], 'abcd')).toEqual('abcd');
|
||||
});
|
||||
test('Returns the longest array', () => {
|
||||
expect(longestItem([1, 2, 3], [1, 2], [1, 2, 3, 4, 5])).toEqual([1, 2, 3, 4, 5]);
|
||||
@ -23,10 +23,10 @@ test('Returns undefined without any input', () => {
|
||||
expect(longestItem()).toEqual(undefined);
|
||||
});
|
||||
test('Returns first found of all similar', () => {
|
||||
expect(longestItem('a','b','c')).toEqual('a');
|
||||
expect(longestItem('a', 'b', 'c')).toEqual('a');
|
||||
});
|
||||
test('Throws TypeError if all inputs are undefined', () => {
|
||||
expect(() => {
|
||||
longestItem(undefined,undefined);
|
||||
longestItem(undefined, undefined);
|
||||
}).toThrow(TypeError);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user