Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(presets): simplify create presets codes (#1911)
- Loading branch information
Showing
25 changed files
with
147 additions
and
159 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// preset and utils should work all the time | ||
import * as presets from 'ts-jest/presets' | ||
|
||
test('presets', () => { | ||
const presetKeys = ['transform'] | ||
expect(presets.defaults).toEqual(require('ts-jest/dist/presets').defaults) | ||
expect(Object.keys(presets.defaults)).toEqual(presetKeys) | ||
expect(presets.jsWithBabel).toEqual(require('ts-jest/dist/presets').jsWithBabel) | ||
expect(Object.keys(presets.jsWithBabel)).toEqual(presetKeys) | ||
expect(presets.jsWithTs).toEqual(require('ts-jest/dist/presets').jsWithTs) | ||
expect(Object.keys(presets.jsWithTs)).toEqual(presetKeys) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import * as utils from 'ts-jest/utils' | ||
|
||
test('utils', () => { | ||
expect(Object.keys(utils)).toEqual(['mocked', 'createJestPreset', 'pathsToModuleNameMapper']) | ||
expect(typeof utils.mocked).toBe('function') | ||
expect(typeof utils.createJestPreset).toBe('function') | ||
expect(typeof utils.pathsToModuleNameMapper).toBe('function') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.