-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From src/document/subscriptions/document-generator.subscriber.spec.ts.
at Function.dynamicImport (node_modules/@mikro-orm/core/utils/Utils.js:778:20)
at Function.getConfiguration (node_modules/@mikro-orm/core/utils/ConfigurationLoader.js:28:52)
at Function.createEntityManager (node_modules/@mikro-orm/nestjs/mikro-orm-core.module.js:121:32)
at Function.forRoot (node_modules/@mikro-orm/nestjs/mikro-orm-core.module.js:65:20)
Since we upgraded mikro-orm/nestjs to version 5.2.2, the error above occurs 100+ times for various files during the duration of the tests.
Stack trace
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From src/document/subscriptions/document-generator.subscriber.spec.ts.
at Function.dynamicImport (node_modules/@mikro-orm/core/utils/Utils.js:778:20)
at Function.getConfiguration (node_modules/@mikro-orm/core/utils/ConfigurationLoader.js:28:52)
at Function.createEntityManager (node_modules/@mikro-orm/nestjs/mikro-orm-core.module.js:121:32)
at Function.forRoot (node_modules/@mikro-orm/nestjs/mikro-orm-core.module.js:65:20)
To Reproduce
Not sure how to reproduce...
Expected behavior
The error doesn't happen.
Additional context
Works fine on mikro-orm/nestjs 5.1.0.
I tried removing all usage of MikroOrmModule.forRoot across tests but it didn't help.
The issue doesn't seem to affect passing of the tests.
Let me know if I can provide any additional info.
Versions
| Dependency | Version |
|---|---|
| node | 18 |
| typescript | 5.2.2 |
| mikro-orm | 5.8.4 |
| your-driver | ? |
dinoturic-dept
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
