Skip to content

Commit

Permalink
fix: declare missing export for jest-preset (#2477)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl authored Mar 25, 2021
1 parent 1fecf7f commit fc3da9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion e2e/__cases__/presets/ts-jest-presets.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// preset and utils should work all the time
import * as presets from 'ts-jest/presets'
import * as defaultPreset from 'ts-jest/jest-preset';
import { JS_EXT_TO_TREAT_AS_ESM, TS_EXT_TO_TREAT_AS_ESM } from 'ts-jest/dist/constants'

test('presets', () => {
expect(presets.defaults).toEqual({
expect(defaultPreset).toEqual({
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
})

expect(presets.defaultsESM).toEqual({
extensionsToTreatAsEsm: [...TS_EXT_TO_TREAT_AS_ESM],
transform: {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"exports": {
".": "./dist/index.js",
"./dist/*": "./dist/*.js",
"./presets": "./jest-preset.js",
"./jest-preset": "./jest-preset.js",
"./preset": "./presets/index.js",
"./utils": "./utils/index.js",
"./package.json": "./package.json"
},
Expand Down

0 comments on commit fc3da9b

Please sign in to comment.