Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.22 KB

README.md

File metadata and controls

45 lines (30 loc) · 1.22 KB

Skypager Devtools

Provides development tools mainly used in the development of skypager itself.

Test Script

This provides the following command:

$ skypager test

So assuming your project doesn't have a scripts/test.js file it will run the test script in this project

This script starts the mocha-webpack command for you, with the webpack build config that @skypager/webpack finds for your project.

Default Test Setup

Mocha looks in test/test.js for a global test setup file. If you have one, we'll use that. If you don't provide one, by default we'll load the following default

// Load Test Environment Utilities
const chai = require('chai')
const should = chai.should() // eslint-disable-line
chai.use(require('chai-like'))
chai.use(require('chai-things'))
chai.use(require('chai-as-promised'))
const sinon = require('sinon')
const sinonChai = require('sinon-chai')

chai.use(sinonChai)

global.expect = chai.expect

// sinon provides test spies
global.sinon = sinon

Libraries Used