Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: refactor test-doctool-json.js
  • Loading branch information
abouthiroppy
abouthiroppy committed Jan 8, 2017
commit 27a85b5d225eda767bd0c8ff319074fdd30dd045
8 changes: 4 additions & 4 deletions test/doctool/test-doctool-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const json = require('../../tools/doc/json.js');
// Test data is a list of objects with two properties.
// The file property is the file path.
// The json property is some json which will be generated by the doctool.
var testData = [
const testData = [
{
file: path.join(common.fixturesDir, 'sample_document.md'),
json: {
Expand Down Expand Up @@ -136,10 +136,10 @@ var testData = [
}
];

testData.forEach(function(item) {
fs.readFile(item.file, 'utf8', common.mustCall(function(err, input) {
testData.forEach((item) => {
fs.readFile(item.file, 'utf8', common.mustCall((err, input) => {
assert.ifError(err);
json(input, 'foo', common.mustCall(function(err, output) {
json(input, 'foo', common.mustCall((err, output) => {
assert.ifError(err);
assert.deepStrictEqual(output, item.json);
}));
Expand Down