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

Setting a timeout to a describe does not have an effect in 0.31 #3454

Closed
6 tasks done
marcus13371337 opened this issue May 26, 2023 · 1 comment · Fixed by #3455
Closed
6 tasks done

Setting a timeout to a describe does not have an effect in 0.31 #3454

marcus13371337 opened this issue May 26, 2023 · 1 comment · Fixed by #3455

Comments

@marcus13371337
Copy link

Describe the bug

It seems as if something broke when upgrading from 0.30.1 to 0.31.1 with the test timeouts. Passing { timeout: XXX } to describe does not have an effect any longer, the default testTimeout is always used.

Reproduction

Run the foll

Short description:

describe(
  "the submitted issue",
  () => {
    test("true is true after 10s", async () => {
      await new Promise((resolve) => setTimeout(resolve, 10000));

      expect(true).toBe(true);
    });
  },
  {
    timeout: 30000,
  }
);

I'm expecting the test to pass after approx 10s instead it fails after 5s with the error:

Error: Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".

System Info

System:
    OS: macOS 13.4
    CPU: (12) arm64 Apple M2 Max
    Memory: 52.25 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
  Browsers:
    Chrome: 113.0.5672.126
    Safari: 16.5
  npmPackages:
    @vitest/coverage-istanbul: ^0.31.1 => 0.31.1
    vite: ^4.3.9 => 4.3.9
    vitest: ^0.31.1 => 0.31.1

Used Package Manager

pnpm

Validations

@stackblitz
Copy link

stackblitz bot commented May 26, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@marcus13371337 marcus13371337 changed the title timeout to describe does not have an effect in 0.31 Setting a timeout to a describe does not have an effect in 0.31 May 26, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants