Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
14
test/mapValues/mapValues.test.js
Normal file
14
test/mapValues/mapValues.test.js
Normal file
@ -0,0 +1,14 @@
|
||||
const expect = require('expect');
|
||||
const mapValues = require('./mapValues.js');
|
||||
|
||||
|
||||
test('mapValues is a Function', () => {
|
||||
expect(mapValues).toBeInstanceOf(Function);
|
||||
});
|
||||
const users = {
|
||||
fred: { user: 'fred', age: 40 },
|
||||
pebbles: { user: 'pebbles', age: 1 }
|
||||
};
|
||||
t.deepEqual(mapValues(users, u => u.age), { fred: 40, pebbles: 1 }, 'Maps values');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user