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
Mocking is lost when threads: false
is set
#482
Comments
This is kinda an experimental fix. I remember why we added that line, but locally all is fine after removing it. Let me know if it adds new issues :S |
JakeGinnivan
pushed a commit
to JakeGinnivan/vitest
that referenced
this issue
Jan 8, 2022
vikunja-bot
pushed a commit
to go-vikunja/frontend
that referenced
this issue
Jan 10, 2022
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vitest](https://github.com/vitest-dev/vitest) | devDependencies | patch | [`0.0.139` -> `0.0.140`](https://renovatebot.com/diffs/npm/vitest/0.0.139/0.0.140) | --- ### Release Notes <details> <summary>vitest-dev/vitest</summary> ### [`v0.0.140`](https://github.com/vitest-dev/vitest/releases/v0.0.140) [Compare Source](vitest-dev/vitest@v0.0.139...v0.0.140) ##### Bug Fixes - inline snapshot if not called inside suite ([6d743c5](vitest-dev/vitest@6d743c5)), closes [#​484](vitest-dev/vitest#484) - **ui:** flex / percentage based layout ([#​492](vitest-dev/vitest#492)) ([c43ebaf](vitest-dev/vitest@c43ebaf)) - correctly inline shapshot with properties ([4603ffd](vitest-dev/vitest@4603ffd)) - mocking is lost with threads: false ([28b97d8](vitest-dev/vitest@28b97d8)), closes [#​482](vitest-dev/vitest#482) - Reflect.get called on non-object ([3c9073a](vitest-dev/vitest@3c9073a)), closes [#​479](vitest-dev/vitest#479) - snapshot ignores indentation ([aff1481](vitest-dev/vitest@aff1481)) - **ui:** reduce graph container size ([#​478](vitest-dev/vitest#478)) ([23e1e62](vitest-dev/vitest@23e1e62)) ##### Features - global setup ([#​372](vitest-dev/vitest#372)) ([eaa119f](vitest-dev/vitest@eaa119f)) - **ui:** tasks state group ([7782e7d](vitest-dev/vitest@7782e7d)) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/1348 Co-authored-by: renovate <renovatebot@kolaente.de> Co-committed-by: renovate <renovatebot@kolaente.de>
Seems to be working well for me. Thank you! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
I'm seeing a strange behavior with
threads: false
which might be related to #468 and #294. When you mock modules, the mocking works on initial run, but mocks are reset toundefined
when watch mode refreshes, or the when another suite runs.Reproduction
Use this tiny repro suite where I mock the
ora
package: https://stackblitz.com/edit/node-72ecu4?file=index.tsTo reproduce the problem, run the stackblits as normal. You'll notice the initial run works without any issues.
Then make any edit to any file (ie. add some white space) to trigger watch mode to re-run the tests. You'll see that the tests now fail with:
This is because the
ora
mock somehow becomesundefined
.System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: