JSPM

  • Created
  • Published
  • Downloads 46
  • Score
    100M100P100Q77054F
  • License MIT

test runner from the m.icro series

Package Exports

  • m.test

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (m.test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

m.test

Travis node npm npm js-standard-style

wip test runner from the m.icro series.

install

install m.test directly from npm to project's devDependencies.

npm install --development m.test

usage

test files are run by simply passing them to node. for a given test/index.js run the following to execute the suite:

node test

cli

more utilities to run your suites are available through the cli. if no files are given they will be looked up from cwd 's test folder recursively.

m.test [options] [files]

further instructions can be accessed via --help flag and man-pages by executing either m.test --help or man m.test within your shell.


sync usage

const {ok} = require('assert')
const {test} = require('m.test')

test('description', function () {
  ok(true)
})

async usage

test('description', function (done) {
  setTimeout(function (done) {
    done(null)
  }, 0, done)  
})

recursive usage

const {test: describe, test: it} = require('m.test')

describe('context', function(){
  it('works!', function (done) {
    setTimeout(() => done(null), 0)  
  })
})

view more