Skip to content

Timeout is calculated incorrectly in hooks #7694

@sheremet-va

Description

@sheremet-va

Describe the bug

#7565 fixed the issue when the timeout would fail the test without a good error trace. Unfortunately, it doesn't calculate the time correctly for beforeEach and afterEach hooks

See https://github.com/vitest-dev/vitest/pull/7565/files#r2001013538

Reproduction

afterEach(() => {
  await page.getByTole('button').click()
}, 2000)

System Info

Any

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

Labels

feat: browserIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)

Type

Projects

Status

Approved

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions