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