This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Utility for calling imperative effects | |
* without need of creating one | |
* | |
* Awaiting promise instead of effect would lose scope safety | |
* @see https://effector.dev/docs/api/effector/scope/#imperative-effects-calls-with-scope | |
*/ | |
const callFx = createEffect({ | |
name: 'callFx', | |
handler: async <T extends (arg: any) => any>({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { EffectAdapter } from './adapter'; | |
import type { Mock } from 'vitest'; | |
import { afterEach, describe, expect, vi } from 'vitest'; | |
import type { EventPayload, Subscription } from 'effector'; | |
import { | |
allSettled, |