Test cleanup and fixes [e-f]
This commit is contained in:
@ -1,17 +1,15 @@
|
||||
const expect = require('expect');
|
||||
const findKey = require('./findKey.js');
|
||||
|
||||
|
||||
test('findKey is a Function', () => {
|
||||
test('findKey is a Function', () => {
|
||||
expect(findKey).toBeInstanceOf(Function);
|
||||
});
|
||||
t.deepEqual(findKey(
|
||||
test('Returns the appropriate key', () => {
|
||||
expect(findKey(
|
||||
{
|
||||
barney: { age: 36, active: true },
|
||||
fred: { age: 40, active: false },
|
||||
pebbles: { age: 1, active: true }
|
||||
},
|
||||
o => o['active']
|
||||
), 'barney', 'Returns the appropriate key');
|
||||
|
||||
|
||||
o => o['active']).toBe('barney');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user