From 07f0bb16562ae58b1738b8f0784c5dfd44de789c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 6 Dec 2021 21:19:51 -0800 Subject: [PATCH] test: skip ESLint tests if no Intl ESLint dependency now requires Intl because it uses regexp unicode character properties. Fixes: https://github.com/nodejs/node/issues/41102 --- test/parallel/test-eslint-alphabetize-errors.js | 5 +++-- test/parallel/test-eslint-async-iife-no-unused-result.js | 5 +++-- test/parallel/test-eslint-crypto-check.js | 5 +++-- test/parallel/test-eslint-documented-errors.js | 5 +++-- test/parallel/test-eslint-duplicate-requires.js | 5 +++-- test/parallel/test-eslint-eslint-check.js | 5 +++-- test/parallel/test-eslint-inspector-check.js | 5 +++-- test/parallel/test-eslint-lowercase-name-for-primitive.js | 5 +++-- test/parallel/test-eslint-no-array-destructuring.js | 5 +++-- test/parallel/test-eslint-no-unescaped-regexp-dot.js | 5 +++-- test/parallel/test-eslint-non-ascii-character.js | 5 +++-- test/parallel/test-eslint-prefer-assert-iferror.js | 5 +++-- test/parallel/test-eslint-prefer-assert-methods.js | 5 +++-- test/parallel/test-eslint-prefer-common-mustnotcall.js | 5 +++-- test/parallel/test-eslint-prefer-common-mustsucceed.js | 5 +++-- test/parallel/test-eslint-prefer-primordials.js | 5 +++-- test/parallel/test-eslint-prefer-util-format-errors.js | 5 +++-- test/parallel/test-eslint-require-common-first.js | 5 +++-- test/parallel/test-eslint-required-modules.js | 5 +++-- 19 files changed, 57 insertions(+), 38 deletions(-) diff --git a/test/parallel/test-eslint-alphabetize-errors.js b/test/parallel/test-eslint-alphabetize-errors.js index df822f274095..770602353a75 100644 --- a/test/parallel/test-eslint-alphabetize-errors.js +++ b/test/parallel/test-eslint-alphabetize-errors.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); const RuleTester = require('../../tools/node_modules/eslint').RuleTester; diff --git a/test/parallel/test-eslint-async-iife-no-unused-result.js b/test/parallel/test-eslint-async-iife-no-unused-result.js index 6e7f60c183b8..c462a22ed2b0 100644 --- a/test/parallel/test-eslint-async-iife-no-unused-result.js +++ b/test/parallel/test-eslint-async-iife-no-unused-result.js @@ -1,7 +1,8 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); const RuleTester = require('../../tools/node_modules/eslint').RuleTester; diff --git a/test/parallel/test-eslint-crypto-check.js b/test/parallel/test-eslint-crypto-check.js index 164149131a97..37089371a565 100644 --- a/test/parallel/test-eslint-crypto-check.js +++ b/test/parallel/test-eslint-crypto-check.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-documented-errors.js b/test/parallel/test-eslint-documented-errors.js index e8abd38a983e..6999c06986ef 100644 --- a/test/parallel/test-eslint-documented-errors.js +++ b/test/parallel/test-eslint-documented-errors.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); const RuleTester = require('../../tools/node_modules/eslint').RuleTester; diff --git a/test/parallel/test-eslint-duplicate-requires.js b/test/parallel/test-eslint-duplicate-requires.js index 5932fac48e09..bbb3be981aec 100644 --- a/test/parallel/test-eslint-duplicate-requires.js +++ b/test/parallel/test-eslint-duplicate-requires.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-eslint-check.js b/test/parallel/test-eslint-eslint-check.js index 28ec2e1f10fd..3e0162bf2cda 100644 --- a/test/parallel/test-eslint-eslint-check.js +++ b/test/parallel/test-eslint-eslint-check.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-inspector-check.js b/test/parallel/test-eslint-inspector-check.js index 2d945c3da331..e6969e80eefc 100644 --- a/test/parallel/test-eslint-inspector-check.js +++ b/test/parallel/test-eslint-inspector-check.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); const RuleTester = require('../../tools/node_modules/eslint').RuleTester; diff --git a/test/parallel/test-eslint-lowercase-name-for-primitive.js b/test/parallel/test-eslint-lowercase-name-for-primitive.js index 11cba8f3f8e6..24b42001a4a9 100644 --- a/test/parallel/test-eslint-lowercase-name-for-primitive.js +++ b/test/parallel/test-eslint-lowercase-name-for-primitive.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-no-array-destructuring.js b/test/parallel/test-eslint-no-array-destructuring.js index be59ee693097..d26e32a03e65 100644 --- a/test/parallel/test-eslint-no-array-destructuring.js +++ b/test/parallel/test-eslint-no-array-destructuring.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-no-unescaped-regexp-dot.js b/test/parallel/test-eslint-no-unescaped-regexp-dot.js index 7cf69877ca12..1443c6f862c9 100644 --- a/test/parallel/test-eslint-no-unescaped-regexp-dot.js +++ b/test/parallel/test-eslint-no-unescaped-regexp-dot.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-non-ascii-character.js b/test/parallel/test-eslint-non-ascii-character.js index 0b4a09f81343..d1e3b0227eef 100644 --- a/test/parallel/test-eslint-non-ascii-character.js +++ b/test/parallel/test-eslint-non-ascii-character.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-prefer-assert-iferror.js b/test/parallel/test-eslint-prefer-assert-iferror.js index 5ccb7883393f..2bbcc9021b68 100644 --- a/test/parallel/test-eslint-prefer-assert-iferror.js +++ b/test/parallel/test-eslint-prefer-assert-iferror.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-prefer-assert-methods.js b/test/parallel/test-eslint-prefer-assert-methods.js index 3271f6ab1856..91380364b185 100644 --- a/test/parallel/test-eslint-prefer-assert-methods.js +++ b/test/parallel/test-eslint-prefer-assert-methods.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-prefer-common-mustnotcall.js b/test/parallel/test-eslint-prefer-common-mustnotcall.js index 5c360bb1ecbe..d6796b504c1d 100644 --- a/test/parallel/test-eslint-prefer-common-mustnotcall.js +++ b/test/parallel/test-eslint-prefer-common-mustnotcall.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-prefer-common-mustsucceed.js b/test/parallel/test-eslint-prefer-common-mustsucceed.js index 302b6a0bee4f..9b47a350e922 100644 --- a/test/parallel/test-eslint-prefer-common-mustsucceed.js +++ b/test/parallel/test-eslint-prefer-common-mustsucceed.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-prefer-primordials.js b/test/parallel/test-eslint-prefer-primordials.js index aa7f1940675f..61b6b6327279 100644 --- a/test/parallel/test-eslint-prefer-primordials.js +++ b/test/parallel/test-eslint-prefer-primordials.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-prefer-util-format-errors.js b/test/parallel/test-eslint-prefer-util-format-errors.js index a6c2662a3824..8a717f0da1f5 100644 --- a/test/parallel/test-eslint-prefer-util-format-errors.js +++ b/test/parallel/test-eslint-prefer-util-format-errors.js @@ -3,8 +3,9 @@ /* eslint-disable no-template-curly-in-string */ const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-require-common-first.js b/test/parallel/test-eslint-require-common-first.js index b3d132e11fdc..83fbbba72c3c 100644 --- a/test/parallel/test-eslint-require-common-first.js +++ b/test/parallel/test-eslint-require-common-first.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing(); diff --git a/test/parallel/test-eslint-required-modules.js b/test/parallel/test-eslint-required-modules.js index c891e2350711..a27409c0f9ea 100644 --- a/test/parallel/test-eslint-required-modules.js +++ b/test/parallel/test-eslint-required-modules.js @@ -1,8 +1,9 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); +if ((!common.hasCrypto) || (!common.hasIntl)) { + common.skip('ESLint tests require crypto and Intl'); +} common.skipIfEslintMissing();