diff options
author | Joe Bottigliero <joe@bottigliero.com> | 2018-11-26 19:13:52 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-11-26 19:13:52 +0300 |
commit | 4be51a9cc65635bb26fa4ce62233f26e0104bc20 (patch) | |
tree | 772bd21e2d8684254df082a14028114a0cab0acd /test | |
parent | 71d8fb4a94d65e1855f6d0c5f2ad2b7c3202e3c4 (diff) |
cli,outdated: Adds 'Homepage' to outdated --long output. (#81)
* feat(cli, outdated): Adds 'Homepage' to outdated --long output.
- `package.json`'s `homepage` property is displayed when using the `--long` option for `npm outdated`
* test: npm outdated --long
- Adds `homepage` to `--parseable` output.
- Updates `npm outdated --long` test to include `homepage` in expected output.
- Adds `homepage` to `npm-outdated` documentation.
* fix: javascript standard style updates
PR-URL: https://github.com/npm/cli/pull/81
Credit: @jbottigliero
Reviewed-By: @zkat
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/outdated-long.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/tap/outdated-long.js b/test/tap/outdated-long.js index 6ea5e6e2c..976d416a1 100644 --- a/test/tap/outdated-long.js +++ b/test/tap/outdated-long.js @@ -74,6 +74,10 @@ test('it should not throw', function (t) { npm.install('.', function (err) { t.ifError(err, 'install success') npm.config.set('long', true) + // since it's possible for the homepage of a package to change, after the + // install we read the value from the package.json directly to specify our + // expected output. + expOut[1] = expOut[1] + ':' + JSON.parse(fs.readFileSync(path.resolve(pkg, 'node_modules', 'underscore', 'package.json'))).homepage npm.outdated(function (er, d) { t.ifError(err, 'npm outdated ran without error') t.is(process.exitCode, 1, 'exit code set to 1') |