localinstall

1.2.0 • Public • Published

localinstall

Pack and install your npm package into itself. This is useful if you want to run tests against the distributable that other npm users will be using, and not against the lib / dist in your own build.

Usage

First install this package using npm

$ npm install localinstall --save-dev

Then edit your package.json to include the command before your tests

"scripts": {
  "pretest": "localinstall",
  "test": "your-tests-here"
}

Now, in your tests, you can test your package as if it was installed by an end user.

var mypackage = require('mypackage');
...

/localinstall/

    Package Sidebar

    Install

    npm i localinstall

    Weekly Downloads

    1

    Version

    1.2.0

    License

    ISC

    Last publish

    Collaborators

    • jrjurman