diff options
author | Gar <gar+gh@danger.computer> | 2021-06-23 18:27:48 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-06-23 20:25:53 +0300 |
commit | f3dce0917088dc37795af39e7f6b5089beff984c (patch) | |
tree | 742f37c6188d55248274405888e873e50e216cff /test/lib/utils/config | |
parent | 400f75772df8f2922486abbbc95ddae04f8e9c85 (diff) |
chore(config): snapshot config descriptions
We had tied the usage of commands to snapshots, but not the full config
descriptions. This will prevent us from landing changes to the config
descriptions that don't also result in rebuilt `.md` help docs.
Closes https://github.com/npm/statusboard/issues/374
PR-URL: https://github.com/npm/cli/pull/3459
Credit: @wraithgar
Close: #3459
Reviewed-by: @nlf
Diffstat (limited to 'test/lib/utils/config')
-rw-r--r-- | test/lib/utils/config/definitions.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lib/utils/config/definitions.js b/test/lib/utils/config/definitions.js index a87698c18..8724f0e3b 100644 --- a/test/lib/utils/config/definitions.js +++ b/test/lib/utils/config/definitions.js @@ -17,6 +17,11 @@ const defpath = '../../../../lib/utils/config/definitions.js' delete process.env.NODE_ENV const definitions = require(defpath) +// Tie the definitions to a snapshot so that if they change we are forced to +// update snapshots, which rebuilds the docs +for (const key of Object.keys(definitions)) + t.matchSnapshot(definitions[key].describe(), `config description for ${key}`) + const isWin = '../../../../lib/utils/is-windows.js' // snapshot these just so we note when they change |