TypeORM doesn't work with Jest
See original GitHub issueIssue type:
[ ] question [x] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[ ] oracle
[x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[ ] latest
[ ] @next
[x] ^0.2.20
(or put your version here)
Steps to reproduce or a small repository showing the problem:
https://dev.azure.com/rlme/API/_git/API (Repository with the issue, database config in src/utilities/database.ts
)
https://dev.azure.com/rlme/API/_build/results?buildId=8&view=results (ci failure. fails locally and in CI)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Jest, TypeORM, and typescript failing to run tests
I am using TS with TypeORM, mysql and jest to build a schema factory, however, my test suites are failing to run since...
Read more >Tests with Jest and TypeORM - DEV Community
Let's create a connection.ts to export some functions to run in our tests. import {createConnection, getConnection} from 'typeorm'; ...
Read more >Unit Testing in ts-jest with TypeOrm entities | by Sebastian Hines
For a long time i have been using TypeOrm in my projects, but … i am ashamed ... Typescript (must be installed locally...
Read more >Is there any way to test in parallel using typeorm + postgres + ...
I've encountered a similar problem managing centralized resources in Jest due to their "sandbox" approach to individual test files, ...
Read more >typeorm/typeorm - Gitter
Jest did not exit one second after the test run has completed. This usually means that there are asynchronous operations that weren't stopped...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@haydennyyy hey didn’t u face problem with multiple test suites? Like how did u created Connection . I get connection default not defined as it seems jest use worker and worker resolves fresh node_modules 😦
Same issues here.