diff --git a/test/doctool/test-doctool-html.js b/test/doctool/test-doctool-html.js
index 91b9e0de6d3777..bd21e21d9563d2 100644
--- a/test/doctool/test-doctool-html.js
+++ b/test/doctool/test-doctool-html.js
@@ -5,6 +5,13 @@ const assert = require('assert');
const fs = require('fs');
const path = require('path');
+// The doctool currently uses js-yaml from the tool/eslint/ tree.
+try {
+ require('../../tools/eslint/node_modules/js-yaml');
+} catch (e) {
+ return common.skip('missing js-yaml (eslint not present)');
+}
+
const processIncludes = require('../../tools/doc/preprocess.js');
const html = require('../../tools/doc/html.js');
diff --git a/test/doctool/test-doctool-json.js b/test/doctool/test-doctool-json.js
index 7b9fbeb019f1e1..520c79bef8bcda 100644
--- a/test/doctool/test-doctool-json.js
+++ b/test/doctool/test-doctool-json.js
@@ -5,6 +5,13 @@ const assert = require('assert');
const fs = require('fs');
const path = require('path');
+// The doctool currently uses js-yaml from the tool/eslint/ tree.
+try {
+ require('../../tools/eslint/node_modules/js-yaml');
+} catch (e) {
+ return common.skip('missing js-yaml (eslint not present)');
+}
+
const json = require('../../tools/doc/json.js');
// Outputs valid json with the expected fields when given simple markdown