File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const BaseCommand = require('../base-command.js')
22
33class Birthday extends BaseCommand {
44 static name = 'birthday'
5+ static description = 'Birthday'
56 static ignoreImplicitWorkspace = true
67 static isShellout = true
78
Original file line number Diff line number Diff line change @@ -68,6 +68,15 @@ Options:
6868Run "npm help bin" for more info
6969`
7070
71+ exports [ `test/lib/load-all-commands.js TAP load each command birthday > must match snapshot 1` ] = `
72+ Birthday
73+
74+ Usage:
75+ npm birthday
76+
77+ Run "npm help birthday" for more info
78+ `
79+
7180exports [ `test/lib/load-all-commands.js TAP load each command bugs > must match snapshot 1` ] = `
7281Report bugs for a package in a web browser
7382
@@ -348,6 +357,18 @@ alias: hlep
348357Run "npm help help" for more info
349358`
350359
360+ exports [ `test/lib/load-all-commands.js TAP load each command help-search > must match snapshot 1` ] = `
361+ Search npm help documentation
362+
363+ Usage:
364+ npm help-search <text>
365+
366+ Options:
367+ [-l|--long]
368+
369+ Run "npm help help-search" for more info
370+ `
371+
351372exports [ `test/lib/load-all-commands.js TAP load each command hook > must match snapshot 1` ] = `
352373Manage registry hooks
353374
Original file line number Diff line number Diff line change 55const t = require ( 'tap' )
66const util = require ( 'util' )
77const { load : loadMockNpm } = require ( '../fixtures/mock-npm.js' )
8- const { cmdList } = require ( '../../lib/utils/cmd-list.js' )
8+ const { cmdList, plumbing } = require ( '../../lib/utils/cmd-list.js' )
9+ const allCmds = [ ...cmdList , ...plumbing ]
910
1011t . test ( 'load each command' , async t => {
11- t . plan ( cmdList . length )
12- for ( const cmd of cmdList . sort ( ( a , b ) => a . localeCompare ( b , 'en' ) ) ) {
12+ t . plan ( allCmds . length )
13+ for ( const cmd of allCmds . sort ( ( a , b ) => a . localeCompare ( b , 'en' ) ) ) {
1314 t . test ( cmd , async t => {
1415 const { npm, outputs } = await loadMockNpm ( t , {
1516 config : { usage : true } ,
You can’t perform that action at this time.
0 commit comments