Repository URL to install this package:
|
Version:
1.1.6 ▾
|
import 'jest'
import { omit } from '../src/omit'
describe('application/utils', () => {
it('should export matching the snapshot', () => {
const obj = {
one: 1,
two: 2,
}
const omitted = omit(obj, ['two'])
// removed a property
expect(Object.keys(omitted).length).toEqual(1)
expect(omitted.one).toEqual(1)
expect(omitted.two).toEqual(undefined)
// did not mutate
expect(obj.two).toEqual(2)
})
})