Saturday 29 August 2020

PopovMP/mocha-tiny

Mocha-tiny - straightforward unit testing: describe and it without dependencies.GitHub: mocha-tinyJust uploaded a tiny unit testing helper for node.js. It uses Mocha syntax and is a sort of drop-in replacement.Synopsisconst { strictEqual } = require('assert'); const { describe, it } = require('@popovmp/mocha-tiny'); describe('Test Math', () => { describe('Math.sum(a, b)', () => { it('is a function', () => { strictEqual(typeof Math.sum, 'function'); }); it('accepts two args', () => { strictEqual(Math.sum.length, 2); });

Submitted August 29, 2020 at 02:17PM by Miroslav_Popov

No comments:

Post a Comment