MCPcopy Create free account
hub / github.com/effect-app/libs / expectRefetch

Function expectRefetch

packages/vue/test/dependencyInvalidation.test.ts:294–302  ·  view source on GitHub ↗
(
      label: string,
      options: MutationOptionsBase | undefined,
      command: Effect.Effect<A, E>
    )

Source from the content-addressed store, hash-verified

292 )
293 const self = { id: "AtomGc.List", handler: () => DataDependencies.read(atomRepo).pipe(Effect.as(1)) }
294 const atom = buildQueryFamily(rt as any, self as any)(undefined)
295 const fullKey = [...makeQueryKey(self), undefined]
296
297 const unmount = defaultRegistry.mount(atom)
298 await Effect.runPromise(awaitAtomResult(defaultRegistry, atom))
299 expect(getDerivedInvalidationKeys(new Set([atomRepo]))).toContainEqual(fullKey)
300
301 // Disposing the registry runs the atom's finalizers, including `trackReadDependencies`.
302 unmount()
303 defaultRegistry.reset()
304 expect(getDerivedInvalidationKeys(new Set([atomRepo]))).not.toContainEqual(fullKey)
305})

Callers 1

runInvalidationMatrixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…