Use @effect/vitest for tests in this repo.
Fix Shape
- Import
describe,it,expect, and helpers from@effect/vitest. - Import utility helpers from
@effect/vitest/utilswhen needed. - Do not import from raw
vitestexcept in config or tooling files. - Do not put
expect(...)behindif, ternary, logical, or switch branches. - Split conditional behavior into separate tests, or assert the branch condition and expected value explicitly.
Bad
if (result.ok) {
expect(result.value).toBe("x");
}
Good
expect(result).toEqual({ ok: true, value: "x" });