Skip to content

Migration notes from a 30-file port: Vitest.* type namespace, no hang hint under TestClock #3

Description

@ScriptedAlchemy

Ported cargo-hauler's suite (~550 tests, 30 files) from Effect.runPromise + @rstest/core to it.live / it.effect on effect-rstest@e5f8d5f with effect@4.0.0-rc.112. Nothing blocked; two things cost time:

  1. Type namespace is still Vitest.* (Vitest.Tester, Vitest.Methods, Vitest.TestFunction) in a package named effect-rstest. Hover tooltips and error messages say "Vitest" everywhere, which sent me to the wrong docs twice. Suggest renaming to Rstest.* (or a neutral EffectTest.*) with the old names kept as deprecated aliases.

  2. it.effect gives no hint when a body is parked on real time under TestClock. A Stream.fromEffectSchedule(..., Schedule.spaced('1 millis')) under it.effect just hits the 5 s timeout with a generic message. A dev-mode note at timeout — "a fiber is suspended on Clock.sleep; under it.effect the clock is virtual, use TestClock.adjust or it.live" — would make the live-vs-effect decision immediate.

For what it's worth: it.live.skipIf / it.effect.skipIf being typed (condition: unknown) => Test<R> worked exactly as needed, and acquireRelease inside the test scope replaced every try/finally cleanly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions