Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6de88bc

Browse filesBrowse files
Trotttargos
authored andcommitted
test: adjust CLI flags test to ignore blank lines in doc
PR-URL: #40403 Backport-PR-URL: #40530 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 8226690 commit 6de88bc
Copy full SHA for 6de88bc

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-process-env-allowed-flags-are-documented.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-env-allowed-flags-are-documented.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ const parseSection = (text, startMarker, endMarker) => {
1515
const match = text.match(regExp);
1616
assert(match,
1717
`Unable to locate text between '${startMarker}' and '${endMarker}'.`);
18-
return match[1].split(/\r?\n/);
18+
return match[1]
19+
.split(/\r?\n/)
20+
.filter((val) => val.trim() !== '');
1921
};
2022

2123
const nodeOptionsLines = parseSection(cliText,
@@ -24,6 +26,7 @@ const nodeOptionsLines = parseSection(cliText,
2426
const v8OptionsLines = parseSection(cliText,
2527
'<!-- node-options-v8 start -->',
2628
'<!-- node-options-v8 end -->');
29+
2730
// Check the options are documented in alphabetical order.
2831
assert.deepStrictEqual(nodeOptionsLines, [...nodeOptionsLines].sort());
2932
assert.deepStrictEqual(v8OptionsLines, [...v8OptionsLines].sort());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.