updeep-remeda/test/omit-spec.js
2015-08-05 04:44:14 -07:00

15 lines
331 B
JavaScript

import { expect } from 'chai';
import u from '../lib';
describe('u.omit', () => {
it('can omit a key', () => {
const result = u({ foo: u.omit('bar') }, { foo: { bar: 7 } });
expect(result).to.eql({ foo: {} });
});
it('freezes the result', () => {
expect(Object.isFrozen(u.omit('a', {}))).to.be.true;
});
});