mjstest
v1.0.7
Published
**Important: beforeEach, afterEach, beforeAll and afterAll is not yet implemented**
Downloads
4
Readme
mjstest - A test runner for .mjs projects
Important: beforeEach, afterEach, beforeAll and afterAll is not yet implemented
We are at the point where we can use .mjs under the --experimental-modules flag. The implementation may still change, but it's unlikely. I wanted a testframework that was mjs-first instead of relying on babel.
Interface
The globals exposed by the library are inspired by Jasmine.
describe('hello world', () => {
beforeEach(async () => {
// ...
})
afterEach(async () => {
// ...
})
beforeAll(async () => {
// ...
})
afterAll(async () => {
// ...
})
it('can run a test', async () => {
})
test('test === it', () => {
expect(test).toBe(it)
})
})
Usage
mjstest **/*.spec.mjs