End-to-end guide to configure nexploit-cli environment.
Install and configure @neuralegion/nexploit-cli.
$ npm i -g @neuralegion/nexploit-cliSee README.md
Install @neuralegion/nexmock (it's fetch-mock fork):
$ npm i --save-dev @neuralegion/nexmockChange fetch-mock import to @neuralegion/nexmock:
const fetchMock = require('@neuralegion/nexmock');See example
Install and configure either of the following reporters:
Install @neuralegion/karma-nexmock-reporter:
$ npm i --save-dev @neuralegion/karma-nexmock-reporterConfigure karma:
module.exports = (config) => config.set({
reporters: ['nexmock'],
plugins: [
'@neuralegion/karma-nexmock-reporter'
],
nexmock: {
path: "./.nexmock"
}
});See details in karma-nexmock-reporter
Install @neuralegion/mocha-nexmock-reporter:
$ npm i --save-dev @neuralegion/mocha-nexmock-reporterConfigure mocha:
module.exports = {
reporter: '@neuralegion/mocha-nexmock-reporter',
reporterOptions: {
path: "./.nexmock"
}
};or
mocha --reporter @neuralegion/mocha-nexmock-reporter --reporter-options path=./.nexmockSee details in mocha-nexmock-reporter