Commit b30747c
committed
Use default export of jest-environment if present
Jest v28 is going to start using ESM, and the latest release candidate
has started exporting modules with ESM syntax:
jestjs/jest#12340
This breaks jest-mongodb when importing jest-environment-node. In order
to properly import this module when running in jest v28 we need to look
for the default export.
If the default export is present, use that, otherwise use the test
environment as normal.1 parent a94d84e commit b30747c
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
0 commit comments