broken-npm-path
A path to the mock file that simulates an incorrectly installed npm CLI
const childProcess = ;const promisify = ;const brokenNpmPath = ; const execFile = ; async { await ; //=> {stdout: '6.4.0\n', stderr: ''} processenvnpm_execpath = brokenNpmMockbin; await ; // throws an Error: npm CLI is not correctly installed.};
This module is useful for the situation where a user tries to test any libraries and applications depending on npm CLI, and needs to cover the case when npm CLI is not correctly installed for some reason.
Installation
npm install broken-npm-path
API
const brokenNpmPath = ;
brokenNpmPath
Type: string
A path to the intentionally broken npm CLI entry point, which throws an error whenever it's run.
License
ISC License © 2018 Shinnosuke Watanabe