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

Uncaught promise rejections sometimes crash watch mode #2106

Closed
6 tasks done
sdnts opened this issue Oct 1, 2022 · 0 comments
Closed
6 tasks done

Uncaught promise rejections sometimes crash watch mode #2106

sdnts opened this issue Oct 1, 2022 · 0 comments

Comments

@sdnts
Copy link

sdnts commented Oct 1, 2022

Describe the bug

If an awaited promise gets rejected with anything other than an object, the test runner exits watch mode with the following error:

TypeError: can't access property "stacks", e is undefined

(error message varies slightly depending on what the promise rejection returns)

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-vvm3wa?file=test%2Fbasic.test.ts&initialPath=__vitest__
I've included three lines in the test in here. Only the third line behaves as expected.

Please let me know if I'm being unclear!

System Info

System:
    OS: macOS 12.6
    CPU: (10) arm64 Apple M1 Pro
    Memory: 577.14 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.10.0 - ~/.n/bin/node
    Yarn: 1.22.15 - ~/.local/bin/yarn
    npm: 8.19.2 - ~/.n/bin/npm
  Browsers:
    Firefox Developer Edition: 105.0
    Safari: 16.0
  npmPackages:
    vitest: 0.23.4 => 0.23.4

Used Package Manager

npm

Validations

@sheremet-va sheremet-va added the bug label Oct 1, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 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

No branches or pull requests

2 participants