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 4c8676b

Browse filesBrowse files
hiroppyItalo A. Casas
authored andcommitted
test: refactor test-doctool-html.js
PR-URL: #10696 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 09ac2a2 commit 4c8676b
Copy full SHA for 4c8676b

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+5
-5
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
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const testData = [
7474
},
7575
];
7676

77-
testData.forEach(function(item) {
77+
testData.forEach((item) => {
7878
// Normalize expected data by stripping whitespace
7979
const expected = item.html.replace(/\s/g, '');
8080

Collapse file

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

Copy file name to clipboardExpand all lines: test/doctool/test-doctool-json.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const json = require('../../tools/doc/json.js');
1818
// Test data is a list of objects with two properties.
1919
// The file property is the file path.
2020
// The json property is some json which will be generated by the doctool.
21-
var testData = [
21+
const testData = [
2222
{
2323
file: path.join(common.fixturesDir, 'sample_document.md'),
2424
json: {
@@ -136,10 +136,10 @@ var testData = [
136136
}
137137
];
138138

139-
testData.forEach(function(item) {
140-
fs.readFile(item.file, 'utf8', common.mustCall(function(err, input) {
139+
testData.forEach((item) => {
140+
fs.readFile(item.file, 'utf8', common.mustCall((err, input) => {
141141
assert.ifError(err);
142-
json(input, 'foo', common.mustCall(function(err, output) {
142+
json(input, 'foo', common.mustCall((err, output) => {
143143
assert.ifError(err);
144144
assert.deepStrictEqual(output, item.json);
145145
}));

0 commit comments

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