Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/utils / __tests__ / omit.test.ts
Size: Mime:
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)
  })
})