square / svelte-store

529 stars 35 forks source link

fix: 'in' operator now returns correct value for asycClient #48

Closed benjamin-t-frost closed 1 year ago

benjamin-t-frost commented 1 year ago

Description

Currently, the in operator always returns false for asyncClients.

Vitest's dependency, tinyspy, asserts that a property is in and object when attempting to spy on it, so asyncClients are currently not spyable in that environment.

Offending code: https://github.com/tinylibs/tinyspy/blob/main/src/spyOn.ts#L78-L81