From fb939844454818055434b0635d1482d737662415 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Fri, 11 May 2018 17:04:12 +0300 Subject: test: modernize and correct test-doctool-html.js PR-URL: https://github.com/nodejs/node/pull/20676 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- test/doctool/test-doctool-html.js | 59 +++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 34 deletions(-) (limited to 'test/doctool') diff --git a/test/doctool/test-doctool-html.js b/test/doctool/test-doctool-html.js index 91a18d536a..185faa46f7 100644 --- a/test/doctool/test-doctool-html.js +++ b/test/doctool/test-doctool-html.js @@ -9,16 +9,16 @@ try { } const assert = require('assert'); -const fs = require('fs'); +const { readFile } = require('fs'); const fixtures = require('../common/fixtures'); const processIncludes = require('../../tools/doc/preprocess.js'); -const html = require('../../tools/doc/html.js'); +const toHTML = require('../../tools/doc/html.js'); // Test data is a list of objects with two properties. // The file property is the file path. -// The html property is some html which will be generated by the doctool. -// This html will be stripped of all whitespace because we don't currently -// have an html parser. +// The html property is some HTML which will be generated by the doctool. +// This HTML will be stripped of all whitespace because we don't currently +// have an HTML parser. const testData = [ { file: fixtures.path('sample_document.md'), @@ -32,8 +32,7 @@ const testData = [ 'id="foo_class_method_buffer_from_array"># ' + '' + 'Reference/Global_Objects/Array" class="type"><Array>' }, { file: fixtures.path('doc_with_yaml.md'), @@ -45,42 +44,34 @@ const testData = [ ' ' + '

Describe Foobar in more detail here.

' + '

Foobar II#

' + - ' ' + '

Describe Foobar II in more detail here.' + 'fg(1)

' + '

Deprecated thingy#' + - '

' + - '