Test cleanup and fixes [a-b]

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

View File

@ -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');