Test cleanup and fixes [a-b]
This commit is contained in:
@ -9,8 +9,12 @@ const head = require('./head.js');
|
||||
expect(head({ a: 1234}) === undefined).toBeTruthy();
|
||||
});
|
||||
t.equal(head([1, 2, 3]), 1, "head([1, 2, 3]) returns 1");
|
||||
t.equal(head({ 0: false}), false, 'head({ 0: false}) returns false');
|
||||
t.equal(head('String'), 'S', 'head(String) returns S');
|
||||
test('head({ 0: false}) returns false', () => {
|
||||
expect(head({ 0: false}), false).toBe()
|
||||
});
|
||||
test('head(String) returns S', () => {
|
||||
expect(head('String'), 'S').toBe()
|
||||
});
|
||||
t.throws(() => head(null), 'head(null) throws an Error');
|
||||
t.throws(() => head(undefined), 'head(undefined) throws an Error');
|
||||
t.throws(() => head(), 'head() throws an Error');
|
||||
|
||||
Reference in New Issue
Block a user