Socket
Book a DemoInstallSign in
Socket

estuaire

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

estuaire

⚡ super fast javascript testing tool ⚡

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 01 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts