Skip to content

Instantly share code, notes, and snippets.

@bararchy
Last active June 27, 2019 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bararchy/acf7301b5c03a8ca999fa4e6cd207c4d to your computer and use it in GitHub Desktop.
Save bararchy/acf7301b5c03a8ca999fa4e6cd207c4d to your computer and use it in GitHub Desktop.
NexPloit-CLI End to End usage Guide

Installation

End-to-end guide to configure nexploit-cli environment.

nexploit-cli

Install and configure @neuralegion/nexploit-cli.

$ npm i -g @neuralegion/nexploit-cli

See README.md

nexmock

Install @neuralegion/nexmock (it's fetch-mock fork):

$ npm i --save-dev @neuralegion/nexmock

Change fetch-mock import to @neuralegion/nexmock:

const fetchMock = require('@neuralegion/nexmock');

See example

karma or mocha

Install and configure either of the following reporters:

karma-nexmock-reporter

Install @neuralegion/karma-nexmock-reporter:

$ npm i --save-dev @neuralegion/karma-nexmock-reporter

Configure karma:

module.exports = (config) => config.set({
    reporters: ['nexmock'],
    plugins: [
      '@neuralegion/karma-nexmock-reporter'
    ],
    nexmock: {
      path: "./.nexmock"
    }
});

See details in karma-nexmock-reporter

mocha-nexmock-reporter

Install @neuralegion/mocha-nexmock-reporter:

$ npm i --save-dev @neuralegion/mocha-nexmock-reporter

Configure mocha:

module.exports = {
    reporter: '@neuralegion/mocha-nexmock-reporter',
    reporterOptions: {
      path: "./.nexmock"
    }
};

or

mocha --reporter @neuralegion/mocha-nexmock-reporter --reporter-options path=./.nexmock

See details in mocha-nexmock-reporter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment