Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. 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.
- Loading branch information