You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: utils.getFetchStatusByToken is not a function
❯ ReactiveEffect.fn ../src/runtime/storage/stores/fetcher/getters.ts:31:33
29| }
30|
31| const fetchStatus = utils.getFetchStatusByToken(fetcherState.primaryFetch.successToken)
| ^
32| if (!fetchStatus || utils.isFetchResolving(fetcherState.primaryFetch.successToken)) {
33| return
❯ ReactiveEffect.run ../node_modules/.pnpm/@vue+reactivity@3.3.2/node_modules/@vue/reactivity/dist/reactivity.cjs.js:182:19
❯ ComputedRefImpl.get value [as value] ../node_modules/.pnpm/@vue+reactivity@3.3.2/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1143:33
❯ ../src/runtime/storage/stores/fetcher/getters.spec.ts:78:49
and
Error: spyOn could not find an object to spy upon
❯ ../src/runtime/storage/stores/fetcher/getters.spec.ts:88:8
86| const utils = FetcherGetterUtils.mock.results[0].value
87| const expected = returnFetchStatus ? result : undefined
88| vi.spyOn(utils, 'getFetchStatusByToken').mockImplementationOnce(() => {
| ^
89| return expected
90| })
On subsequent tests, running each test individually still works fine.
I'm not sure how to make this repro more minimal, but I wanted to raise this first as a package maintainer may immediately know an update that was made that could cause something like this to happen.
Describe the bug
It appears that in a test
vi.restoreAllMocks()
is not restoring mocks back to what I've declared at the head of the file anymore.Reproduction
This is my test file:
https://github.com/components-web-app/cwa-nuxt-module/blob/nuxt3/src/runtime/storage/stores/fetcher/getters.spec.ts
I get
and
On subsequent tests, running each test individually still works fine.
I'm not sure how to make this repro more minimal, but I wanted to raise this first as a package maintainer may immediately know an update that was made that could cause something like this to happen.
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: