summaryrefslogtreecommitdiff
path: root/test/doctool
diff options
context:
space:
mode:
authorMiguel Angel Asencio Hurtado <maasencioh@gmail.com>2017-08-09 19:29:40 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2017-08-27 21:14:34 -0300
commit9a5c3cf185c6e9c4fb9264cf8e61a74a5d697ff9 (patch)
treea053ea27d73238b5b50f88503925b90aacf04537 /test/doctool
parent53c5bf546e8e52db5b11287ab3bf1375819b369b (diff)
downloadnode-new-9a5c3cf185c6e9c4fb9264cf8e61a74a5d697ff9.tar.gz
test: continue normalizing fixtures use
PR-URL: https://github.com/nodejs/node/pull/14716 Refs: https://github.com/nodejs/node/pull/14332 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Diffstat (limited to 'test/doctool')
-rw-r--r--test/doctool/test-doctool-html.js11
-rw-r--r--test/doctool/test-doctool-json.js8
2 files changed, 10 insertions, 9 deletions
diff --git a/test/doctool/test-doctool-html.js b/test/doctool/test-doctool-html.js
index 64f1d7f8b1..9a4300a5d0 100644
--- a/test/doctool/test-doctool-html.js
+++ b/test/doctool/test-doctool-html.js
@@ -11,6 +11,7 @@ try {
const assert = require('assert');
const fs = require('fs');
const path = require('path');
+const fixtures = require('../common/fixtures');
const processIncludes = require('../../tools/doc/preprocess.js');
const html = require('../../tools/doc/html.js');
@@ -21,12 +22,12 @@ const html = require('../../tools/doc/html.js');
// have an html parser.
const testData = [
{
- file: path.join(common.fixturesDir, 'sample_document.md'),
+ file: fixtures.path('sample_document.md'),
html: '<ol><li>fish</li><li><p>fish</p></li><li><p>Redfish</p></li>' +
'<li>Bluefish</li></ol>'
},
{
- file: path.join(common.fixturesDir, 'order_of_end_tags_5873.md'),
+ file: fixtures.path('order_of_end_tags_5873.md'),
html: '<h3>ClassMethod: Buffer.from(array) <span> ' +
'<a class="mark" href="#foo_class_method_buffer_from_array" ' +
'id="foo_class_method_buffer_from_array">#</a> </span> </h3><div' +
@@ -36,7 +37,7 @@ const testData = [
'</ul></div>'
},
{
- file: path.join(common.fixturesDir, 'doc_with_yaml.md'),
+ file: fixtures.path('doc_with_yaml.md'),
html: '<h1>Sample Markdown with YAML info' +
'<span><a class="mark" href="#foo_sample_markdown_with_yaml_info" ' +
' id="foo_sample_markdown_with_yaml_info">#</a></span></h1>' +
@@ -72,7 +73,7 @@ const testData = [
'</p>'
},
{
- file: path.join(common.fixturesDir, 'doc_with_includes.md'),
+ file: fixtures.path('doc_with_includes.md'),
html: '<!-- [start-include:doc_inc_1.md] -->' +
'<p>Look <a href="doc_inc_2.html#doc_inc_2_foobar">here</a>!</p>' +
'<!-- [end-include:doc_inc_1.md] -->' +
@@ -83,7 +84,7 @@ const testData = [
'<!-- [end-include:doc_inc_2.md] -->'
},
{
- file: path.join(common.fixturesDir, 'sample_document.md'),
+ file: fixtures.path('sample_document.md'),
html: '<ol><li>fish</li><li><p>fish</p></li><li><p>Redfish</p></li>' +
'<li>Bluefish</li></ol>',
analyticsId: 'UA-67020396-1'
diff --git a/test/doctool/test-doctool-json.js b/test/doctool/test-doctool-json.js
index 4a4d3a895c..1be086c3a6 100644
--- a/test/doctool/test-doctool-json.js
+++ b/test/doctool/test-doctool-json.js
@@ -10,7 +10,7 @@ try {
const assert = require('assert');
const fs = require('fs');
-const path = require('path');
+const fixtures = require('../common/fixtures');
const json = require('../../tools/doc/json.js');
// Outputs valid json with the expected fields when given simple markdown
@@ -19,7 +19,7 @@ const json = require('../../tools/doc/json.js');
// The json property is some json which will be generated by the doctool.
const testData = [
{
- file: path.join(common.fixturesDir, 'sample_document.md'),
+ file: fixtures.path('sample_document.md'),
json: {
source: 'foo',
modules: [{
@@ -39,7 +39,7 @@ const testData = [
}
},
{
- file: path.join(common.fixturesDir, 'order_of_end_tags_5873.md'),
+ file: fixtures.path('order_of_end_tags_5873.md'),
json: {
source: 'foo',
modules: [{
@@ -76,7 +76,7 @@ const testData = [
}
},
{
- file: path.join(common.fixturesDir, 'doc_with_yaml.md'),
+ file: fixtures.path('doc_with_yaml.md'),
json: {
source: 'foo',
modules: [