Skip to content

Commit

Permalink
Prevent plugin search on format test (#12322)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Mar 15, 2022
1 parent f3917a3 commit 935d767
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/config/format-test.js
Expand Up @@ -228,6 +228,8 @@ function runSpec(fixtures, parsers, options) {
describe(title, () => {
const formatOptions = {
printWidth: 80,
// Should not search plugins by default
pluginSearchDirs: false,
...options,
filepath: filename,
parser,
Expand Down
5 changes: 5 additions & 0 deletions tests/config/utils/create-snapshot.js
Expand Up @@ -25,10 +25,15 @@ function printOptions(options) {
filepath,
errors,
parser,
pluginSearchDirs,

...snapshotOptions
} = options;

if (pluginSearchDirs !== false) {
snapshotOptions.pluginSearchDirs = pluginSearchDirs;
}

const keys = Object.keys(snapshotOptions).sort();
return keys
.map((key) => `${key}: ${stringify(snapshotOptions[key])}`)
Expand Down

0 comments on commit 935d767

Please sign in to comment.