2.1.0 • Published 9 months ago
@given3/jest v2.1.0
given3/jest
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/jestUsage
import { given } from "@given3/jest";
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