You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bun test v0.7.2 (9574db35)
foo.test.ts:
before all
(22.5ms) BEGIN
(1.5ms) select 1
✓ test [1.72ms]
after all
(3.9ms) ROLLBACK
1 pass
0 fail
Ran 1 tests across 1 files. [89.00ms]
The text was updated successfully, but these errors were encountered:
Found the same issue here on Bun 1.0.11 with both postgres.js and pg. Likely it has something to do with the Postgres connection that is still alive. A similar issue and workaround were reported to porsager/postgres#682
What version of Bun is running?
0.7.2
What platform is your computer?
Darwin 22.5.0 arm64 arm
What steps can reproduce the bug?
bun add orchid-orm pqm createdb test
Test file
foo.test.ts
:Preload file
setup.ts
:Run it with:
bun test -r ./setup.ts foo.test.ts
What is the expected behavior?
The test passes.
afterAll
is called and at least prints to console.What do you see instead?
afterAll
is never called, the test runner hangs (probably due to open pg pool with active transaction):Additional information
Everything works if the test and beforeAll/afterAll are in the single file
foo.test.ts
:The text was updated successfully, but these errors were encountered: