0.0.0-alpha.2a • Published 5 years ago

finjan v0.0.0-alpha.2a

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

finjan npm.io npm.io

☕️ Just test harmony modules

Work in progress

npm.io

finjan **/spec.mjs

Pass in filenames to import as tests.

Options

nameValue
require (r)one or more files to import before the tests
verbose (v)Print stack trace for each error

Structure of spec/tests file

describe('my suit', function() {
	it('Should pass', function() {
		assert(!!1, true);
	});
	it('Should pass', async function() {
		assert.equal(await square(2), 4);
	});
});

Create a scope with describe and register tests with it

Additional methods:

MethodMeaning
beforeRuns before all its in a describe
beforeEachRuns before each it in a describe
afterEachRuns after each it in a describe
afterRuns after all its in a describe