-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
4.0.0-beta post 10 partially breaks for Bun runtime #8650
Copy link
Copy link
Labels
Description
Describe the bug
Latest Beta 4.0.0-beta.13 which have tinypool version 2.0.0 supposed to support Bun runtime. Which it does but partially.
The watch and dev mode works but run mode does not run any tests.
Reproduction
Here the simple test case.
// test/unit/simple.test.ts
import { describe, it, expect } from "vitest";
describe("simple test", () => {
it("simple case", () => {
expect(1).toBe(1);
});
});The configuration file.
// vitest.config.ts
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["test/unit/**/*.test.ts"],
}
});When we run watch mode it shows
bunx --bun vitest watch
DEV v4.0.0-beta.13 /vitest-bun-test
✓ test/unit/simple.test.ts (1 test) 2ms
✓ simple test (1)
✓ simple case 1ms
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 15:41:57
Duration 118ms (transform 17ms, setup 0ms, collect 23ms, tests 2ms, environment 0ms, prepare 4ms)
PASS Waiting for file changes...
press h to show help, press q to quit
But running those tests in run mode didn't execute any tests.
bunx --bun vitest run
RUN v4.0.0-beta.13 /vitest-bun-test
Test Files 0 passed (1)
Tests 0 passed (0)
Start at 15:42:33
Duration 0ms
System Info
npx envinfo --system --npmPackages '{vitest*,@vitest/*,vite,@vitejs/*,playwright,webdriverio}' --binaries --browsers
System:
OS: macOS 26.0.1
CPU: (11) arm64 Apple M3 Pro
Memory: 214.39 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.13.0 - ~/.asdf/installs/nodejs/22.13.0/bin/node
Yarn: 1.22.22 - ~/.asdf/installs/nodejs/22.13.0/bin/yarn
npm: 10.9.2 - ~/.asdf/plugins/nodejs/shims/npm
pnpm: 10.11.1 - ~/.bun/bin/pnpm
bun: 1.2.21 - ~/.asdf/shims/bun
Deno: 2.2.8 - ~/.asdf/shims/deno
Browsers:
Brave Browser: 140.1.82.173
Chrome: 140.0.7339.213
Safari: 26.0.1
npmPackages:
vitest: 4.0.0-beta.13 => 4.0.0-beta.13Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable