Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

omrilotan/finjan

Repository files navigation

finjan

☕️ Just test harmony modules

Work in progress

finjan **/spec.mjs

All the things

finjan **/spec.mjs --require .finjan.mjs --ignore **/node_modules/** --verbose

Pass in filenames to import as tests.

Options

name Value
require (r) one or more files to import before the tests
verbose (v) Print stack trace for each error
ignore (i) Pattern or an array of glob patterns to exclude matches

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:

Method Meaning
before Runs before all its in a describe
beforeEach Runs before each it in a describe
afterEach Runs after each it in a describe
after Runs after all its in a describe

About

☕️ Just test harmony modules

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published