estuaire
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

estuaire

⚡ super fast javascript testing tool ⚡


📦 repository 📜 documents

Features

  • ⚡ lightning fast
  • 🎨 extensible expect
  • 🦄 typescript supported
  • 🛠️ not required config

Usage

yarn add -D estuaire
"scripts": {
+  "test": "estuaire"
}
// test/index.test.ts
import { expect, describe } from 'estuaire';

describe('sum', () => {
  expect(1 + 2).toBe(3);
});

Matcher

const nullValue = null;
const undefinedValue = undefined;
const array = ['ping', 'pong'];
const string = 'hello world';
const number = 2 + 2;

// matchers
expect('hello').toBe('hello');
expect({ a: 10 }).toEqual({ a: 10 });

// truthiness

expect(nullValue).not.toBeDefined();
expect(nullValue).toBeNull();
expect(nullValue).not.toBeUndefined();

expect(undefinedValue).not.toBeDefined();
expect(undefinedValue).toBeUndefined();

// string

expect(string).toContain('hello');
expect(string).toIncludes('hello');

// array

expect(array).toIncludes('ping');
expect(array).toContain('ping');

// number

expect(number).toBeGreaterThan(3);
expect(number).toBeGreaterThanOrEqual(4);
expect(number).toBeLessThan(5);
expect(number).toBeLessThanOrEqual(4);

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i estuaire

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

44.8 kB

Total Files

86

Last publish

Collaborators

  • do4ng