redux
Version:
Atomic Flux with hot reloading
12 lines (10 loc) • 332 B
JavaScript
import expect from 'expect';
import pick from '../../src/utils/pick';
describe('Utils', () => {
describe('pick', () => {
it('should return object with picked values', () => {
const test = { 'name': 'lily', 'age': 20 };
expect(pick(test, x => typeof x === 'string')).toEqual({ 'name': 'lily' });
});
});
});