2.1.0 • Published 9 months ago

@given3/vitest v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

given3/vitest

Given3 is a testing framework for TypeScript that allows you to write tests in a more readable and expressive way. It is a spiritual successor to Given2 but extends it with more powerful caching and typescript support.

Installation

npm install --save-dev @given3/vitest

Usage

import { given } from "@given3/vitest";
import { describe, it, expect } from "vitest";

describe("my test", () => {
  const user = given(() => ({ name: "John", age: 30 }));

  it("should be able to access the user", () => {
    expect(user.value.name).toBe("John");
  });
});

For more examples see our documentation

2.1.0

9 months ago

2.0.3

9 months ago

2.0.2

9 months ago

2.0.1

10 months ago