-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Using jest-dynamodb after updating to jest 28 (specifically 28.1.0 at the time of writing, as well as updating ts-jest to 28.0.3) I get errors such as the following in all test suites:
● Test suite failed to run
TypeError: Class extends value #<Object> is not a constructor or null
at Object.<anonymous> (node_modules/@shelf/jest-dynamodb/environment.js:5:52)
at Object.newLoader (node_modules/pirates/lib/index.js:141:7)
at ScriptTransformer.requireAndTranspileModule (node_modules/@jest/transform/build/ScriptTransformer.js:895:66)
This appears to be because Jest 28 no longer exports NodeEnvironment as a default import, but is now a named import
In addition, test environments are now exported with the name TestEnvironment, instead of simply exporting the class directly
https://jestjs.io/docs/upgrading-to-jest28#test-environment
It's an easy fix but I guess it would break anyone still on Jest 27? So it would be a major version bump?
Metadata
Metadata
Assignees
Labels
No labels