Skip to content

Commit

Permalink
fixup! test: ensure that CLI options are alphabetical
Browse files Browse the repository at this point in the history
  • Loading branch information
RedYetiDev committed Nov 9, 2024
1 parent 6369aa2 commit 110545d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-cli-node-options-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ for (const [, envVar, config] of nodeOptionsCC.matchAll(addOptionRE)) {
const end = /^## Environment variables/m;
const filteredCLIText = cliText.slice(cliText.search(start), cliText.search(end)).trim();
const cliOptionPattern = /^### `(--[a-zA-Z0-9-]+)`/mg;
const options = Array.from(filteredCLIText.matchAll(cliOptionPattern)).map(match => match[1]);
const options = Array.from(filteredCLIText.matchAll(cliOptionPattern)).map((match) => match[1]);

const sortedOptions = [...options].sort();
/* eslint-disable no-restricted-syntax */
assert.deepStrictEqual(options, sortedOptions, 'CLI options are not in alphabetical order');

}
Expand Down

0 comments on commit 110545d

Please sign in to comment.