File tree Expand file tree Collapse file tree 2 files changed +3
-28
lines changed Expand file tree Collapse file tree 2 files changed +3
-28
lines changed Original file line number Diff line number Diff line change 1- const _ = process ;
2-
3- // @ts -expect-error we need to put this inside jest.config.js,
4- // since it's being read before the process object is replaced by the jest runner.
5- // More info:
6- // https://johann.pardanaud.com/blog/how-to-assert-unhandled-rejection-and-uncaught-exception-with-jest/
7- // https://github.com/jestjs/jest/issues/5620
8- // https://github.com/jestjs/jest/issues/11165
9- // https://codesandbox.io/p/devbox/z9qdp4?migrateFrom=zzjfzz
10- global . _onUnhandledRejection = handler => {
11- _ . on ( 'unhandledRejection' , handler ) ;
12- } ;
13-
141import { createDefaultEsmPreset } from 'ts-jest/dist/presets/create-jest-preset.js' ;
152
163const tsJestTransformCfg = createDefaultEsmPreset ( ) . transform ;
Original file line number Diff line number Diff line change 1717 "url" : " http://github.com/graphql/dataloader.git"
1818 },
1919 "type" : " module" ,
20- "main" : " dist/index.cjs " ,
21- "module" : " dist/index.js" ,
22- "typings" : " dist/index.d.ts" ,
20+ "main" : " dist/cjs/ index.js " ,
21+ "module" : " dist/esm/ index.js" ,
22+ "typings" : " dist/esm/ index.d.ts" ,
2323 "scripts" : {
2424 "test" : " npm run lint && npm run check && npm run testonly" ,
2525 "test:ci" : " npm run lint && npm run check && npm run testonly -- --coverage" ,
6969 "files" : " src/**/*.ts"
7070 }
7171 ]
72- },
73- "tsdown" : {
74- "entry" : [
75- " src/index.ts"
76- ],
77- "format" : [
78- " cjs" ,
79- " esm"
80- ],
81- "dts" : true ,
82- "sourcemap" : true ,
83- "clean" : true
8472 }
8573}
You can’t perform that action at this time.
0 commit comments