@quoin/node-test-helpers
v2.0.1
Published
Test helpers library for nodeJS
Downloads
8
Readme
node-test-helpers
This is an extension of node-test-helpers-core that adds chai plugins for projects.
To install
To add the library to your project:
npm install --save-dev @quoin/node-test-helpers
Usage
An example of usage:
const testHelpers = require('@quoin/node-test-helpers');
const moduleToTest = require('./index');
const expect = testHelpers.expect;
describe("index", () => {
it("should export a function with 2 params", () => {
expect(index).to.be.a('function').to.have.lengthOf(2);
});
});
See the lib/index.js file to see what libraries are imported and refer to their respective documentation.
Examples
See node-test-helpers-core's README for some examples.