bun
bun copied to clipboard
bun:test freezes (command never exits) after upgrading to 1.0.24
What version of Bun is running?
1.0.24+6fa35839c
What platform is your computer?
Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
After upgrading from 1.0.23 to 1.0.24, Bun is freezing (never quits) after running my tests via bun:test. Downgrading to 1.0.23 fixes the issue.
Steps to reproduce:
- Clone this repo: https://github.com/EvHaus/test-runner-benchmarks
- Run
cd benchmarks/bun - Run
bun i - Run
bun run test - BUG: Tests will be stuck and never exit
If you downgrade to 1.0.23, you'll see it works fine.
UPDATE: Still an issue with 1.0.28 and 1.0.29+a146856d canary
What is the expected behavior?
Tests run and complete (like in 1.0.23)
What do you see instead?
Process never exists. Stuck forever.
@nektro this is probably the isEventLoopActive change
This issue is still blocking us from upgrading bun to any version above 1.0.23.
Tests are running fine with 1.0.23 and are just hanging with no error on versions above.
Did anyone manage to fix it for them? The problem persists also with the latest 1.0.35 version.
Same on 1.1.1 and 1.1.3
I have the same issue. The tests run properly with bun v1.0.23 but freeze with bun 1.0.24. It also freezes with bun 1.0.36 (latest 1.0 version) and bun 1.1.3 (latest version).
Had this issue running tests in a React app project. Upgrading Vite and Happy-dom dependencies resolved the issue for me.
Thanks @vladmundi-mettle. That's true. Using the latest dependencies I can't reproduce this anymore. Will close.
@EvHaus btw in the test-runner-benchmarks repo, the "should be able to toggle the collapsible content" test seems to be taking up much of the time in bun test.
Commented out:
Not commented out:
I think it's because we haven't implemented jest fake timers yet
@Jarred-Sumner Thanks for looking at it again. That test doesn't use Jest timers though. It uses @testing-library/react's waitForElementToBeRemoved (which uses setInterval under-the-hood).