Updated the test system
This commit is contained in:
15
test/isArrayLike.test.js
Normal file
15
test/isArrayLike.test.js
Normal file
@ -0,0 +1,15 @@
|
||||
const expect = require('expect');
|
||||
const {isArrayLike} = require('./_30s.js');
|
||||
|
||||
test('isArrayLike is a Function', () => {
|
||||
expect(isArrayLike).toBeInstanceOf(Function);
|
||||
});
|
||||
test('Returns true for a string', () => {
|
||||
expect(isArrayLike('abc')).toBeTruthy();
|
||||
});
|
||||
test('Returns true for an array', () => {
|
||||
expect(isArrayLike([1, 2, 3])).toBeTruthy();
|
||||
});
|
||||
test('Returns false for null', () => {
|
||||
expect(isArrayLike(null)).toBeFalsy();
|
||||
});
|
||||
Reference in New Issue
Block a user