From 1cab8f4fd6c0b4ddb29557711d27267171eb735f Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Wed, 12 Apr 2023 21:09:24 +0300 Subject: [PATCH] chore: fix eslint --- .eslintignore | 26 +++---- .github/ISSUE_TEMPLATE.md | 2 +- .github/ISSUE_TEMPLATE/Bug_report.md | 7 +- .github/ISSUE_TEMPLATE/Feature_request.md | 4 -- .github/ISSUE_TEMPLATE/Other.md | 1 - .github/PULL_REQUEST_TEMPLATE.md | 8 ++- .github/PULL_REQUEST_TEMPLATE_ORIGINAL.md | 1 - .prettierignore | 26 +++++-- assembly/tsconfig.json | 4 +- package.json | 15 ++-- test/README.md | 29 +++++--- test/cases/chunks/runtime/test.filter.js | 2 +- .../chunks/weird-reference-to-entry/errors.js | 4 +- test/cases/compile/error-hide-stack/errors.js | 5 +- test/cases/context/issue-5750/warnings.js | 2 +- .../errors/case-sensitive/test.filter.js | 2 +- test/cases/errors/case-sensitive/warnings.js | 12 +++- .../errors/crash-missing-import/errors.js | 4 +- .../errors/harmony-import-missing/errors.js | 6 +- test/cases/errors/load-module-error/errors.js | 9 +-- .../errors/loader-error-warning/errors.js | 12 +--- .../errors/loader-error-warning/warnings.js | 6 +- test/cases/loaders/no-string/errors.js | 10 ++- .../mjs/namespace-object-lazy/test.filter.js | 2 +- .../test.filter.js | 2 +- .../test.filter.js | 2 +- .../side-effects-all-used/test.filter.js | 2 +- .../test.filter.js | 2 +- .../test.filter.js | 2 +- .../side-effects-root-unused/test.filter.js | 2 +- .../side-effects-simple-unused/test.filter.js | 2 +- .../test.filter.js | 2 +- test/cases/parsing/asi/warnings.js | 4 +- test/cases/parsing/es2022/test.filter.js | 2 +- test/cases/parsing/extract-amd/warnings.js | 2 +- test/cases/parsing/extract-require/errors.js | 6 +- .../test.filter.js | 2 +- .../harmony-export-precedence/warnings.js | 4 +- test/cases/parsing/issue-2006/errors.js | 4 +- test/cases/parsing/issue-2600/errors.js | 4 +- test/cases/parsing/issue-2641/errors.js | 4 +- test/cases/parsing/issue-627/warnings.js | 4 +- test/cases/parsing/issue-7519/test.filter.js | 2 +- test/cases/parsing/issue-758/errors.js | 4 +- .../parsing/logical-assignment/test.filter.js | 2 +- .../optional-catch-binding/test.filter.js | 2 +- test/cases/parsing/spread/test.filter.js | 2 +- test/cases/resolving/browser-field/errors.js | 2 +- test/cases/runtime/error-handling/errors.js | 6 +- test/cases/runtime/error-handling/warnings.js | 6 +- .../missing-module-syntax-error/errors.js | 4 +- .../renaming-shorthand-5027/test.filter.js | 8 ++- test/cases/wasm/decoding/test.filter.js | 2 +- .../export-imported-global/test.filter.js | 2 +- .../test.filter.js | 2 +- .../test.filter.js | 2 +- .../wasm/import-wasm-wasm/test.filter.js | 2 +- .../test.filter.js | 2 +- .../test.filter.js | 2 +- .../wasm/imports-circular/test.filter.js | 2 +- .../wasm/imports-complex-types/test.filter.js | 2 +- .../wasm/imports-many-direct/test.filter.js | 2 +- .../wasm/imports-multiple/test.filter.js | 2 +- test/cases/wasm/imports/test.filter.js | 2 +- test/cases/wasm/memory/test.filter.js | 2 +- test/cases/wasm/order/test.filter.js | 2 +- test/cases/wasm/simple/test.filter.js | 2 +- test/cases/wasm/table/test.filter.js | 2 +- .../wasm/two-files-loader/test.filter.js | 2 +- test/cases/wasm/unused-export/test.filter.js | 2 +- test/cases/wasm/v128/test.filter.js | 6 +- .../test.filter.js | 2 +- .../test.filter.js | 2 +- .../asset-modules/http-url/test.config.js | 8 ++- .../chunk-graph/issue-9634/test.config.js | 2 +- .../order-multiple-entries/test.config.js | 2 +- .../require-context-id/warnings.js | 4 +- .../compiletime/error-not-found/errors.js | 4 +- .../compiletime/warn-not-found/warnings.js | 4 +- .../load-chunk-function/test.config.js | 2 +- .../split-chunk-entry-module/test.config.js | 2 +- .../contenthash/assets/test.config.js | 6 +- .../include-chunk-id/test.config.js | 2 +- .../contenthash/salt/test.config.js | 2 +- .../delegated-hash/simple/warnings.js | 4 +- .../3-use-dll-with-hashid/warnings.js | 4 +- .../test.config.js | 7 +- .../entry/depend-on-simple/test.config.js | 2 +- .../entry/descriptor/test.config.js | 7 +- .../entry/function-promise/test.config.js | 7 +- .../configCases/entry/function/test.config.js | 7 +- .../errors/entry-not-found/errors.js | 4 +- .../errors/import-missing/errors.js | 4 +- .../multi-entry-missing-module/test.config.js | 8 +-- .../externals-in-commons-chunk/test.config.js | 7 +- .../externals-system-custom/test.config.js | 8 +-- .../issues/issue-14974/test.filter.js | 2 +- .../issues/issue-7563/test.config.js | 6 +- .../loaders/issue-3320/deprecations.js | 6 +- .../hashed-module-ids/warnings.js | 4 +- .../test.config.js | 7 +- .../test.config.js | 8 +-- .../output/function/test.config.js | 7 +- .../output/inner-dirs-entries/test.config.js | 2 +- .../test.config.js | 6 +- .../output/publicPath-web/test.config.js | 7 +- test/configCases/output/string/test.config.js | 6 +- .../parsing/issue-2942/warnings.js | 2 +- .../parsing/issue-9042/test.config.js | 2 +- .../node-stuff-plugin-off/test.config.js | 2 +- .../many-async-imports/test.filter.js | 2 +- .../performance/many-exports/test.filter.js | 2 +- .../banner-plugin-hashing/test.config.js | 4 +- .../plugins/environment-plugin/errors.js | 71 ++++++++++++------- .../plugins/profiling-plugin/test.filter.js | 2 +- .../test.filter.js | 2 +- .../correct-order/test.config.js | 7 +- .../extract-async-from-entry/test.config.js | 6 +- .../hot-multi/test.config.js | 8 +-- .../split-chunks-common/hot/test.config.js | 7 +- .../inverted-order/test.config.js | 7 +- .../issue-12128/test.config.js | 8 +-- .../library/test.config.js | 13 ++-- .../move-entry/test.config.js | 7 +- .../move-to-grandparent/test.config.js | 7 +- .../split-chunks-common/simple/test.config.js | 7 +- .../target-node/test.config.js | 6 +- .../split-chunks/asnyc-entries/test.config.js | 2 +- .../split-chunks/asnyc-entries/test.filter.js | 1 + .../test.config.js | 2 +- .../chunk-filename-delimiter/test.config.js | 2 +- .../custom-filename-function/test.config.js | 2 +- .../test.config.js | 2 +- .../custom-filename/test.config.js | 2 +- .../split-chunks/entry-point-error/errors.js | 4 +- .../entry-point-error/test.config.js | 2 +- .../split-chunks/issue-8908/test.config.js | 2 +- .../split-chunks/issue-9491/test.config.js | 2 +- .../module-type-filter/test.config.js | 2 +- .../split-chunks/no-options/test.config.js | 2 +- .../reuse-chunk-name/test.config.js | 2 +- .../runtime-chunk-no-async/test.config.js | 2 +- .../split-chunks/runtime-chunk/test.config.js | 2 +- .../target/node-dynamic-import/test.filter.js | 2 +- test/configCases/wasm/bigints/test.filter.js | 2 +- .../export-imported-global/test.filter.js | 2 +- .../configCases/wasm/identical/test.filter.js | 2 +- .../wasm/import-wasm-wasm/test.filter.js | 2 +- .../test.filter.js | 2 +- .../node-source-future-defaults/warnings.js | 2 +- .../web/prefetch-split-chunks/test.config.js | 2 +- .../web/unique-jsonp/test.config.js | 2 +- .../worker/custom-worker/test.config.js | 2 +- .../worker/node-worker-named/test.config.js | 2 +- .../worker/web-worker/test.config.js | 2 +- .../worker/worker-contenthash/test.config.js | 2 +- .../test.filter.js | 2 +- .../missing-module/0/errors.js | 4 +- .../runtime/static-import/test.config.js | 5 +- .../warnings-contribute-to-hash/0/warnings.js | 4 +- .../warnings-contribute-to-hash/1/warnings.js | 4 +- test/watchCases/wasm/caching/test.filter.js | 2 +- 162 files changed, 347 insertions(+), 408 deletions(-) diff --git a/.eslintignore b/.eslintignore index 7810041df..f3afa1def 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,26 +1,28 @@ -# Ignore node_modules -node_modules +# Ignore some test files +test/**/*.* +!test/*.js +!test/**/webpack.config.js +!test/**/test.config.js +!test/**/test.filter.js +test/cases/parsing/es2022/test.filter.js +!test/**/errors.js +!test/**/warnings.js +!test/**/deprecations.js +!test/helpers/*.* # Ignore some folders benchmark coverage +# Ignore generated files +*.check.js + # Ignore not supported files -!.*.js -.eslintrc.js *.d.ts # Ignore precompiled schemas schemas/**/*.check.js -# Ignore some test files -test/* -!test/*Cases -!test/helpers -!test/*.js -test/*Cases/**/*.js -!test/*Cases/**/webpack.config.js - # Ignore some examples files examples/**/*.js !examples/*/webpack.config.js diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index ba313faa4..b329d1c9d 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -2,7 +2,7 @@ -**Do you want to request a *feature* or report a *bug*?** +**Do you want to request a _feature_ or report a _bug_?** diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 437637672..9a11068c5 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -15,10 +15,8 @@ about: Create a report to help us improve **What is the current behavior?** - **If the current behavior is a bug, please provide the steps to reproduce.** - @@ -28,12 +26,11 @@ about: Create a report to help us improve **What is the expected behavior?** - **Other relevant information:** webpack version: -Node.js version: -Operating System: +Node.js version: +Operating System: Additional tools: diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md index ff728e6db..704020c06 100644 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -1,7 +1,6 @@ --- name: Feature request about: Suggest an idea for this project - --- @@ -16,12 +15,9 @@ about: Suggest an idea for this project **What is the expected behavior?** - **What is motivation or use case for adding/changing the behavior?** - **How should this be implemented in your opinion?** - **Are you willing to work on this yourself?** yes diff --git a/.github/ISSUE_TEMPLATE/Other.md b/.github/ISSUE_TEMPLATE/Other.md index 033e88fca..5bda12d71 100644 --- a/.github/ISSUE_TEMPLATE/Other.md +++ b/.github/ISSUE_TEMPLATE/Other.md @@ -1,7 +1,6 @@ --- name: Other about: Something else - --- diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 65357e71d..c6b24d473 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,10 +4,14 @@ -## Summary +## Summary + + copilot:summary -## Details +## Details + + copilot:walkthrough diff --git a/.github/PULL_REQUEST_TEMPLATE_ORIGINAL.md b/.github/PULL_REQUEST_TEMPLATE_ORIGINAL.md index 8967c8f01..89efe54b7 100644 --- a/.github/PULL_REQUEST_TEMPLATE_ORIGINAL.md +++ b/.github/PULL_REQUEST_TEMPLATE_ORIGINAL.md @@ -2,7 +2,6 @@ - **What kind of change does this PR introduce?** diff --git a/.prettierignore b/.prettierignore index bf425289b..d4343e9f2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,14 +1,30 @@ package.json -# Ignore test fixtures -test/*.* +# Ignore some test files +test/**/*.* !test/*.js !test/**/webpack.config.js +!test/**/test.config.js +!test/**/test.filter.js +!test/**/errors.js +!test/**/warnings.js !test/**/deprecations.js +!test/*.md +!test/helpers/*.* -# Ignore example fixtures -examples/*.* -!examples/**/webpack.config.js +# Ignore some folders +benchmark/ +coverage/ # Ignore generated files *.check.js + +# Ignore not supported files +*.d.ts + +# Ignore precompiled schemas +schemas/**/*.check.js + +# Ignore example fixtures +examples/ +!examples/**/webpack.config.js diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json index 9cd498ea1..ec1985449 100644 --- a/assembly/tsconfig.json +++ b/assembly/tsconfig.json @@ -1,6 +1,4 @@ { "extends": "assemblyscript/std/assembly.json", - "include": [ - "./**/*.asm.ts" - ] + "include": ["./**/*.asm.ts"] } diff --git a/package.json b/package.json index 91e38fd52..7919859b1 100644 --- a/package.json +++ b/package.json @@ -150,7 +150,7 @@ "pretest": "yarn lint", "prelint": "yarn setup", "lint": "yarn code-lint && yarn special-lint && yarn type-lint && yarn typings-test && yarn module-typings-test && yarn yarn-lint && yarn pretty-lint && yarn spellcheck", - "code-lint": "eslint . --ext '.js' --cache", + "code-lint": "eslint --cache .", "type-lint": "tsc", "typings-test": "tsc -p tsconfig.types.test.json", "module-typings-test": "tsc -p tsconfig.module.test.json", @@ -159,9 +159,8 @@ "special-lint-fix": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-schemas --write && node tooling/generate-runtime-code.js --write && node tooling/generate-wasm-code.js --write && node node_modules/tooling/format-file-header --write && node node_modules/tooling/compile-to-definitions --write && node node_modules/tooling/precompile-schemas --write && node node_modules/tooling/generate-types --no-template-literals --write", "fix": "yarn code-lint --fix && yarn special-lint-fix && yarn pretty-lint-fix", "prepare": "husky install", - "pretty-lint-base": "prettier \"*.{ts,json,yml,yaml,md}\" \"{setup,lib,bin,hot,benchmark,tooling,schemas}/**/*.json\" \"examples/*.md\"", - "pretty-lint-base-all": "yarn pretty-lint-base \"*.js\" \"{setup,lib,bin,hot,benchmark,tooling,schemas}/**/*.js\" \"module.d.ts\" \"test/*.js\" \"test/helpers/*.js\" \"test/{configCases,watchCases,statsCases,hotCases,benchmarkCases}/**/webpack.config.js\" \"examples/**/webpack.config.js\"", - "pretty-lint-fix": "yarn pretty-lint-base-all --loglevel warn --write", + "pretty-lint-base": "prettier --cache .", + "pretty-lint-fix": "yarn pretty-lint-base --loglevel warn --write", "pretty-lint": "yarn pretty-lint-base --check", "yarn-lint": "yarn-deduplicate --fail --list -s highest yarn.lock", "yarn-lint-fix": "yarn-deduplicate -s highest yarn.lock", @@ -179,11 +178,11 @@ "cover:report": "nyc report -t coverage" }, "lint-staged": { - "*.js|{lib,setup,bin,hot,tooling,schemas}/**/*.js|test/*.js|{test,examples}/**/webpack.config.js}": [ - "eslint --cache" + "*.{js,cjs,mjs}": [ + "eslint --cache --fix" ], - "*.{ts,json,yml,yaml,md}|examples/*.md": [ - "prettier --check" + "*": [ + "prettier --cache --ignore-unknown" ], "*.md|{.github,benchmark,bin,examples,hot,lib,schemas,setup,tooling}/**/*.{md,yml,yaml,js,json}": [ "cspell" diff --git a/test/README.md b/test/README.md index 9f07e0b9f..f460a490b 100644 --- a/test/README.md +++ b/test/README.md @@ -1,20 +1,25 @@ # Welcome to the webpack test suite!!!! + Every pull request that you submit to webpack (besides README and spelling corrections in comments) requires tests that are created. But don't give up hope!!! Although our tests may appear complex and overwhelming, once you become familiar with the test suite and structure, adding and creating tests will be fun and beneficial as you work inside the codebase! ❤ ## tl;dr + Run all tests (this automatically runs the setup): + ```sh yarn test ``` Run an individual suite: + ```sh yarn jest ConfigTestCases ``` Watch mode: + ```sh yarn jest --watch ConfigTestCases ``` @@ -22,16 +27,20 @@ yarn jest --watch ConfigTestCases See also: [Jest CLI docs](https://jestjs.io/docs/cli) ## Test suite overview + We use Jest for our tests. For more information on Jest you can visit their [homepage](https://jestjs.io/)! ### Class Tests -All test files can be found in *.test.js. There are many tests that simply test APIs of a specific class/file (such as `Compiler`, `Errors`, Integration, `Parser`, `RuleSet`, Validation). + +All test files can be found in \*.test.js. There are many tests that simply test APIs of a specific class/file (such as `Compiler`, `Errors`, Integration, `Parser`, `RuleSet`, Validation). If the feature you are contributing involves one of those classes, then best to start there to understand the structure. ### xCases -In addition to Class specific tests, there are also directories that end in "Cases". The suites for these cases also have corresponding *.test.js files. + +In addition to Class specific tests, there are also directories that end in "Cases". The suites for these cases also have corresponding \*.test.js files. #### cases (`TestCases.test.js`) 1 + Cases are a set of general purpose tests that will run against a variety of permutations of webpack configurations. When you are making a general purpose change that doesn't require you to have a special configuration, you would likely add your tests here. Inside of the `./test/cases` directory you will find tests are broken into thematic sub directories. Take a moment to explore the different options. To add a new case, create a new directory inside of the top level test groups, and then add an `index.js` file (and any other supporting files). @@ -39,11 +48,13 @@ To add a new case, create a new directory inside of the top level test groups, a By default this file will be the entry point for the test suite and you can add your `it()`'s there. This will also become bundled so that node env support happens as well. #### configCases (`ConfigTestCases.basictest.js`) 1 + If you are trying to solve a bug which is reproducible when x and y properties are used together in a config, then configCases is the place to be!!!! In addition to an `index.js`, these configCases require a `webpack.config.js` is located inside of your test suite. This will run this specific config through `webpack` just as you were building individually. They will use the same loading/bundling technique of your `it()` tests, however you now have a more specific config use cases that you can write even before you start coding. #### statsCases (`StatsTestCases.basictest.js`) + Stats cases are similar to configCases except specifically focusing on the `expected` output of your stats. Instead of writing to the console, however the output of stats will be written to disk. By default, the "expected" outcome is a pain to write by hand so instead when statsCases are run, runner is checking output using jest's awesome snapshot functionality. @@ -52,21 +63,23 @@ Basically you don't need to write any expected behaviors yourself. The assumptio Please follow the approach described below: -* write your test code in `statsCases/` folder by creating a separate folder for it, for example `statsCases/some-file-import-stats/index.js` +- write your test code in `statsCases/` folder by creating a separate folder for it, for example `statsCases/some-file-import-stats/index.js` ```javascript import("./someModule"); ``` -* don't forget the `webpack.config.js` -* run the test -* jest will automatically add the output from your test code to `StatsTestCases.test.js.snap` and you can always check your results there -* Next time test will run -> runner will compare results against your output written to snapshot previously + +- don't forget the `webpack.config.js` +- run the test +- jest will automatically add the output from your test code to `StatsTestCases.test.js.snap` and you can always check your results there +- Next time test will run -> runner will compare results against your output written to snapshot previously You can read more about SnapShot testing [right here](https://jestjs.io/docs/snapshot-testing) ## Questions? Comments? + If you are still nervous or don't quite understand, please submit an issue and tag us in it, and provide a relevant PR while working on! - ## Footnotes + 1 webpack's parser supports the use of ES2015 features like arrow functions, harmony exports, etc. However as a library we follow Node.js' timeline for dropping older versions of node. Because of this we expect your tests on GitHub Actions to pass all the way back to NodeJS v10; Therefore if you would like specific tests that use these features to be ignored if they are not supported, then you should add a `test.filter.js` file. This allows you to import the syntax needed for that test, meanwhile ignoring it on node versions (during CI) that don't support it. webpack has a variety of helpful examples you can refer to if you are just starting out. See the `./helpers` folder to find a list of the versions. diff --git a/test/cases/chunks/runtime/test.filter.js b/test/cases/chunks/runtime/test.filter.js index 3ed2e8ae9..7ba4ada1c 100644 --- a/test/cases/chunks/runtime/test.filter.js +++ b/test/cases/chunks/runtime/test.filter.js @@ -1,4 +1,4 @@ -module.exports = function(config) { +module.exports = function (config) { // This test can't run in development mode as it depends on the flagIncludedChunks optimization return config.mode !== "development"; }; diff --git a/test/cases/chunks/weird-reference-to-entry/errors.js b/test/cases/chunks/weird-reference-to-entry/errors.js index 5cdd2850b..0eda0fbec 100644 --- a/test/cases/chunks/weird-reference-to-entry/errors.js +++ b/test/cases/chunks/weird-reference-to-entry/errors.js @@ -1,3 +1,5 @@ module.exports = [ - [/It's not allowed to load an initial chunk on demand\. The chunk name "main" is already used by an entrypoint\./], + [ + /It's not allowed to load an initial chunk on demand\. The chunk name "main" is already used by an entrypoint\./ + ] ]; diff --git a/test/cases/compile/error-hide-stack/errors.js b/test/cases/compile/error-hide-stack/errors.js index 4c65e31d6..6d8bf4df7 100644 --- a/test/cases/compile/error-hide-stack/errors.js +++ b/test/cases/compile/error-hide-stack/errors.js @@ -1,6 +1,3 @@ module.exports = [ - [ - /Module build failed( \(from [^)]+\))?:\nMessage/, - {details: /Stack/} - ] + [/Module build failed( \(from [^)]+\))?:\nMessage/, { details: /Stack/ }] ]; diff --git a/test/cases/context/issue-5750/warnings.js b/test/cases/context/issue-5750/warnings.js index 62587ab93..957d94c62 100644 --- a/test/cases/context/issue-5750/warnings.js +++ b/test/cases/context/issue-5750/warnings.js @@ -1,3 +1,3 @@ module.exports = [ - [/Critical dependency: Contexts can't use RegExps with the 'g' or 'y' flags/], + [/Critical dependency: Contexts can't use RegExps with the 'g' or 'y' flags/] ]; diff --git a/test/cases/errors/case-sensitive/test.filter.js b/test/cases/errors/case-sensitive/test.filter.js index 9ae7a5027..c3e1f9382 100644 --- a/test/cases/errors/case-sensitive/test.filter.js +++ b/test/cases/errors/case-sensitive/test.filter.js @@ -1,6 +1,6 @@ var fs = require("fs"); var path = require("path"); -module.exports = function(config) { +module.exports = function (config) { return fs.existsSync(path.join(__dirname, "TEST.FILTER.JS")); }; diff --git a/test/cases/errors/case-sensitive/warnings.js b/test/cases/errors/case-sensitive/warnings.js index 99ac2e5cf..1a2c38230 100644 --- a/test/cases/errors/case-sensitive/warnings.js +++ b/test/cases/errors/case-sensitive/warnings.js @@ -1,4 +1,12 @@ module.exports = [ - [/There are multiple modules with names that only differ in casing/, /case-sensitive.A\.js/, /case-sensitive.a\.js/], - [/There are multiple modules with names that only differ in casing/, /case-sensitive.B.file\.js/, /case-sensitive.b.file\.js/] + [ + /There are multiple modules with names that only differ in casing/, + /case-sensitive.A\.js/, + /case-sensitive.a\.js/ + ], + [ + /There are multiple modules with names that only differ in casing/, + /case-sensitive.B.file\.js/, + /case-sensitive.b.file\.js/ + ] ]; diff --git a/test/cases/errors/crash-missing-import/errors.js b/test/cases/errors/crash-missing-import/errors.js index 4eefda428..d85236a2c 100644 --- a/test/cases/errors/crash-missing-import/errors.js +++ b/test/cases/errors/crash-missing-import/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/Module not found/], -]; +module.exports = [[/Module not found/]]; diff --git a/test/cases/errors/harmony-import-missing/errors.js b/test/cases/errors/harmony-import-missing/errors.js index 6084546bf..baab75125 100644 --- a/test/cases/errors/harmony-import-missing/errors.js +++ b/test/cases/errors/harmony-import-missing/errors.js @@ -1,5 +1 @@ -module.exports = [ - [ - /Can't resolve '.\/missing'/ - ] -]; +module.exports = [[/Can't resolve '.\/missing'/]]; diff --git a/test/cases/errors/load-module-error/errors.js b/test/cases/errors/load-module-error/errors.js index d2c4b1da9..ce88c1bc3 100644 --- a/test/cases/errors/load-module-error/errors.js +++ b/test/cases/errors/load-module-error/errors.js @@ -1,8 +1 @@ -module.exports = [ - [ - /err: abc/, - ], - [ - /The loaded module contains errors/, - ], -]; +module.exports = [[/err: abc/], [/The loaded module contains errors/]]; diff --git a/test/cases/errors/loader-error-warning/errors.js b/test/cases/errors/loader-error-warning/errors.js index c5801200e..16bfd86a5 100644 --- a/test/cases/errors/loader-error-warning/errors.js +++ b/test/cases/errors/loader-error-warning/errors.js @@ -1,12 +1,4 @@ module.exports = [ - [ - /abc/, - /Emitted value instead of an instance of Error/, - /error-loader\.js/ - ], - [ - /def/, - /Emitted value instead of an instance of Error/, - /error-loader\.js/ - ] + [/abc/, /Emitted value instead of an instance of Error/, /error-loader\.js/], + [/def/, /Emitted value instead of an instance of Error/, /error-loader\.js/] ]; diff --git a/test/cases/errors/loader-error-warning/warnings.js b/test/cases/errors/loader-error-warning/warnings.js index 82ea0b1dd..c776962fc 100644 --- a/test/cases/errors/loader-error-warning/warnings.js +++ b/test/cases/errors/loader-error-warning/warnings.js @@ -1,7 +1,3 @@ module.exports = [ - [ - /xyz/, - /Emitted value instead of an instance of Error/, - /warning-loader\.js/ - ] + [/xyz/, /Emitted value instead of an instance of Error/, /warning-loader\.js/] ]; diff --git a/test/cases/loaders/no-string/errors.js b/test/cases/loaders/no-string/errors.js index 7a3a289d7..79aef6533 100644 --- a/test/cases/loaders/no-string/errors.js +++ b/test/cases/loaders/no-string/errors.js @@ -1,10 +1,16 @@ module.exports = [ [ - {moduleName: /\.\/loaders\/no-string\/loader\.js!\.\/loaders\/no-string\/file\.js/}, + { + moduleName: + /\.\/loaders\/no-string\/loader\.js!\.\/loaders\/no-string\/file\.js/ + }, /Module build failed: Error: Final loader \(\.\/loaders\/no-string\/loader\.js\) didn't return a Buffer or String/ ], [ - {moduleName: /\.\/loaders\/no-string\/loader\.js!\.\/loaders\/no-string\/pitch-loader\.js!\.\/loaders\/no-string\/file\.js/}, + { + moduleName: + /\.\/loaders\/no-string\/loader\.js!\.\/loaders\/no-string\/pitch-loader\.js!\.\/loaders\/no-string\/file\.js/ + }, /Module build failed: Error: Final loader \(\.\/loaders\/no-string\/loader\.js\) didn't return a Buffer or String/ ] ]; diff --git a/test/cases/mjs/namespace-object-lazy/test.filter.js b/test/cases/mjs/namespace-object-lazy/test.filter.js index 2602795ee..ca08e6011 100644 --- a/test/cases/mjs/namespace-object-lazy/test.filter.js +++ b/test/cases/mjs/namespace-object-lazy/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return !config.minimize; }; diff --git a/test/cases/mjs/non-mjs-namespace-object-lazy/test.filter.js b/test/cases/mjs/non-mjs-namespace-object-lazy/test.filter.js index 2602795ee..ca08e6011 100644 --- a/test/cases/mjs/non-mjs-namespace-object-lazy/test.filter.js +++ b/test/cases/mjs/non-mjs-namespace-object-lazy/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return !config.minimize; }; diff --git a/test/cases/optimize/side-effects-all-chain-unused/test.filter.js b/test/cases/optimize/side-effects-all-chain-unused/test.filter.js index 9022ab641..49ac5066b 100644 --- a/test/cases/optimize/side-effects-all-chain-unused/test.filter.js +++ b/test/cases/optimize/side-effects-all-chain-unused/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return config.mode !== "development"; }; diff --git a/test/cases/optimize/side-effects-all-used/test.filter.js b/test/cases/optimize/side-effects-all-used/test.filter.js index 9022ab641..49ac5066b 100644 --- a/test/cases/optimize/side-effects-all-used/test.filter.js +++ b/test/cases/optimize/side-effects-all-used/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return config.mode !== "development"; }; diff --git a/test/cases/optimize/side-effects-immediate-unused/test.filter.js b/test/cases/optimize/side-effects-immediate-unused/test.filter.js index 9022ab641..49ac5066b 100644 --- a/test/cases/optimize/side-effects-immediate-unused/test.filter.js +++ b/test/cases/optimize/side-effects-immediate-unused/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return config.mode !== "development"; }; diff --git a/test/cases/optimize/side-effects-reexport-start-unknown/test.filter.js b/test/cases/optimize/side-effects-reexport-start-unknown/test.filter.js index 9022ab641..49ac5066b 100644 --- a/test/cases/optimize/side-effects-reexport-start-unknown/test.filter.js +++ b/test/cases/optimize/side-effects-reexport-start-unknown/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return config.mode !== "development"; }; diff --git a/test/cases/optimize/side-effects-root-unused/test.filter.js b/test/cases/optimize/side-effects-root-unused/test.filter.js index 9022ab641..49ac5066b 100644 --- a/test/cases/optimize/side-effects-root-unused/test.filter.js +++ b/test/cases/optimize/side-effects-root-unused/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return config.mode !== "development"; }; diff --git a/test/cases/optimize/side-effects-simple-unused/test.filter.js b/test/cases/optimize/side-effects-simple-unused/test.filter.js index 9022ab641..49ac5066b 100644 --- a/test/cases/optimize/side-effects-simple-unused/test.filter.js +++ b/test/cases/optimize/side-effects-simple-unused/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return config.mode !== "development"; }; diff --git a/test/cases/optimize/side-effects-transitive-unused/test.filter.js b/test/cases/optimize/side-effects-transitive-unused/test.filter.js index 9022ab641..49ac5066b 100644 --- a/test/cases/optimize/side-effects-transitive-unused/test.filter.js +++ b/test/cases/optimize/side-effects-transitive-unused/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return config.mode !== "development"; }; diff --git a/test/cases/parsing/asi/warnings.js b/test/cases/parsing/asi/warnings.js index 79f938e14..39b26d59c 100644 --- a/test/cases/parsing/asi/warnings.js +++ b/test/cases/parsing/asi/warnings.js @@ -1,3 +1 @@ -module.exports = [ - [/Critical dependency: Accessing import\.meta/] -]; +module.exports = [[/Critical dependency: Accessing import\.meta/]]; diff --git a/test/cases/parsing/es2022/test.filter.js b/test/cases/parsing/es2022/test.filter.js index a26c3793c..38c3136db 100644 --- a/test/cases/parsing/es2022/test.filter.js +++ b/test/cases/parsing/es2022/test.filter.js @@ -1,4 +1,4 @@ -module.exports = function(config) { +module.exports = function (config) { // terser doesn't support static {} if (config.mode === "production") return false; diff --git a/test/cases/parsing/extract-amd/warnings.js b/test/cases/parsing/extract-amd/warnings.js index aa20932a1..418492a70 100644 --- a/test/cases/parsing/extract-amd/warnings.js +++ b/test/cases/parsing/extract-amd/warnings.js @@ -1,3 +1,3 @@ module.exports = [ - [/Module not found/, /Can't resolve '\.\/b' /, {details: /b\.js/}] + [/Module not found/, /Can't resolve '\.\/b' /, { details: /b\.js/ }] ]; diff --git a/test/cases/parsing/extract-require/errors.js b/test/cases/parsing/extract-require/errors.js index 576a4be9e..cb2596c11 100644 --- a/test/cases/parsing/extract-require/errors.js +++ b/test/cases/parsing/extract-require/errors.js @@ -1,3 +1,7 @@ module.exports = [ - [/Module not found/, /Can't resolve '\.\/missingModule' /, {moduleName: /extract-require\/index.js/}] + [ + /Module not found/, + /Can't resolve '\.\/missingModule' /, + { moduleName: /extract-require\/index.js/ } + ] ]; diff --git a/test/cases/parsing/harmony-destructuring-assignment/test.filter.js b/test/cases/parsing/harmony-destructuring-assignment/test.filter.js index 181167c76..f176154b2 100644 --- a/test/cases/parsing/harmony-destructuring-assignment/test.filter.js +++ b/test/cases/parsing/harmony-destructuring-assignment/test.filter.js @@ -1,4 +1,4 @@ -module.exports = function(config) { +module.exports = function (config) { // This test can't run in development mode return config.mode !== "development"; }; diff --git a/test/cases/parsing/harmony-export-precedence/warnings.js b/test/cases/parsing/harmony-export-precedence/warnings.js index c57b3a2cc..af730a435 100644 --- a/test/cases/parsing/harmony-export-precedence/warnings.js +++ b/test/cases/parsing/harmony-export-precedence/warnings.js @@ -1,3 +1,5 @@ module.exports = [ - [/export 'default' \(imported as 'defaultImport'\) was not found in '.\/a' \(possible exports: a, b, c, d, e, f\)/] + [ + /export 'default' \(imported as 'defaultImport'\) was not found in '.\/a' \(possible exports: a, b, c, d, e, f\)/ + ] ]; diff --git a/test/cases/parsing/issue-2006/errors.js b/test/cases/parsing/issue-2006/errors.js index 7936b2e9d..2b82b710b 100644 --- a/test/cases/parsing/issue-2006/errors.js +++ b/test/cases/parsing/issue-2006/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/Empty dependency/] -]; \ No newline at end of file +module.exports = [[/Empty dependency/]]; diff --git a/test/cases/parsing/issue-2600/errors.js b/test/cases/parsing/issue-2600/errors.js index 8894d7a69..9cd234c73 100644 --- a/test/cases/parsing/issue-2600/errors.js +++ b/test/cases/parsing/issue-2600/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/Can't resolve 'missing'/] -]; \ No newline at end of file +module.exports = [[/Can't resolve 'missing'/]]; diff --git a/test/cases/parsing/issue-2641/errors.js b/test/cases/parsing/issue-2641/errors.js index 01d80f295..4c8eabefc 100644 --- a/test/cases/parsing/issue-2641/errors.js +++ b/test/cases/parsing/issue-2641/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/Module not found/, /Can't resolve '\.\/missingModule' /] -]; +module.exports = [[/Module not found/, /Can't resolve '\.\/missingModule' /]]; diff --git a/test/cases/parsing/issue-627/warnings.js b/test/cases/parsing/issue-627/warnings.js index ea6102af4..f1a4bb46d 100644 --- a/test/cases/parsing/issue-627/warnings.js +++ b/test/cases/parsing/issue-627/warnings.js @@ -1,3 +1 @@ -module.exports = [ - [/Critical dependency/] -]; +module.exports = [[/Critical dependency/]]; diff --git a/test/cases/parsing/issue-7519/test.filter.js b/test/cases/parsing/issue-7519/test.filter.js index 9022ab641..49ac5066b 100644 --- a/test/cases/parsing/issue-7519/test.filter.js +++ b/test/cases/parsing/issue-7519/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return config.mode !== "development"; }; diff --git a/test/cases/parsing/issue-758/errors.js b/test/cases/parsing/issue-758/errors.js index 01d80f295..4c8eabefc 100644 --- a/test/cases/parsing/issue-758/errors.js +++ b/test/cases/parsing/issue-758/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/Module not found/, /Can't resolve '\.\/missingModule' /] -]; +module.exports = [[/Module not found/, /Can't resolve '\.\/missingModule' /]]; diff --git a/test/cases/parsing/logical-assignment/test.filter.js b/test/cases/parsing/logical-assignment/test.filter.js index cecf771ed..52cd61a8e 100644 --- a/test/cases/parsing/logical-assignment/test.filter.js +++ b/test/cases/parsing/logical-assignment/test.filter.js @@ -1,5 +1,5 @@ var supportsLogicalAssignment = require("../../../helpers/supportsLogicalAssignment"); -module.exports = function(config) { +module.exports = function (config) { return supportsLogicalAssignment(); }; diff --git a/test/cases/parsing/optional-catch-binding/test.filter.js b/test/cases/parsing/optional-catch-binding/test.filter.js index a09b86426..5e7d911be 100644 --- a/test/cases/parsing/optional-catch-binding/test.filter.js +++ b/test/cases/parsing/optional-catch-binding/test.filter.js @@ -1,6 +1,6 @@ const supportsOptionalCatchBinding = require("../../../helpers/supportsOptionalCatchBinding"); -module.exports = function(config) { +module.exports = function (config) { // XXX: Disable this test if Terser is used because it does not support ES 2019 if (config.mode === "production") { return false; diff --git a/test/cases/parsing/spread/test.filter.js b/test/cases/parsing/spread/test.filter.js index 741b76b8c..dff5bad77 100644 --- a/test/cases/parsing/spread/test.filter.js +++ b/test/cases/parsing/spread/test.filter.js @@ -1,5 +1,5 @@ var supportsSpread = require("../../../helpers/supportsSpread"); -module.exports = function(config) { +module.exports = function (config) { return supportsSpread(); }; diff --git a/test/cases/resolving/browser-field/errors.js b/test/cases/resolving/browser-field/errors.js index 4b56bd344..43f6c3086 100644 --- a/test/cases/resolving/browser-field/errors.js +++ b/test/cases/resolving/browser-field/errors.js @@ -3,4 +3,4 @@ module.exports = [ [/Module not found/, /recursive-file\/b/, /Recursion in resolving/], [/Module not found/, /recursive-file\/c/, /Recursion in resolving/], [/Module not found/, /recursive-file\/d/, /Recursion in resolving/] -]; \ No newline at end of file +]; diff --git a/test/cases/runtime/error-handling/errors.js b/test/cases/runtime/error-handling/errors.js index d3f6fa22d..033213109 100644 --- a/test/cases/runtime/error-handling/errors.js +++ b/test/cases/runtime/error-handling/errors.js @@ -1,3 +1,7 @@ module.exports = [ - [/Module not found/, /Can't resolve '\.\/missingModule' /, {moduleName: /error-handling\/index.js/}] + [ + /Module not found/, + /Can't resolve '\.\/missingModule' /, + { moduleName: /error-handling\/index.js/ } + ] ]; diff --git a/test/cases/runtime/error-handling/warnings.js b/test/cases/runtime/error-handling/warnings.js index c9f210097..c005d4830 100644 --- a/test/cases/runtime/error-handling/warnings.js +++ b/test/cases/runtime/error-handling/warnings.js @@ -1,3 +1,7 @@ module.exports = [ - [/Module not found/, /Can't resolve '\.\/missingModule2' /, {moduleName: /error-handling\/index.js/}] + [ + /Module not found/, + /Can't resolve '\.\/missingModule2' /, + { moduleName: /error-handling\/index.js/ } + ] ]; diff --git a/test/cases/runtime/missing-module-syntax-error/errors.js b/test/cases/runtime/missing-module-syntax-error/errors.js index 4ce4a4dd9..ced71bb99 100644 --- a/test/cases/runtime/missing-module-syntax-error/errors.js +++ b/test/cases/runtime/missing-module-syntax-error/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/Module not found/, /Can't resolve '\.\/someModule' /], -]; +module.exports = [[/Module not found/, /Can't resolve '\.\/someModule' /]]; diff --git a/test/cases/scope-hoisting/renaming-shorthand-5027/test.filter.js b/test/cases/scope-hoisting/renaming-shorthand-5027/test.filter.js index ccd1717d1..810114c1d 100644 --- a/test/cases/scope-hoisting/renaming-shorthand-5027/test.filter.js +++ b/test/cases/scope-hoisting/renaming-shorthand-5027/test.filter.js @@ -3,10 +3,12 @@ var supportDefaultAssignment = require("../../../helpers/supportDefaultAssignmen var supportsObjectDestructuring = require("../../../helpers/supportsObjectDestructuring"); var supportsIteratorDestructuring = require("../../../helpers/supportsIteratorDestructuring"); -module.exports = function(config) { - return !config.minimize && +module.exports = function (config) { + return ( + !config.minimize && supportsES6() && supportDefaultAssignment() && supportsObjectDestructuring() && - supportsIteratorDestructuring(); + supportsIteratorDestructuring() + ); }; diff --git a/test/cases/wasm/decoding/test.filter.js b/test/cases/wasm/decoding/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/decoding/test.filter.js +++ b/test/cases/wasm/decoding/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/export-imported-global/test.filter.js b/test/cases/wasm/export-imported-global/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/export-imported-global/test.filter.js +++ b/test/cases/wasm/export-imported-global/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/finalize-exports-issue-8261/test.filter.js b/test/cases/wasm/finalize-exports-issue-8261/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/finalize-exports-issue-8261/test.filter.js +++ b/test/cases/wasm/finalize-exports-issue-8261/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/global-refs-imported-global/test.filter.js b/test/cases/wasm/global-refs-imported-global/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/global-refs-imported-global/test.filter.js +++ b/test/cases/wasm/global-refs-imported-global/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/import-wasm-wasm/test.filter.js b/test/cases/wasm/import-wasm-wasm/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/import-wasm-wasm/test.filter.js +++ b/test/cases/wasm/import-wasm-wasm/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/imported-global-preserve-ordering/test.filter.js b/test/cases/wasm/imported-global-preserve-ordering/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/imported-global-preserve-ordering/test.filter.js +++ b/test/cases/wasm/imported-global-preserve-ordering/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/imported-global-preserve-type/test.filter.js b/test/cases/wasm/imported-global-preserve-type/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/imported-global-preserve-type/test.filter.js +++ b/test/cases/wasm/imported-global-preserve-type/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/imports-circular/test.filter.js b/test/cases/wasm/imports-circular/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/imports-circular/test.filter.js +++ b/test/cases/wasm/imports-circular/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/imports-complex-types/test.filter.js b/test/cases/wasm/imports-complex-types/test.filter.js index 390fa4a4d..2bc44bbd9 100644 --- a/test/cases/wasm/imports-complex-types/test.filter.js +++ b/test/cases/wasm/imports-complex-types/test.filter.js @@ -1,5 +1,5 @@ const supports = require("webassembly-feature"); -module.exports = function(config) { +module.exports = function (config) { return supports["simd"](); }; diff --git a/test/cases/wasm/imports-many-direct/test.filter.js b/test/cases/wasm/imports-many-direct/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/imports-many-direct/test.filter.js +++ b/test/cases/wasm/imports-many-direct/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/imports-multiple/test.filter.js b/test/cases/wasm/imports-multiple/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/imports-multiple/test.filter.js +++ b/test/cases/wasm/imports-multiple/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/imports/test.filter.js b/test/cases/wasm/imports/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/imports/test.filter.js +++ b/test/cases/wasm/imports/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/memory/test.filter.js b/test/cases/wasm/memory/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/memory/test.filter.js +++ b/test/cases/wasm/memory/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/order/test.filter.js b/test/cases/wasm/order/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/order/test.filter.js +++ b/test/cases/wasm/order/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/simple/test.filter.js b/test/cases/wasm/simple/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/simple/test.filter.js +++ b/test/cases/wasm/simple/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/table/test.filter.js b/test/cases/wasm/table/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/table/test.filter.js +++ b/test/cases/wasm/table/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/two-files-loader/test.filter.js b/test/cases/wasm/two-files-loader/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/two-files-loader/test.filter.js +++ b/test/cases/wasm/two-files-loader/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/unused-export/test.filter.js b/test/cases/wasm/unused-export/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/unused-export/test.filter.js +++ b/test/cases/wasm/unused-export/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/v128/test.filter.js b/test/cases/wasm/v128/test.filter.js index 4a11b4826..a4c4664b2 100644 --- a/test/cases/wasm/v128/test.filter.js +++ b/test/cases/wasm/v128/test.filter.js @@ -1,8 +1,8 @@ -const supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -const supportsFeature = require("webassembly-feature"); +// const supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); +// const supportsFeature = require("webassembly-feature"); module.exports = function (config) { // TODO fails with CompileError: WebAssembly.instantiate(): Compiling function #0 failed: memory instruction with no memory @+24 return false; - return supportsWebAssembly() && supportsFeature.simd(); + // return supportsWebAssembly() && supportsFeature.simd(); }; diff --git a/test/cases/wasm/wasm-explorer-examples-async/test.filter.js b/test/cases/wasm/wasm-explorer-examples-async/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/wasm-explorer-examples-async/test.filter.js +++ b/test/cases/wasm/wasm-explorer-examples-async/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/cases/wasm/wasm-explorer-examples-sync/test.filter.js b/test/cases/wasm/wasm-explorer-examples-sync/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/cases/wasm/wasm-explorer-examples-sync/test.filter.js +++ b/test/cases/wasm/wasm-explorer-examples-sync/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/configCases/asset-modules/http-url/test.config.js b/test/configCases/asset-modules/http-url/test.config.js index b515d7d0e..5de02baa8 100644 --- a/test/configCases/asset-modules/http-url/test.config.js +++ b/test/configCases/asset-modules/http-url/test.config.js @@ -5,11 +5,15 @@ module.exports = { beforeExecute() { try { fs.unlinkSync(path.join(__dirname, "dev-defaults.webpack.lock")); - } catch (e) {} + } catch (e) { + // Empty + } }, afterExecute() { try { fs.unlinkSync(path.join(__dirname, "dev-defaults.webpack.lock")); - } catch (e) {} + } catch (e) { + // Empty + } } }; diff --git a/test/configCases/chunk-graph/issue-9634/test.config.js b/test/configCases/chunk-graph/issue-9634/test.config.js index 4f87cbec7..3fe44b616 100644 --- a/test/configCases/chunk-graph/issue-9634/test.config.js +++ b/test/configCases/chunk-graph/issue-9634/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["a.js", "b.js"]; } }; diff --git a/test/configCases/chunk-index/order-multiple-entries/test.config.js b/test/configCases/chunk-index/order-multiple-entries/test.config.js index 65c1791bc..7c7149859 100644 --- a/test/configCases/chunk-index/order-multiple-entries/test.config.js +++ b/test/configCases/chunk-index/order-multiple-entries/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["entry1.js", "entry2.js"]; } }; diff --git a/test/configCases/code-generation/require-context-id/warnings.js b/test/configCases/code-generation/require-context-id/warnings.js index 5d0640d1c..70fefa270 100644 --- a/test/configCases/code-generation/require-context-id/warnings.js +++ b/test/configCases/code-generation/require-context-id/warnings.js @@ -1,3 +1 @@ -module.exports = [ - [/hashed/, /deprecated/] -]; +module.exports = [[/hashed/, /deprecated/]]; diff --git a/test/configCases/compiletime/error-not-found/errors.js b/test/configCases/compiletime/error-not-found/errors.js index e36b112fd..59aab9d5b 100644 --- a/test/configCases/compiletime/error-not-found/errors.js +++ b/test/configCases/compiletime/error-not-found/errors.js @@ -1,3 +1 @@ -module.exports = [ - /not found/ -]; +module.exports = [/not found/]; diff --git a/test/configCases/compiletime/warn-not-found/warnings.js b/test/configCases/compiletime/warn-not-found/warnings.js index e36b112fd..59aab9d5b 100644 --- a/test/configCases/compiletime/warn-not-found/warnings.js +++ b/test/configCases/compiletime/warn-not-found/warnings.js @@ -1,3 +1 @@ -module.exports = [ - /not found/ -]; +module.exports = [/not found/]; diff --git a/test/configCases/concatenate-modules/load-chunk-function/test.config.js b/test/configCases/concatenate-modules/load-chunk-function/test.config.js index 65c1791bc..7c7149859 100644 --- a/test/configCases/concatenate-modules/load-chunk-function/test.config.js +++ b/test/configCases/concatenate-modules/load-chunk-function/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["entry1.js", "entry2.js"]; } }; diff --git a/test/configCases/concatenate-modules/split-chunk-entry-module/test.config.js b/test/configCases/concatenate-modules/split-chunk-entry-module/test.config.js index b2809a123..d2cb4260c 100644 --- a/test/configCases/concatenate-modules/split-chunk-entry-module/test.config.js +++ b/test/configCases/concatenate-modules/split-chunk-entry-module/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["runtime.js", "common-index_js.js", "main.js"]; } }; diff --git a/test/configCases/contenthash/assets/test.config.js b/test/configCases/contenthash/assets/test.config.js index bcd4af2ce..0a8a12500 100644 --- a/test/configCases/contenthash/assets/test.config.js +++ b/test/configCases/contenthash/assets/test.config.js @@ -4,7 +4,7 @@ const allAssets = new Set(); const allBundles = new Set(); module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0]; allBundles.add(/\.([^.]+)\./.exec(bundle)[1]); @@ -12,11 +12,11 @@ module.exports = { switch (i) { case 0: - asset = findOutputFiles(options, /^1\.[^\.]*\.jpg$/, 'img')[0]; + asset = findOutputFiles(options, /^1\.[^.]*\.jpg$/, "img")[0]; break; case 1: case 5: - asset = findOutputFiles(options, /^1\.[^\.]*\.jpg$/, 'asset')[0]; + asset = findOutputFiles(options, /^1\.[^.]*\.jpg$/, "asset")[0]; break; } diff --git a/test/configCases/contenthash/include-chunk-id/test.config.js b/test/configCases/contenthash/include-chunk-id/test.config.js index 36168a947..c65a91f04 100644 --- a/test/configCases/contenthash/include-chunk-id/test.config.js +++ b/test/configCases/contenthash/include-chunk-id/test.config.js @@ -4,7 +4,7 @@ const allFilenameHashes = new Set(); const allChunkHashes = new Set(); module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { const filename = findOutputFiles(options, new RegExp(`^bundle${i}`))[0]; const filenameHash = /\.([a-f0-9]+)\.js$/.exec(filename)[1]; allFilenameHashes.add(filenameHash); diff --git a/test/configCases/contenthash/salt/test.config.js b/test/configCases/contenthash/salt/test.config.js index 530c9147c..ce9494812 100644 --- a/test/configCases/contenthash/salt/test.config.js +++ b/test/configCases/contenthash/salt/test.config.js @@ -4,7 +4,7 @@ const allAssets = new Set(); const allBundles = new Set(); module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0]; allBundles.add(/\.([^.]+)\./.exec(bundle)[1]); diff --git a/test/configCases/delegated-hash/simple/warnings.js b/test/configCases/delegated-hash/simple/warnings.js index 5d0640d1c..70fefa270 100644 --- a/test/configCases/delegated-hash/simple/warnings.js +++ b/test/configCases/delegated-hash/simple/warnings.js @@ -1,3 +1 @@ -module.exports = [ - [/hashed/, /deprecated/] -]; +module.exports = [[/hashed/, /deprecated/]]; diff --git a/test/configCases/dll-plugin/3-use-dll-with-hashid/warnings.js b/test/configCases/dll-plugin/3-use-dll-with-hashid/warnings.js index 5d0640d1c..70fefa270 100644 --- a/test/configCases/dll-plugin/3-use-dll-with-hashid/warnings.js +++ b/test/configCases/dll-plugin/3-use-dll-with-hashid/warnings.js @@ -1,3 +1 @@ -module.exports = [ - [/hashed/, /deprecated/] -]; +module.exports = [[/hashed/, /deprecated/]]; diff --git a/test/configCases/entry/adding-multiple-entry-points/test.config.js b/test/configCases/entry/adding-multiple-entry-points/test.config.js index 7dc1c9354..b8ab195d3 100644 --- a/test/configCases/entry/adding-multiple-entry-points/test.config.js +++ b/test/configCases/entry/adding-multiple-entry-points/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./runtime~main.js", - "./main.js" - ] + findBundle: function () { + return ["./runtime~main.js", "./main.js"]; } }; diff --git a/test/configCases/entry/depend-on-simple/test.config.js b/test/configCases/entry/depend-on-simple/test.config.js index 2685941d7..d8f78e1e8 100644 --- a/test/configCases/entry/depend-on-simple/test.config.js +++ b/test/configCases/entry/depend-on-simple/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function() { + findBundle: function () { return ["./app.js", "./react-vendors.js"]; } }; diff --git a/test/configCases/entry/descriptor/test.config.js b/test/configCases/entry/descriptor/test.config.js index 8a5b96a84..e4c1c3811 100644 --- a/test/configCases/entry/descriptor/test.config.js +++ b/test/configCases/entry/descriptor/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./a.js", - "./b.js" - ] + findBundle: function () { + return ["./a.js", "./b.js"]; } }; diff --git a/test/configCases/entry/function-promise/test.config.js b/test/configCases/entry/function-promise/test.config.js index 8a5b96a84..e4c1c3811 100644 --- a/test/configCases/entry/function-promise/test.config.js +++ b/test/configCases/entry/function-promise/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./a.js", - "./b.js" - ] + findBundle: function () { + return ["./a.js", "./b.js"]; } }; diff --git a/test/configCases/entry/function/test.config.js b/test/configCases/entry/function/test.config.js index 8a5b96a84..e4c1c3811 100644 --- a/test/configCases/entry/function/test.config.js +++ b/test/configCases/entry/function/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./a.js", - "./b.js" - ] + findBundle: function () { + return ["./a.js", "./b.js"]; } }; diff --git a/test/configCases/errors/entry-not-found/errors.js b/test/configCases/errors/entry-not-found/errors.js index fedff0a83..648b41f3f 100644 --- a/test/configCases/errors/entry-not-found/errors.js +++ b/test/configCases/errors/entry-not-found/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/^Module not found/, /.\/index\.js/] -]; +module.exports = [[/^Module not found/, /.\/index\.js/]]; diff --git a/test/configCases/errors/import-missing/errors.js b/test/configCases/errors/import-missing/errors.js index d4f7cb2e8..d85236a2c 100644 --- a/test/configCases/errors/import-missing/errors.js +++ b/test/configCases/errors/import-missing/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/Module not found/] -]; +module.exports = [[/Module not found/]]; diff --git a/test/configCases/errors/multi-entry-missing-module/test.config.js b/test/configCases/errors/multi-entry-missing-module/test.config.js index 50494000b..0bf2100df 100644 --- a/test/configCases/errors/multi-entry-missing-module/test.config.js +++ b/test/configCases/errors/multi-entry-missing-module/test.config.js @@ -1,9 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./a.js", - "./b.js", - "./bundle0.js" - ] + findBundle: function () { + return ["./a.js", "./b.js", "./bundle0.js"]; } }; diff --git a/test/configCases/externals/externals-in-commons-chunk/test.config.js b/test/configCases/externals/externals-in-commons-chunk/test.config.js index 51faf2424..345b63543 100644 --- a/test/configCases/externals/externals-in-commons-chunk/test.config.js +++ b/test/configCases/externals/externals-in-commons-chunk/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./common.js", - "./main.js" - ] + findBundle: function (i, options) { + return ["./common.js", "./main.js"]; } }; diff --git a/test/configCases/externals/externals-system-custom/test.config.js b/test/configCases/externals/externals-system-custom/test.config.js index 5a50c9e05..bbe84a331 100644 --- a/test/configCases/externals/externals-system-custom/test.config.js +++ b/test/configCases/externals/externals-system-custom/test.config.js @@ -1,14 +1,14 @@ const System = require("../../../helpers/fakeSystem"); module.exports = { - target: 'web', + target: "web", beforeExecute: () => { System.init(); }, moduleScope(scope) { - scope.window.windowExt = 'works'; - scope.rootExt = 'works'; - scope.varExt = 'works'; + scope.window.windowExt = "works"; + scope.rootExt = "works"; + scope.varExt = "works"; scope.System = System; }, afterExecute: () => { diff --git a/test/configCases/issues/issue-14974/test.filter.js b/test/configCases/issues/issue-14974/test.filter.js index 18265449d..c223174f2 100644 --- a/test/configCases/issues/issue-14974/test.filter.js +++ b/test/configCases/issues/issue-14974/test.filter.js @@ -1,3 +1,3 @@ module.exports = function () { - return process.version.slice(0, 4) !== "v10." + return process.version.slice(0, 4) !== "v10."; }; diff --git a/test/configCases/issues/issue-7563/test.config.js b/test/configCases/issues/issue-7563/test.config.js index dee265552..9eb43c9bf 100644 --- a/test/configCases/issues/issue-7563/test.config.js +++ b/test/configCases/issues/issue-7563/test.config.js @@ -1,9 +1,9 @@ -var fs = require('fs'); +var fs = require("fs"); module.exports = { noTests: true, - findBundle: function(i, options) { - var regex = new RegExp("^bundle\." + options.name, "i"); + findBundle: function (i, options) { + var regex = new RegExp("^bundle." + options.name, "i"); var files = fs.readdirSync(options.output.path); var bundle = files.find(function (file) { return regex.test(file); diff --git a/test/configCases/loaders/issue-3320/deprecations.js b/test/configCases/loaders/issue-3320/deprecations.js index aac174551..f05114b93 100644 --- a/test/configCases/loaders/issue-3320/deprecations.js +++ b/test/configCases/loaders/issue-3320/deprecations.js @@ -1,10 +1,12 @@ module.exports = [ { code: /DEP_WEBPACK_RULE_LOADER_OPTIONS_STRING/, - message: /Using a string as loader options is deprecated \(ruleSet\[1\]\.rules\[2\]\.options\)/ + message: + /Using a string as loader options is deprecated \(ruleSet\[1\]\.rules\[2\]\.options\)/ }, { code: /DEP_WEBPACK_RULE_LOADER_OPTIONS_STRING/, - message: /Using a string as loader options is deprecated \(ruleSet\[1\]\.rules\[3\]\.use\[0\]\.options\)/ + message: + /Using a string as loader options is deprecated \(ruleSet\[1\]\.rules\[3\]\.use\[0\]\.options\)/ } ]; diff --git a/test/configCases/optimization/hashed-module-ids/warnings.js b/test/configCases/optimization/hashed-module-ids/warnings.js index 5d0640d1c..70fefa270 100644 --- a/test/configCases/optimization/hashed-module-ids/warnings.js +++ b/test/configCases/optimization/hashed-module-ids/warnings.js @@ -1,3 +1 @@ -module.exports = [ - [/hashed/, /deprecated/] -]; +module.exports = [[/hashed/, /deprecated/]]; diff --git a/test/configCases/optimization/runtime-specific-used-exports/test.config.js b/test/configCases/optimization/runtime-specific-used-exports/test.config.js index 4754b6482..e4c1c3811 100644 --- a/test/configCases/optimization/runtime-specific-used-exports/test.config.js +++ b/test/configCases/optimization/runtime-specific-used-exports/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./a.js", - "./b.js" - ]; + findBundle: function () { + return ["./a.js", "./b.js"]; } }; diff --git a/test/configCases/optimization/runtime-specific-used-exports2/test.config.js b/test/configCases/optimization/runtime-specific-used-exports2/test.config.js index c5938acd5..6229990ac 100644 --- a/test/configCases/optimization/runtime-specific-used-exports2/test.config.js +++ b/test/configCases/optimization/runtime-specific-used-exports2/test.config.js @@ -1,9 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./a.js", - "./b.js", - "./c.js" - ]; + findBundle: function () { + return ["./a.js", "./b.js", "./c.js"]; } }; diff --git a/test/configCases/output/function/test.config.js b/test/configCases/output/function/test.config.js index 4754b6482..e4c1c3811 100644 --- a/test/configCases/output/function/test.config.js +++ b/test/configCases/output/function/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./a.js", - "./b.js" - ]; + findBundle: function () { + return ["./a.js", "./b.js"]; } }; diff --git a/test/configCases/output/inner-dirs-entries/test.config.js b/test/configCases/output/inner-dirs-entries/test.config.js index 682490422..59e45ecc2 100644 --- a/test/configCases/output/inner-dirs-entries/test.config.js +++ b/test/configCases/output/inner-dirs-entries/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function() { + findBundle: function () { return ["./a.js", "./inner-dir/b.js", "./inner-dir/deep/deep/c.js"]; } }; diff --git a/test/configCases/output/publicPath-scriptType-module/test.config.js b/test/configCases/output/publicPath-scriptType-module/test.config.js index 1a9ba98e4..c57155f16 100644 --- a/test/configCases/output/publicPath-scriptType-module/test.config.js +++ b/test/configCases/output/publicPath-scriptType-module/test.config.js @@ -1,8 +1,6 @@ module.exports = { - findBundle: function() { - return [ - "./index.mjs" - ]; + findBundle: function () { + return ["./index.mjs"]; }, moduleScope(scope) { scope.pseudoImport = { meta: { url: "http://test.co/path/index.js" } }; diff --git a/test/configCases/output/publicPath-web/test.config.js b/test/configCases/output/publicPath-web/test.config.js index 53ecdb9cc..a5024d586 100644 --- a/test/configCases/output/publicPath-web/test.config.js +++ b/test/configCases/output/publicPath-web/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./inner1/inner2/a.js", - "./b.js" - ]; + findBundle: function () { + return ["./inner1/inner2/a.js", "./b.js"]; } }; diff --git a/test/configCases/output/string/test.config.js b/test/configCases/output/string/test.config.js index 9af369705..30495784d 100644 --- a/test/configCases/output/string/test.config.js +++ b/test/configCases/output/string/test.config.js @@ -1,7 +1,5 @@ module.exports = { - findBundle: function() { - return [ - "./a.js" - ]; + findBundle: function () { + return ["./a.js"]; } }; diff --git a/test/configCases/parsing/issue-2942/warnings.js b/test/configCases/parsing/issue-2942/warnings.js index 217c81ed0..b9d048752 100644 --- a/test/configCases/parsing/issue-2942/warnings.js +++ b/test/configCases/parsing/issue-2942/warnings.js @@ -1,5 +1,5 @@ module.exports = [ [/System.register is not supported by webpack/], [/System.get is not supported by webpack/], - [/System.set is not supported by webpack/], + [/System.set is not supported by webpack/] ]; diff --git a/test/configCases/parsing/issue-9042/test.config.js b/test/configCases/parsing/issue-9042/test.config.js index 1266625de..59765f30d 100644 --- a/test/configCases/parsing/issue-9042/test.config.js +++ b/test/configCases/parsing/issue-9042/test.config.js @@ -1,5 +1,5 @@ module.exports = { - moduleScope: function(scope) { + moduleScope: function (scope) { delete scope.__dirname; delete scope.__filename; } diff --git a/test/configCases/parsing/node-stuff-plugin-off/test.config.js b/test/configCases/parsing/node-stuff-plugin-off/test.config.js index 1266625de..59765f30d 100644 --- a/test/configCases/parsing/node-stuff-plugin-off/test.config.js +++ b/test/configCases/parsing/node-stuff-plugin-off/test.config.js @@ -1,5 +1,5 @@ module.exports = { - moduleScope: function(scope) { + moduleScope: function (scope) { delete scope.__dirname; delete scope.__filename; } diff --git a/test/configCases/performance/many-async-imports/test.filter.js b/test/configCases/performance/many-async-imports/test.filter.js index 8b7e505b1..a93cad202 100644 --- a/test/configCases/performance/many-async-imports/test.filter.js +++ b/test/configCases/performance/many-async-imports/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return !/^v(4|6)/.test(process.version); }; diff --git a/test/configCases/performance/many-exports/test.filter.js b/test/configCases/performance/many-exports/test.filter.js index 8b7e505b1..a93cad202 100644 --- a/test/configCases/performance/many-exports/test.filter.js +++ b/test/configCases/performance/many-exports/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return !/^v(4|6)/.test(process.version); }; diff --git a/test/configCases/plugins/banner-plugin-hashing/test.config.js b/test/configCases/plugins/banner-plugin-hashing/test.config.js index 2d283508e..19476fadf 100644 --- a/test/configCases/plugins/banner-plugin-hashing/test.config.js +++ b/test/configCases/plugins/banner-plugin-hashing/test.config.js @@ -1,7 +1,5 @@ -var fs = require("fs"); - module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return "./dist/banner.js"; } }; diff --git a/test/configCases/plugins/environment-plugin/errors.js b/test/configCases/plugins/environment-plugin/errors.js index b670159ca..866fee9db 100644 --- a/test/configCases/plugins/environment-plugin/errors.js +++ b/test/configCases/plugins/environment-plugin/errors.js @@ -1,26 +1,43 @@ -const variables = ['aaa', 'bbb', 'ccc', 'ddd', 'eee', 'fff', 'ggg', 'hhh', 'iii']; -const modules = [{ - name: 'aaa', - variables: ['aaa'] -}, { - name: 'bbbccc', - variables: ['bbb', 'ccc'] -}, { - name: 'ddd', - variables: [], - allowedErrors: [ - [{compilerPath: /ddd/}, /DDD environment variable is undefined./] - ] -}, { - name: 'eeefff', - variables: ['eee', 'fff'] -}, { - name: 'ggghhh', - variables: ['ggg', 'hhh'] -}, { - name: 'iii', - variables: ['iii'] -}]; +const variables = [ + "aaa", + "bbb", + "ccc", + "ddd", + "eee", + "fff", + "ggg", + "hhh", + "iii" +]; +const modules = [ + { + name: "aaa", + variables: ["aaa"] + }, + { + name: "bbbccc", + variables: ["bbb", "ccc"] + }, + { + name: "ddd", + variables: [], + allowedErrors: [ + [{ compilerPath: /ddd/ }, /DDD environment variable is undefined./] + ] + }, + { + name: "eeefff", + variables: ["eee", "fff"] + }, + { + name: "ggghhh", + variables: ["ggg", "hhh"] + }, + { + name: "iii", + variables: ["iii"] + } +]; // build an array of regular expressions of expected errors const regex = []; @@ -29,14 +46,14 @@ modules.forEach(module => { if (module.variables.indexOf(variable) === -1) { // the module doesn't include the env variable, an error is expected when requiring the variable regex.push([ - {compilerPath: new RegExp(`${module.name}`)}, - new RegExp(`Can't resolve '${variable}'`), + { compilerPath: new RegExp(`${module.name}`) }, + new RegExp(`Can't resolve '${variable}'`) ]); } }); - + if (module.allowedErrors) { - regex.push(...module.allowedErrors) + regex.push(...module.allowedErrors); } }); diff --git a/test/configCases/plugins/profiling-plugin/test.filter.js b/test/configCases/plugins/profiling-plugin/test.filter.js index b36fb8fa7..71a71e594 100644 --- a/test/configCases/plugins/profiling-plugin/test.filter.js +++ b/test/configCases/plugins/profiling-plugin/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return !process.env.CI; }; diff --git a/test/configCases/source-map/source-map-with-profiling-plugin/test.filter.js b/test/configCases/source-map/source-map-with-profiling-plugin/test.filter.js index b36fb8fa7..71a71e594 100644 --- a/test/configCases/source-map/source-map-with-profiling-plugin/test.filter.js +++ b/test/configCases/source-map/source-map-with-profiling-plugin/test.filter.js @@ -1,3 +1,3 @@ -module.exports = function(config) { +module.exports = function (config) { return !process.env.CI; }; diff --git a/test/configCases/split-chunks-common/correct-order/test.config.js b/test/configCases/split-chunks-common/correct-order/test.config.js index 4b70a8281..587e3116d 100644 --- a/test/configCases/split-chunks-common/correct-order/test.config.js +++ b/test/configCases/split-chunks-common/correct-order/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./vendor.js", - "./main.js" - ] + findBundle: function (i, options) { + return ["./vendor.js", "./main.js"]; } }; diff --git a/test/configCases/split-chunks-common/extract-async-from-entry/test.config.js b/test/configCases/split-chunks-common/extract-async-from-entry/test.config.js index a1fa7e16f..ad8eec8ce 100644 --- a/test/configCases/split-chunks-common/extract-async-from-entry/test.config.js +++ b/test/configCases/split-chunks-common/extract-async-from-entry/test.config.js @@ -1,7 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./main.js" - ]; + findBundle: function (i, options) { + return ["./main.js"]; } }; diff --git a/test/configCases/split-chunks-common/hot-multi/test.config.js b/test/configCases/split-chunks-common/hot-multi/test.config.js index 221de612c..f5f6453fc 100644 --- a/test/configCases/split-chunks-common/hot-multi/test.config.js +++ b/test/configCases/split-chunks-common/hot-multi/test.config.js @@ -1,9 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./vendor.js", - "./first.js", - "./second.js" - ] + findBundle: function (i, options) { + return ["./vendor.js", "./first.js", "./second.js"]; } }; diff --git a/test/configCases/split-chunks-common/hot/test.config.js b/test/configCases/split-chunks-common/hot/test.config.js index 4b70a8281..587e3116d 100644 --- a/test/configCases/split-chunks-common/hot/test.config.js +++ b/test/configCases/split-chunks-common/hot/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./vendor.js", - "./main.js" - ] + findBundle: function (i, options) { + return ["./vendor.js", "./main.js"]; } }; diff --git a/test/configCases/split-chunks-common/inverted-order/test.config.js b/test/configCases/split-chunks-common/inverted-order/test.config.js index 9f3aeae9a..a7742bb42 100644 --- a/test/configCases/split-chunks-common/inverted-order/test.config.js +++ b/test/configCases/split-chunks-common/inverted-order/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./main.js", - "./vendor.js" - ] + findBundle: function (i, options) { + return ["./main.js", "./vendor.js"]; } }; diff --git a/test/configCases/split-chunks-common/issue-12128/test.config.js b/test/configCases/split-chunks-common/issue-12128/test.config.js index 0a3abd033..0c980cac8 100644 --- a/test/configCases/split-chunks-common/issue-12128/test.config.js +++ b/test/configCases/split-chunks-common/issue-12128/test.config.js @@ -1,9 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./common.js", - "./main.js", - "./main2.js" - ] + findBundle: function (i, options) { + return ["./common.js", "./main.js", "./main2.js"]; } }; diff --git a/test/configCases/split-chunks-common/library/test.config.js b/test/configCases/split-chunks-common/library/test.config.js index c50c79885..868961814 100644 --- a/test/configCases/split-chunks-common/library/test.config.js +++ b/test/configCases/split-chunks-common/library/test.config.js @@ -1,13 +1,10 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./vendor.js", - "./main.js" - ] + findBundle: function (i, options) { + return ["./vendor.js", "./main.js"]; }, modules: { - "external0": "module 0", - "external1": "module 1", - "external2": "module 2" + external0: "module 0", + external1: "module 1", + external2: "module 2" } }; diff --git a/test/configCases/split-chunks-common/move-entry/test.config.js b/test/configCases/split-chunks-common/move-entry/test.config.js index e62df37d3..6bd99e35f 100644 --- a/test/configCases/split-chunks-common/move-entry/test.config.js +++ b/test/configCases/split-chunks-common/move-entry/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./commons.js", - "./main.js" - ] + findBundle: function (i, options) { + return ["./commons.js", "./main.js"]; } }; diff --git a/test/configCases/split-chunks-common/move-to-grandparent/test.config.js b/test/configCases/split-chunks-common/move-to-grandparent/test.config.js index 4c2a87b6f..ae33dd600 100644 --- a/test/configCases/split-chunks-common/move-to-grandparent/test.config.js +++ b/test/configCases/split-chunks-common/move-to-grandparent/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./main.js", - "./misc.js", - ]; + findBundle: function (i, options) { + return ["./main.js", "./misc.js"]; } }; diff --git a/test/configCases/split-chunks-common/simple/test.config.js b/test/configCases/split-chunks-common/simple/test.config.js index 4b70a8281..587e3116d 100644 --- a/test/configCases/split-chunks-common/simple/test.config.js +++ b/test/configCases/split-chunks-common/simple/test.config.js @@ -1,8 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - "./vendor.js", - "./main.js" - ] + findBundle: function (i, options) { + return ["./vendor.js", "./main.js"]; } }; diff --git a/test/configCases/split-chunks-common/target-node/test.config.js b/test/configCases/split-chunks-common/target-node/test.config.js index 62bb0c541..a7ab24511 100644 --- a/test/configCases/split-chunks-common/target-node/test.config.js +++ b/test/configCases/split-chunks-common/target-node/test.config.js @@ -1,7 +1,5 @@ module.exports = { - findBundle: function(i, options) { - return [ - `./${options.name}-main.js` - ] + findBundle: function (i, options) { + return [`./${options.name}-main.js`]; } }; diff --git a/test/configCases/split-chunks/asnyc-entries/test.config.js b/test/configCases/split-chunks/asnyc-entries/test.config.js index 65ddf7b1d..2e3be0636 100644 --- a/test/configCases/split-chunks/asnyc-entries/test.config.js +++ b/test/configCases/split-chunks/asnyc-entries/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js"]; } }; diff --git a/test/configCases/split-chunks/asnyc-entries/test.filter.js b/test/configCases/split-chunks/asnyc-entries/test.filter.js index 703962334..467432597 100644 --- a/test/configCases/split-chunks/asnyc-entries/test.filter.js +++ b/test/configCases/split-chunks/asnyc-entries/test.filter.js @@ -1,3 +1,4 @@ +// eslint-disable-next-line node/no-unpublished-require var supportsWorker = require("../../../helpers/supportsWorker"); module.exports = function (config) { diff --git a/test/configCases/split-chunks/chunk-filename-delimiter-default/test.config.js b/test/configCases/split-chunks/chunk-filename-delimiter-default/test.config.js index 65ddf7b1d..2e3be0636 100644 --- a/test/configCases/split-chunks/chunk-filename-delimiter-default/test.config.js +++ b/test/configCases/split-chunks/chunk-filename-delimiter-default/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js"]; } }; diff --git a/test/configCases/split-chunks/chunk-filename-delimiter/test.config.js b/test/configCases/split-chunks/chunk-filename-delimiter/test.config.js index 65ddf7b1d..2e3be0636 100644 --- a/test/configCases/split-chunks/chunk-filename-delimiter/test.config.js +++ b/test/configCases/split-chunks/chunk-filename-delimiter/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js"]; } }; diff --git a/test/configCases/split-chunks/custom-filename-function/test.config.js b/test/configCases/split-chunks/custom-filename-function/test.config.js index e5bdec5f8..b927b2e11 100644 --- a/test/configCases/split-chunks/custom-filename-function/test.config.js +++ b/test/configCases/split-chunks/custom-filename-function/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["a.js"]; } }; diff --git a/test/configCases/split-chunks/custom-filename-many-custom/test.config.js b/test/configCases/split-chunks/custom-filename-many-custom/test.config.js index e5bdec5f8..b927b2e11 100644 --- a/test/configCases/split-chunks/custom-filename-many-custom/test.config.js +++ b/test/configCases/split-chunks/custom-filename-many-custom/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["a.js"]; } }; diff --git a/test/configCases/split-chunks/custom-filename/test.config.js b/test/configCases/split-chunks/custom-filename/test.config.js index e5bdec5f8..b927b2e11 100644 --- a/test/configCases/split-chunks/custom-filename/test.config.js +++ b/test/configCases/split-chunks/custom-filename/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["a.js"]; } }; diff --git a/test/configCases/split-chunks/entry-point-error/errors.js b/test/configCases/split-chunks/entry-point-error/errors.js index 389c2d3aa..f8d7dc2e3 100644 --- a/test/configCases/split-chunks/entry-point-error/errors.js +++ b/test/configCases/split-chunks/entry-point-error/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/SplitChunksPlugin/, /Both have the same name "vendors"/] -]; +module.exports = [[/SplitChunksPlugin/, /Both have the same name "vendors"/]]; diff --git a/test/configCases/split-chunks/entry-point-error/test.config.js b/test/configCases/split-chunks/entry-point-error/test.config.js index 5fce65555..ba62ee282 100644 --- a/test/configCases/split-chunks/entry-point-error/test.config.js +++ b/test/configCases/split-chunks/entry-point-error/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["vendors.js", "main.js"]; } }; diff --git a/test/configCases/split-chunks/issue-8908/test.config.js b/test/configCases/split-chunks/issue-8908/test.config.js index 7dd8a9b0b..47cca9d66 100644 --- a/test/configCases/split-chunks/issue-8908/test.config.js +++ b/test/configCases/split-chunks/issue-8908/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["runtime.js", "vendor-a.js", "a.js"]; } }; diff --git a/test/configCases/split-chunks/issue-9491/test.config.js b/test/configCases/split-chunks/issue-9491/test.config.js index e030e6722..e436a9a79 100644 --- a/test/configCases/split-chunks/issue-9491/test.config.js +++ b/test/configCases/split-chunks/issue-9491/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["runtime.js", "constructor.js"]; } }; diff --git a/test/configCases/split-chunks/module-type-filter/test.config.js b/test/configCases/split-chunks/module-type-filter/test.config.js index 229e6463b..d4a2ddffb 100644 --- a/test/configCases/split-chunks/module-type-filter/test.config.js +++ b/test/configCases/split-chunks/module-type-filter/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["json.js", "main.js"]; } }; diff --git a/test/configCases/split-chunks/no-options/test.config.js b/test/configCases/split-chunks/no-options/test.config.js index 6f3aaf93f..8ad8dda44 100644 --- a/test/configCases/split-chunks/no-options/test.config.js +++ b/test/configCases/split-chunks/no-options/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["vendor.js", "main.js"]; } }; diff --git a/test/configCases/split-chunks/reuse-chunk-name/test.config.js b/test/configCases/split-chunks/reuse-chunk-name/test.config.js index 480f5e08d..d7289ef96 100644 --- a/test/configCases/split-chunks/reuse-chunk-name/test.config.js +++ b/test/configCases/split-chunks/reuse-chunk-name/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["common.js", "main.js"]; } }; diff --git a/test/configCases/split-chunks/runtime-chunk-no-async/test.config.js b/test/configCases/split-chunks/runtime-chunk-no-async/test.config.js index 7eafe4ed7..c63e389cb 100644 --- a/test/configCases/split-chunks/runtime-chunk-no-async/test.config.js +++ b/test/configCases/split-chunks/runtime-chunk-no-async/test.config.js @@ -1,6 +1,6 @@ const fs = require("fs"); module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { var files = fs.readdirSync(options.output.path); return ["runtime.js", files.filter(f => /^main/.test(f))[0]]; } diff --git a/test/configCases/split-chunks/runtime-chunk/test.config.js b/test/configCases/split-chunks/runtime-chunk/test.config.js index dad54da8f..359b15a5c 100644 --- a/test/configCases/split-chunks/runtime-chunk/test.config.js +++ b/test/configCases/split-chunks/runtime-chunk/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["runtime.js", "a.js"]; } }; diff --git a/test/configCases/target/node-dynamic-import/test.filter.js b/test/configCases/target/node-dynamic-import/test.filter.js index 863e9be65..6a32a7d0d 100644 --- a/test/configCases/target/node-dynamic-import/test.filter.js +++ b/test/configCases/target/node-dynamic-import/test.filter.js @@ -1,5 +1,5 @@ var supportsArrowFn = require("../../../helpers/supportsArrowFunctionExpression"); -module.exports = function(config) { +module.exports = function (config) { return supportsArrowFn(); }; diff --git a/test/configCases/wasm/bigints/test.filter.js b/test/configCases/wasm/bigints/test.filter.js index fedc9379c..3a0ae925e 100644 --- a/test/configCases/wasm/bigints/test.filter.js +++ b/test/configCases/wasm/bigints/test.filter.js @@ -1,5 +1,5 @@ const supports = require("webassembly-feature"); -module.exports = function(config) { +module.exports = function (config) { return supports["JS-BigInt-integration"](); }; diff --git a/test/configCases/wasm/export-imported-global/test.filter.js b/test/configCases/wasm/export-imported-global/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/configCases/wasm/export-imported-global/test.filter.js +++ b/test/configCases/wasm/export-imported-global/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/configCases/wasm/identical/test.filter.js b/test/configCases/wasm/identical/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/configCases/wasm/identical/test.filter.js +++ b/test/configCases/wasm/identical/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/configCases/wasm/import-wasm-wasm/test.filter.js b/test/configCases/wasm/import-wasm-wasm/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/configCases/wasm/import-wasm-wasm/test.filter.js +++ b/test/configCases/wasm/import-wasm-wasm/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/configCases/wasm/wasm-in-initial-chunk-error/test.filter.js b/test/configCases/wasm/wasm-in-initial-chunk-error/test.filter.js index 0e71c44cb..8c5069826 100644 --- a/test/configCases/wasm/wasm-in-initial-chunk-error/test.filter.js +++ b/test/configCases/wasm/wasm-in-initial-chunk-error/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function() { +module.exports = function () { return supportsWebAssembly(); }; diff --git a/test/configCases/web/node-source-future-defaults/warnings.js b/test/configCases/web/node-source-future-defaults/warnings.js index d87e919f4..9c0b7c899 100644 --- a/test/configCases/web/node-source-future-defaults/warnings.js +++ b/test/configCases/web/node-source-future-defaults/warnings.js @@ -6,5 +6,5 @@ module.exports = [ [/"global" has been used, it will be undefined in next major version/], [/"__filename" has been used, it will be undefined in next major version/], - [/"__dirname" has been used, it will be undefined in next major version/], + [/"__dirname" has been used, it will be undefined in next major version/] ]; diff --git a/test/configCases/web/prefetch-split-chunks/test.config.js b/test/configCases/web/prefetch-split-chunks/test.config.js index 76c89801e..a381a070f 100644 --- a/test/configCases/web/prefetch-split-chunks/test.config.js +++ b/test/configCases/web/prefetch-split-chunks/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js", "runtime~main.js", "separate-public-path_js.js"]; } }; diff --git a/test/configCases/web/unique-jsonp/test.config.js b/test/configCases/web/unique-jsonp/test.config.js index 65ddf7b1d..2e3be0636 100644 --- a/test/configCases/web/unique-jsonp/test.config.js +++ b/test/configCases/web/unique-jsonp/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js"]; } }; diff --git a/test/configCases/worker/custom-worker/test.config.js b/test/configCases/worker/custom-worker/test.config.js index 65ddf7b1d..2e3be0636 100644 --- a/test/configCases/worker/custom-worker/test.config.js +++ b/test/configCases/worker/custom-worker/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js"]; } }; diff --git a/test/configCases/worker/node-worker-named/test.config.js b/test/configCases/worker/node-worker-named/test.config.js index 65ddf7b1d..2e3be0636 100644 --- a/test/configCases/worker/node-worker-named/test.config.js +++ b/test/configCases/worker/node-worker-named/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js"]; } }; diff --git a/test/configCases/worker/web-worker/test.config.js b/test/configCases/worker/web-worker/test.config.js index 65ddf7b1d..2e3be0636 100644 --- a/test/configCases/worker/web-worker/test.config.js +++ b/test/configCases/worker/web-worker/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js"]; } }; diff --git a/test/configCases/worker/worker-contenthash/test.config.js b/test/configCases/worker/worker-contenthash/test.config.js index 65ddf7b1d..2e3be0636 100644 --- a/test/configCases/worker/worker-contenthash/test.config.js +++ b/test/configCases/worker/worker-contenthash/test.config.js @@ -1,5 +1,5 @@ module.exports = { - findBundle: function(i, options) { + findBundle: function (i, options) { return ["main.js"]; } }; diff --git a/test/statsCases/wasm-explorer-examples-sync/test.filter.js b/test/statsCases/wasm-explorer-examples-sync/test.filter.js index c54f54981..d73f4d758 100644 --- a/test/statsCases/wasm-explorer-examples-sync/test.filter.js +++ b/test/statsCases/wasm-explorer-examples-sync/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); }; diff --git a/test/watchCases/recover-from-error/missing-module/0/errors.js b/test/watchCases/recover-from-error/missing-module/0/errors.js index 08c3cac4e..8a65e54f0 100644 --- a/test/watchCases/recover-from-error/missing-module/0/errors.js +++ b/test/watchCases/recover-from-error/missing-module/0/errors.js @@ -1,3 +1 @@ -module.exports = [ - [/Module not found/, /Can't resolve 'some-module' /] -]; +module.exports = [[/Module not found/, /Can't resolve 'some-module' /]]; diff --git a/test/watchCases/runtime/static-import/test.config.js b/test/watchCases/runtime/static-import/test.config.js index 3d9533c73..3080b9d1e 100644 --- a/test/watchCases/runtime/static-import/test.config.js +++ b/test/watchCases/runtime/static-import/test.config.js @@ -1,6 +1,3 @@ module.exports = { - bundlePath: [ - "./runtime~main.js", - "./main.js" - ] + bundlePath: ["./runtime~main.js", "./main.js"] }; diff --git a/test/watchCases/warnings/warnings-contribute-to-hash/0/warnings.js b/test/watchCases/warnings/warnings-contribute-to-hash/0/warnings.js index 968e3ec01..77561d2be 100644 --- a/test/watchCases/warnings/warnings-contribute-to-hash/0/warnings.js +++ b/test/watchCases/warnings/warnings-contribute-to-hash/0/warnings.js @@ -1,3 +1 @@ -module.exports = [ - [/Warning1/] -]; +module.exports = [[/Warning1/]]; diff --git a/test/watchCases/warnings/warnings-contribute-to-hash/1/warnings.js b/test/watchCases/warnings/warnings-contribute-to-hash/1/warnings.js index 842179a33..cf7a02b47 100644 --- a/test/watchCases/warnings/warnings-contribute-to-hash/1/warnings.js +++ b/test/watchCases/warnings/warnings-contribute-to-hash/1/warnings.js @@ -1,3 +1 @@ -module.exports = [ - [/New Warning/] -]; +module.exports = [[/New Warning/]]; diff --git a/test/watchCases/wasm/caching/test.filter.js b/test/watchCases/wasm/caching/test.filter.js index 231773496..bd7f4573a 100644 --- a/test/watchCases/wasm/caching/test.filter.js +++ b/test/watchCases/wasm/caching/test.filter.js @@ -1,5 +1,5 @@ var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); -module.exports = function(config) { +module.exports = function (config) { return supportsWebAssembly(); };