diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index b5f762bdfb3d..f85365c02377 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -62,7 +62,7 @@ jobs: # #8073 test - name: Run Tests (PRETTIER_FALLBACK_RESOLVE) - run: yarn test "tests_integration/__tests__/{config,plugin}-*.js" + run: yarn test "tests_integration/__tests__/(config|plugin)" env: PRETTIER_FALLBACK_RESOLVE: true diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 32fe9e7f7d97..b4a19447c082 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -134,7 +134,7 @@ jobs: # #8073 test - name: Run Tests (PRETTIER_FALLBACK_RESOLVE) - run: yarn test "tests_integration/__tests__/{config,plugin}-*.js" + run: yarn test "tests_integration/__tests__/(config|plugin)" env: NODE_ENV: production PRETTIER_FALLBACK_RESOLVE: true diff --git a/src/common/resolve.js b/src/common/resolve.js index 6650644d2b1b..2c5093cd76bc 100644 --- a/src/common/resolve.js +++ b/src/common/resolve.js @@ -3,11 +3,7 @@ let { resolve } = eval("require"); // In the VS Code and Atom extension `require` is overridden and `require.resolve` doesn't support the 2nd argument. -if ( - /* istanbul ignore next */ - resolve.length === 1 || - process.env.PRETTIER_FALLBACK_RESOLVE -) { +if (resolve.length === 1 || process.env.PRETTIER_FALLBACK_RESOLVE) { resolve = (id, options) => { let basedir; if (options && options.paths && options.paths.length === 1) {