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

Allow concurrent tests with bun test #9548

Open
eduardvercaemer opened this issue Mar 21, 2024 · 1 comment
Open

Allow concurrent tests with bun test #9548

eduardvercaemer opened this issue Mar 21, 2024 · 1 comment
Labels
bun:test Something related to the `bun test` runner enhancement New feature or request

Comments

@eduardvercaemer
Copy link
Contributor

What is the problem this feature would solve?

Consider the following example, where tests are not CPU bound but rather wait on other resources:

describe("async-tests", () => {
  it("waits 2 seconds", () =>
    new Promise((resolve) => setTimeout(resolve, 2000)));

  it("waits another seconds", () =>
    new Promise((resolve) => setTimeout(resolve, 2000)));
});

There's currently no way of running such tests concurrently so that it takes 2 seconds. Instead they always run sequentially and take 4 seconds in total.

What is the feature you are proposing to solve the problem?

a) A flag for bun test that runs all tests concurrently
b) A solution like jest's test.concurrently()

What alternatives have you considered?

Failed to find any alternative 🤷🏼‍♂️

@eduardvercaemer eduardvercaemer added the enhancement New feature or request label Mar 21, 2024
@Electroid Electroid added the bun:test Something related to the `bun test` runner label Mar 22, 2024
@coffeeispower
Copy link
Contributor

I also want this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun:test Something related to the `bun test` runner enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants