Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with tests running forever using the Node API #7307

Closed
6 tasks done
Zequez opened this issue Jan 20, 2025 · 2 comments
Closed
6 tasks done

Trouble with tests running forever using the Node API #7307

Zequez opened this issue Jan 20, 2025 · 2 comments

Comments

@Zequez
Copy link

Zequez commented Jan 20, 2025

Describe the bug

Using the Node API createVitest, the CLI output just goes on a loop saying:

 Test Files 0 passed (1)
      Tests 0 passed (0)
   Start at 11:14:55
   Duration 232.25s

Here is a minimal test configuration file:

import { createVitest } from "vitest/node";

const vitestServer = await createVitest("test", { watch: false }, {}, {});

await vitestServer.start();
await vitestServer.close();

And this minimal test file:

import { it, expect } from "vitest";

it("works", () => {
  expect(1).toEqual(1);
});

Reproduction

Here I made a repository with a reproduction, and even an animated gif.

https://github.com/Zequez/vitest-node-api-error-repro

System Info

Using Bun package manager, which is not an option.

Used Package Manager

npm

Validations

@Zequez
Copy link
Author

Zequez commented Jan 20, 2025

Seems related to Bun, as I tried with NPM and it works. Does Vitest not work with Bun at all?

@sheremet-va
Copy link
Member

sheremet-va commented Jan 20, 2025

Please, refer to oven-sh/bun#4145 for Bun support. Bun positions itself as Node.js compliant, Vitest doesn't have any special handling for Bun.

@sheremet-va sheremet-va closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants