@given3/node
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

given3/node

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/node

Usage

import { given } from "@given3/node";
import { describe, it, expect } from "node:test";

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

Package Sidebar

Install

npm i @given3/node

Weekly Downloads

5

Version

2.1.0

License

MIT

Unpacked Size

3.62 kB

Total Files

5

Last publish

Collaborators

  • chris-pardy