iterate.com / onboarding

git clone https://git.iterate.com/repos/onboarding

onboarding / tests / expect.mjsmain at b65083a

// tests/expect.mjs — VITEST'S `expect`, WITHOUT VITEST: chai with the matchers of @vitest/expect
// (toEqual, toMatchObject, toContainEqual, resolves and rejects, expect.stringMatching and the
// other asymmetric matchers), so a test written for vitest keeps the exact meaning of each
// assertion under `node --test`. Spies and timers are node:test's own (`mock`).
import * as chai from "chai";
import { JestAsymmetricMatchers, JestChaiExpect, JestExtend } from "@vitest/expect";

chai.use(JestExtend);
chai.use(JestChaiExpect);
chai.use(JestAsymmetricMatchers);

export const expect = chai.expect;