question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeORM doesn't work with Jest

See original GitHub issue

Issue 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shirshak55commented, Jan 9, 2020

@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 😦

0reactions
wi-skicommented, Nov 27, 2020

Same issues here.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found