Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

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');
...

Keywords

none

install

npm i localinstall

Downloadsweekly downloads

2

version

1.2.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability