@fgaudo/effect-tea - v0.7.2
    Preparing search index...
    • Runs a program's flow without a runtime: from from (e.g. the program's init), runs its commands, then applies messages in order. Every command runs through runCommand as soon as its message is applied, and the message it produces is applied before anything else, as if each command completed at once. As when the program runs, each command has a scope of its own, closed before its message is applied. Pass the program's own runCommand with its services provided, or one of the test's that answers each command without any. Subscriptions do not run: pass the messages they would send in messages. A rejection of one of messages fails the test with a defect, and so does an error update throws; a command's message that update rejects no longer applies: it is ignored, as when the program runs, and listed in ignored. Each command completes in the state its message left, so an ignored message is usually a bug, unless commands started together are meant to exclude one another: a test says which by asserting ignored.

      Type Parameters

      • State
      • Message
      • Command
      • Event
      • R = never

      Parameters

      Returns (
          ...args: [
              messages: readonly Message[],
              from: Readonly<
                  {
                      commands?: readonly Command[];
                      events?: readonly never[];
                      state: State;
                  },
              >,
          ],
      ) => Effect<
          Readonly<
              {
                  commands: readonly Command[];
                  events: readonly Event[];
                  ignored: readonly Message[];
                  messages: readonly Message[];
                  state: State;
              },
          >,
          never,
          Exclude<R, Scope>,
      >