summaryrefslogtreecommitdiff
path: root/test/parallel/test-eslint-prefer-common-mustnotcall.js
diff options
context:
space:
mode:
authorMyles Borins <mylesborins@google.com>2018-02-15 18:47:10 -0500
committerMyles Borins <mylesborins@google.com>2018-02-26 12:19:57 -0500
commit474d7763d97d27b28cdf80324c60a5d0a2375fed (patch)
treed68e70c147823d2be069584b609611510dc513cc /test/parallel/test-eslint-prefer-common-mustnotcall.js
parent8cc0ea78d72c7ebb48afc687f3190b15b07058f0 (diff)
downloadnode-new-474d7763d97d27b28cdf80324c60a5d0a2375fed.tar.gz
test: add common.skipIfEslintMissing
We've added a number of tests that hook into ESLint which can error when running the test suite with the distributed tarball. This PR adds a new test helper `common.skipIfEslintMissing` and will skip remaining tests in a file when `ESLint` is not available at `tools/node_modules/eslint` PR-URL: https://github.com/nodejs/node/pull/18807 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'test/parallel/test-eslint-prefer-common-mustnotcall.js')
-rw-r--r--test/parallel/test-eslint-prefer-common-mustnotcall.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parallel/test-eslint-prefer-common-mustnotcall.js b/test/parallel/test-eslint-prefer-common-mustnotcall.js
index 848e762ce3..48ddaf430c 100644
--- a/test/parallel/test-eslint-prefer-common-mustnotcall.js
+++ b/test/parallel/test-eslint-prefer-common-mustnotcall.js
@@ -1,6 +1,8 @@
'use strict';
-require('../common');
+const common = require('../common');
+
+common.skipIfEslintMissing();
const RuleTester = require('../../tools/eslint').RuleTester;
const rule = require('../../tools/eslint-rules/prefer-common-mustnotcall');