Skip to content

Commit

Permalink
test: fixes wrong version number
Browse files Browse the repository at this point in the history
  • Loading branch information
huafu committed Sep 15, 2018
1 parent b5a0cfb commit 6cc1565
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/hacks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ describe('patchBabelCore_githubIssue6577', () => {
return new File().initOptions({ sourceMaps, inputSourceMap: true })
}

it('should not reset it if version of babel is not 6', () => {
it('should not reset if version of babel is not 6', () => {
expect(initOptions({ version: null, sourceMaps: INPUT }).sourceMaps).not.toBe(INPUT)
expect(initOptions({ version: '7.1.0', sourceMaps: INPUT }).sourceMaps).not.toBe(INPUT)
})

it('should not reset it if option is falsy', () => {
it('should not reset if option is falsy', () => {
expect(initOptions({ sourceMaps: false }).sourceMaps).not.toBe(false)
expect(initOptions({ sourceMaps: undefined }).sourceMaps).not.toBe(undefined)
expect(initOptions({ sourceMaps: null }).sourceMaps).not.toBe(null)
})
it('should reset to input value if truthy', () => {
expect(initOptions({ version: '6.9.4-dummy0', sourceMaps: INPUT }).sourceMaps).toBe(INPUT)
expect(initOptions({ version: '6.9.4-alpha.0', sourceMaps: INPUT }).sourceMaps).toBe(INPUT)
expect(initOptions({ sourceMaps: INPUT }).sourceMaps).toBe(INPUT)
expect(initOptions({ sourceMaps: 'dummy' }).sourceMaps).toBe('dummy')
})
Expand Down

0 comments on commit 6cc1565

Please sign in to comment.