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 223c0e2

Browse filesBrowse files
addaleaxMyles Borins
authored andcommitted
test: skip doctool tests when js-yaml is missing
Skip the doctool tests when js-yaml, which is currently `require()`d from the eslint source tree, is missing. This can happen, for example, because eslint is not included in the release source tarballs. Fixes: #7201 Ref: #6495 PR-URL: #7218 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent 8a7c5fd commit 223c0e2
Copy full SHA for 223c0e2

File tree

Expand file treeCollapse file tree

2 files changed

+14
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-0
lines changed
Open diff view settings
Collapse file

‎test/doctool/test-doctool-html.js‎

Copy file name to clipboardExpand all lines: test/doctool/test-doctool-html.js
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ const assert = require('assert');
55
const fs = require('fs');
66
const path = require('path');
77

8+
// The doctool currently uses js-yaml from the tool/eslint/ tree.
9+
try {
10+
require('../../tools/eslint/node_modules/js-yaml');
11+
} catch (e) {
12+
return common.skip('missing js-yaml (eslint not present)');
13+
}
14+
815
const processIncludes = require('../../tools/doc/preprocess.js');
916
const html = require('../../tools/doc/html.js');
1017

Collapse file

‎test/doctool/test-doctool-json.js‎

Copy file name to clipboardExpand all lines: test/doctool/test-doctool-json.js
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ const assert = require('assert');
55
const fs = require('fs');
66
const path = require('path');
77

8+
// The doctool currently uses js-yaml from the tool/eslint/ tree.
9+
try {
10+
require('../../tools/eslint/node_modules/js-yaml');
11+
} catch (e) {
12+
return common.skip('missing js-yaml (eslint not present)');
13+
}
14+
815
const json = require('../../tools/doc/json.js');
916

1017
// Outputs valid json with the expected fields when given simple markdown

0 commit comments

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