Skip to content

Commit 4c8676b

Browse files
hiroppyitaloacasas
authored andcommitted
test: refactor test-doctool-html.js
PR-URL: #10696 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 09ac2a2 commit 4c8676b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/doctool/test-doctool-html.js

+1-1
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

test/doctool/test-doctool-json.js

+4-4
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)