1.0.6 • Published 2 years ago

@sunney/testing v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

A minimal testing library for Node.js

Installation

# npm
$ npm install @sunney/testing

# yarn
$ yarn add @sunney/testing

# pnpm
$ pnpm add @sunney/testing

Usage

import { expect, run, test } from "@sunney/testing";

test("math", (it) => {
  it("adds 1 to 1", async () => {
    expect(1 + 1).toBe(2);
  });
});

// synchroneous test
test("do some requests", (it) => {
  const client = new SomeClient();

  it("authenticates", async () => {
    await client.auth();
  });

  it("gets a list of users", async () => {
    const users = await client.getUsers();
    expect(users.length).toBe(3);
  });
}).sync();
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago