Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

sunneydev/testing

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

A minimal testing library for Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.