oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.36k stars 2.78k forks source link

`bun test` exits with code 0 when the entrypoint fails to resolve (ModuleNotFound) #15208

Open NReilingh opened 4 days ago

NReilingh commented 4 days ago

What version of Bun is running?

1.1.34+5e5e7c60f

What platform is your computer?

Darwin 24.1.0 arm64 arm

What steps can reproduce the bug?

  1. bun test ./doesNotExist.ts
  2. echo $?

What is the expected behavior?

Exit code should be a value other than 0.

What do you see instead?

Exit code is 0.

Additional information

This is kind of a meta-test failure, but should still be considered an error state -- otherwise, CI tools that are expecting an exit 0 when tests pass may pass code that hasn't been tested (but that the programmer is expecting to have been tested).

Jarred-Sumner commented 4 days ago

Yes definitely a bug.