Some Jest/Vitest compatible matchers
pnpm add -D mix-n-matchers
Adds some useful matchers to Jest or Vitest.
expect(mock).toHaveBeenCalledWithContext(expect.exactly(service));
expect(iterable).toContainSequence(1, 2, 3);
expect(getDirection()).toBeEnum(Direction);
expect(post).toEqual({
id: expect.typeOf("string"),
status: expect.oneOf(["pinned", "archived", undefined]),
});
Back to all packages