tehanu-teas

Provides a set of assertion methods compatible with the built-in assert module usable in both Node.js and the browser.

Usage no npm install needed!

<script type="module">
  import tehanuTeas from 'https://cdn.skypack.dev/tehanu-teas';
</script>

README

Test Assertions

NPM version

Provides a set of assertion methods compatible with the built-in assert module usable in both Node.js and the browser.

Synopsis

const test = require('tehanu')('sum'),
      { equal } = require('tehanu-teas'),
      sum = require('./sum'),
      test = tehanu('sum')

test('two numbers', () => equal(sum(1, 2), 3))

Installation

You can install the assertion library using your favourite Node.js package manager:

npm i -D tehanu-teas
yarn add -D tehanu-teas
pnpm i -D tehanu-teas