From f1cf6cc07d3d8a8017c80efd610d86ee1c5b4779 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 23 Apr 2023 13:04:03 +0200 Subject: [PATCH 01/15] chore: init --- .eslintrc.js | 6 ++++++ .vscode/settings.json | 3 ++- test/browser/samples/missing-load/_config.js | 4 ++-- test/tsconfig.json | 16 ++++++++++++++++ test/types.d.ts | 20 ++++++++++++++++++++ test/utils.js | 1 + 6 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 test/tsconfig.json create mode 100644 test/types.d.ts diff --git a/.eslintrc.js b/.eslintrc.js index b21c14ddd3a..f52183b8466 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -66,6 +66,12 @@ module.exports = { 'no-undef': 'off', 'unicorn/prevent-abbreviations': 'off' } + }, + { + files: ['test/**/_config.js'], + rules: { + 'no-undef': 'off' + } } ], parser: '@typescript-eslint/parser', diff --git a/.vscode/settings.json b/.vscode/settings.json index d84818e43f3..cf00f88a09e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,6 @@ "typescript.format.enable": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": true - } + }, + "references.preferredLocation": "peek" } diff --git a/test/browser/samples/missing-load/_config.js b/test/browser/samples/missing-load/_config.js index 7e2eeb7521d..1710496b500 100644 --- a/test/browser/samples/missing-load/_config.js +++ b/test/browser/samples/missing-load/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'fails if a file cannot be loaded', options: { plugins: { @@ -14,4 +14,4 @@ module.exports = { url: 'https://rollupjs.org/plugin-development/#a-simple-example', watchFiles: ['main'] } -}; +}); diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 00000000000..507fca2e1e0 --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "allowJs": true, + "target": "esnext", + "lib": ["ES2021"], + "moduleResolution": "node", + "types": [ + "node", + "./types.d.ts" + ], + "strict": true + }, + "include": [ + "**/_config.js" + ] +} diff --git a/test/types.d.ts b/test/types.d.ts new file mode 100644 index 00000000000..640c79b000f --- /dev/null +++ b/test/types.d.ts @@ -0,0 +1,20 @@ +/* eslint-disable @typescript-eslint/member-ordering */ +import type { SourceMap } from 'magic-string'; +import type { RollupError, RollupOptions } from '../src/rollup/types'; + +export interface RollupTestConfig { + solo?: boolean; + description: string; + command?: string; + options?: RollupOptions; + error?: RollupError; + test?: (code: string, map: SourceMap) => void | Promise; + + skipIfWindows?: boolean; + onlyWindows?: boolean; + minNodeVersion?: string; +} + +declare global { + function defineRollupTest(config: RollupTestConfig): RollupTestConfig; +} diff --git a/test/utils.js b/test/utils.js index 8dcbee5b7cc..f2d89371f31 100644 --- a/test/utils.js +++ b/test/utils.js @@ -181,6 +181,7 @@ function getFileNamesAndRemoveOutput(directory) { exports.getFileNamesAndRemoveOutput = getFileNamesAndRemoveOutput; function loadConfigAndRunTest(directory, runTest) { + globalThis.defineRollupTest ||= config => config; const configFile = join(directory, '_config.js'); const config = require(configFile); if (!config || !config.description) { From fd6709c0916672fa129f8d74d32c136b7e842f23 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 23 Apr 2023 13:41:29 +0200 Subject: [PATCH 02/15] chore: basic --- test/browser/index.js | 3 + test/browser/samples/basic/_config.js | 4 +- .../missing-dependency-resolution/_config.js | 4 +- .../missing-entry-resolution/_config.js | 4 +- .../renormalizes-external-paths/_config.js | 5 +- .../samples/supports-hashes/_config.js | 4 +- test/chunking-form/index.js | 3 + .../samples/aliasing-extensions/_config.js | 4 +- .../amd-id-auto-base-path-concat/_config.js | 4 +- .../samples/amd-id-auto-base-path/_config.js | 4 +- .../samples/amd-id-auto/_config.js | 4 +- .../_config.js | 4 +- .../asset-needs-code-reference/_config.js | 4 +- .../avoid-chunk-import-hoisting/_config.js | 4 +- .../samples/basic-chunking/_config.js | 4 +- .../chunk-deshadowing-reassignment/_config.js | 4 +- .../samples/chunk-execution-order/_config.js | 4 +- .../chunk-export-deshadowing/_config.js | 4 +- .../samples/chunk-export-renaming/_config.js | 4 +- .../chunk-import-deshadowing/_config.js | 4 +- .../samples/chunk-live-bindings/_config.js | 4 +- .../chunk-namespace-boundary/_config.js | 4 +- .../samples/chunk-naming/_config.js | 4 +- .../chunk-variable-name-conflict/_config.js | 4 +- .../samples/chunking-compact/_config.js | 4 +- .../samples/chunking-externals/_config.js | 4 +- .../samples/chunking-reexport/_config.js | 4 +- .../samples/chunking-source-maps/_config.js | 4 +- .../samples/chunking-star-external/_config.js | 4 +- .../samples/circular-entry-points/_config.js | 4 +- .../samples/circular-entry-points2/_config.js | 4 +- .../samples/circular-entry-points3/_config.js | 4 +- .../samples/circular-manual-chunks/_config.js | 4 +- .../combined-namespace-reexport/_config.js | 4 +- .../samples/custom-sanitizer/_config.js | 5 +- .../samples/deconflict-globals/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../default-export-name-conflict/_config.js | 4 +- .../default-identifier-renaming/_config.js | 4 +- .../default-reexport-namespace/_config.js | 4 +- .../avoid-imports-preserve-modules/_config.js | 4 +- .../circular-manual-chunks/_config.js | 4 +- .../dynamic-import-comments/_config.js | 4 +- .../dynamic-import-inlining-object/_config.js | 4 +- .../deprecated/dynamic-import-name/_config.js | 4 +- .../emit-file-chunk-facade/_config.js | 4 +- .../empty-module-no-treeshake/_config.js | 4 +- .../_config.js | 4 +- .../manual-chunk-avoid-facade/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../manual-chunk-is-entry-conflict/_config.js | 4 +- .../manual-chunk-is-entry-match/_config.js | 4 +- .../manual-chunks-different-nested/_config.js | 4 +- .../manual-chunks-dynamic-facades/_config.js | 4 +- .../_config.js | 4 +- .../manual-chunks-dynamic/_config.js | 4 +- .../manual-chunks-function/_config.js | 4 +- .../manual-chunks-nested/_config.js | 4 +- .../deprecated/manual-chunks/_config.js | 4 +- .../_config.js | 4 +- .../dynamic-import-default-mode/_config.js | 4 +- .../dynamic-import/_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-commonjs/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-empty/_config.js | 4 +- .../preserve-modules-export-alias/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-nested-export/_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-proxy-import/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-single-entry/_config.js | 4 +- .../_config.js | 4 +- .../deprecated/preserve-modules/_config.js | 4 +- .../samples/dynamic-import-chained/_config.js | 4 +- .../dynamic-import-chunking/_config.js | 4 +- .../dynamic-import-comments/_config.js | 4 +- .../samples/dynamic-import-dynamic/_config.js | 4 +- .../dynamic-import-external/_config.js | 4 +- .../samples/dynamic-import-facade/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../dynamic-import-inlining-object/_config.js | 4 +- .../dynamic-import-only-default/_config.js | 4 +- .../dynamic-import-only-reexports/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../dynamic-import-tree-shaking-1/_config.js | 4 +- .../dynamic-import-tree-shaking-2/_config.js | 4 +- .../samples/dynamic-import/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../emit-file/asset-file-names/_config.js | 4 +- .../deconflict-against-named-files/_config.js | 4 +- .../emit-file/deduplicate-assets/_config.js | 4 +- .../emit-asset-without-name/_config.js | 4 +- .../emit-file/emit-chunk-facade/_config.js | 4 +- .../emit-file/emit-chunk-filename/_config.js | 4 +- .../emit-chunk-name-conflict/_config.js | 4 +- .../emit-file/emit-chunk-named/_config.js | 4 +- .../emit-file/emit-chunk-order1/_config.js | 4 +- .../emit-file/emit-chunk-order2/_config.js | 4 +- .../emit-chunk-with-importer/_config.js | 4 +- .../emit-file/emit-chunk-worker/_config.js | 4 +- .../emit-file/emit-chunk-worklet/_config.js | 4 +- .../samples/emit-file/emit-chunk/_config.js | 4 +- .../emit-file/emits-existing-chunk/_config.js | 4 +- .../emits-files-from-various-hooks/_config.js | 4 +- .../_config.js | 4 +- .../filenames-function-patterns/_config.js | 5 +- .../emit-file/named-user-chunks/_config.js | 4 +- .../emit-file/reference-files/_config.js | 7 +- .../emit-file/sanitize-file-name/_config.js | 4 +- .../emit-file/set-asset-source/_config.js | 4 +- .../samples/empty-chunks/_config.js | 4 +- .../empty-module-no-treeshake/_config.js | 5 +- .../samples/entry-aliases/_config.js | 4 +- .../entry-chunk-export-mode/_config.js | 4 +- .../entry-point-without-own-code/_config.js | 4 +- .../samples/entrypoint-aliasing/_config.js | 4 +- .../samples/entrypoint-facade/_config.js | 4 +- .../export-default-from-entry/_config.js | 4 +- .../samples/external-imports/_config.js | 4 +- .../samples/external-reexports/_config.js | 4 +- .../samples/filenames-patterns/_config.js | 4 +- .../arrow-functions-false/_config.js | 4 +- .../arrow-functions-true/_config.js | 4 +- .../reserved-names-as-props-false/_config.js | 4 +- .../reserved-names-as-props-true/_config.js | 4 +- .../hashing/deconflict-hashes/_config.js | 4 +- .../samples/hashing/double-hash/_config.js | 4 +- .../samples/hashing/hash-size/_config.js | 4 +- .../samples/hashing/random-match/_config.js | 4 +- .../tree-shaken-dynamic-hash/_config.js | 4 +- .../ignore-chunk-name-query/_config.js | 4 +- .../dependant-entry-no-effects/_config.js | 4 +- .../_config.js | 4 +- .../implicitly-dependent-entry/_config.js | 4 +- .../multiple-dependencies/_config.js | 4 +- .../_config.js | 4 +- .../preserve-signature-false/_config.js | 4 +- .../preserve-signature-strict/_config.js | 4 +- .../same-chunk-dependency/_config.js | 4 +- .../_config.js | 4 +- .../shared-dependency-reexport/_config.js | 4 +- .../single-dependency/_config.js | 4 +- .../import-meta-numeric-paths/_config.js | 4 +- .../samples/import-meta-url/_config.js | 4 +- .../import-variable-duplicates/_config.js | 4 +- .../chained-dynamic-with-shared/_config.js | 4 +- .../circular-dynamic-imports/_config.js | 4 +- .../cut-off/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../dynamic-import-dynamic/_config.js | 4 +- .../dynamic-not-in-memory/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../single-dynamic/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../manual-chunk-avoid-facade/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../manual-chunk-is-entry-conflict/_config.js | 4 +- .../manual-chunk-is-entry-match/_config.js | 4 +- .../manual-chunk-not-included/_config.js | 4 +- .../manual-chunks-different-nested/_config.js | 4 +- .../manual-chunks-dynamic-facades/_config.js | 4 +- .../_config.js | 4 +- .../samples/manual-chunks-dynamic/_config.js | 4 +- .../samples/manual-chunks-function/_config.js | 4 +- .../samples/manual-chunks-nested/_config.js | 4 +- .../samples/manual-chunks/_config.js | 4 +- .../max-parallel-file-operations/_config.js | 4 +- .../avoid-circular-dependencies/_config.js | 4 +- .../avoid-transitive-side-effects/_config.js | 4 +- .../best-merge-target/_config.js | 4 +- .../ignore-correlated-side-effects/_config.js | 4 +- .../_config.js | 4 +- .../merge-chunk-into-shared/_config.js | 4 +- .../merge-correlated-side-effects/_config.js | 4 +- .../merge-dependency-side-effects/_config.js | 4 +- .../_config.js | 4 +- .../merge-dynamic-imports/_config.js | 4 +- .../merge-small-side-effect-chunks/_config.js | 4 +- .../min-chunk-size/merge-unrelated/_config.js | 4 +- .../no-merge-for-big-chunks/_config.js | 4 +- .../no-merge-side-effects/_config.js | 4 +- .../prefer-close-merge-target-a/_config.js | 4 +- .../prefer-close-merge-target-b/_config.js | 4 +- .../prefer-small-merge-target-a/_config.js | 4 +- .../prefer-small-merge-target-b/_config.js | 4 +- .../minify-internal-exports/_config.js | 4 +- .../samples/missing-export-compact/_config.js | 4 +- .../_config.js | 4 +- .../samples/missing-export/_config.js | 4 +- .../samples/multi-chunking/_config.js | 4 +- .../samples/multiple-entry-points/_config.js | 4 +- .../namespace-imports-from-chunks/_config.js | 4 +- .../namespace-object-import/_config.js | 4 +- .../_config.js | 4 +- .../samples/namespace-reexports/_config.js | 4 +- .../samples/namespace-retracing/_config.js | 4 +- .../dynamic-import-default-mode/_config.js | 4 +- .../dynamic-import/_config.js | 4 +- .../samples/namespace-tracing/_config.js | 4 +- .../samples/nested-chunks/_config.js | 4 +- .../samples/nested-dynamic-imports/_config.js | 4 +- .../no-minify-internal-exports/_config.js | 4 +- .../samples/no-treeshake-imports/_config.js | 4 +- .../allow-extension/_config.js | 4 +- .../exports-only-no-exports/_config.js | 4 +- .../exports-only/_config.js | 4 +- .../false/_config.js | 4 +- .../override-via-plugin/_config.js | 4 +- .../strict/_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-commonjs/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/preserve-modules-empty/_config.js | 4 +- .../preserve-modules-export-alias/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-nested-export/_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-proxy-import/_config.js | 4 +- .../_config.js | 4 +- .../samples/preserve-modules-root/_config.js | 4 +- .../_config.js | 4 +- .../preserve-modules-single-entry/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/preserve-modules/_config.js | 4 +- .../samples/reexport-from-entry/_config.js | 4 +- .../samples/reexport-shortpaths/_config.js | 4 +- .../samples/render-chunk-transform/_config.js | 4 +- .../samples/render-chunk/_config.js | 4 +- .../samples/render-dynamic-import/_config.js | 4 +- .../samples/resolve-dynamic-import/_config.js | 4 +- .../samples/resolve-file-url/_config.js | 4 +- .../samples/sanitize-chunk-names/_config.js | 4 +- .../sanitize-internal-exports/_config.js | 4 +- .../avoid-imports-preserve-modules/_config.js | 4 +- .../_config.js | 4 +- .../hoist-side-effect-modules/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../single-file-manual-chunk/_config.js | 4 +- .../chained-default-reexport/_config.js | 4 +- .../_config.js | 4 +- .../default-reexport/_config.js | 4 +- .../dynamic-import/_config.js | 4 +- .../synthetic-named-exports/entry/_config.js | 4 +- .../global-conflict/_config.js | 4 +- .../_config.js | 5 +- .../mixed-synthetic-named-exports/_config.js | 6 +- .../multi-level/_config.js | 4 +- .../namespace/_config.js | 4 +- .../_config.js | 4 +- .../samples/allow-output-prefix/_config.js | 4 +- test/cli/samples/amd/_config.js | 4 +- .../banner-intro-outro-footer/_config.js | 4 +- .../_config.js | 4 +- .../code-splitting-named-inputs/_config.js | 4 +- .../samples/config-async-function/_config.js | 4 +- .../cli/samples/config-cjs-dirname/_config.js | 4 +- .../_config.js | 4 +- .../config-cwd-case-insensitive/_config.js | 4 +- .../config-defineConfig-cjs/_config.js | 4 +- .../config-defineConfig-mjs/_config.js | 4 +- .../samples/config-env-multiple/_config.js | 4 +- test/cli/samples/config-env/_config.js | 4 +- test/cli/samples/config-es6/_config.js | 4 +- .../config-external-function/_config.js | 4 +- test/cli/samples/config-external/_config.js | 4 +- .../config-function-modify-command/_config.js | 4 +- test/cli/samples/config-function/_config.js | 4 +- .../cli/samples/config-import-meta/_config.js | 4 +- test/cli/samples/config-json/_config.js | 4 +- .../samples/config-missing-export/_config.js | 4 +- .../cli/samples/config-mjs-plugins/_config.js | 4 +- test/cli/samples/config-mjs/_config.js | 4 +- .../config-multiple-getfilename/_config.js | 4 +- .../config-multiple-source-maps/_config.js | 4 +- test/cli/samples/config-no-output/_config.js | 4 +- test/cli/samples/config-override/_config.js | 4 +- .../samples/config-plugin-entry/_config.js | 4 +- .../cli/samples/config-promise-cjs/_config.js | 4 +- .../cli/samples/config-promise-mjs/_config.js | 4 +- test/cli/samples/config-promise/_config.js | 4 +- test/cli/samples/config-true/_config.js | 4 +- test/cli/samples/config-ts/_config.js | 4 +- .../cli/samples/config-type-module/_config.js | 4 +- test/cli/samples/config-warnings/_config.js | 4 +- test/cli/samples/config/_config.js | 4 +- test/cli/samples/context/_config.js | 4 +- .../samples/custom-frame-with-pos/_config.js | 4 +- test/cli/samples/custom-frame/_config.js | 4 +- .../_config.js | 4 +- .../duplicate-import-options/_config.js | 4 +- .../emit-file-multiple-dirs/_config.js | 4 +- .../samples/empty-chunk-multiple/_config.js | 4 +- test/cli/samples/empty-chunk/_config.js | 4 +- .../external-modules-auto-global/_config.js | 4 +- test/cli/samples/external-modules/_config.js | 4 +- .../samples/fail-after-warnings/_config.js | 4 +- test/cli/samples/format-aliases/_config.js | 4 +- .../generated-code-preset-override/_config.js | 4 +- .../generated-code-unknown-preset/_config.js | 4 +- .../cli/samples/import-esm-package/_config.js | 4 +- test/cli/samples/indent-none/_config.js | 4 +- test/cli/samples/interop/_config.js | 4 +- test/cli/samples/log-side-effects/_config.js | 4 +- .../cli/samples/merge-deprecations/_config.js | 4 +- .../samples/merge-treeshake-false/_config.js | 4 +- test/cli/samples/merge-treeshake/_config.js | 4 +- test/cli/samples/module-name/_config.js | 4 +- test/cli/samples/multiple-configs/_config.js | 4 +- .../_config.js | 4 +- .../multiple-targets-shared-config/_config.js | 4 +- test/cli/samples/multiple-targets/_config.js | 4 +- test/cli/samples/no-color/_config.js | 4 +- test/cli/samples/no-conflict/_config.js | 4 +- test/cli/samples/no-strict/_config.js | 4 +- test/cli/samples/no-treeshake/_config.js | 4 +- .../node-config-auto-prefix/_config.js | 4 +- .../samples/node-config-not-found/_config.js | 4 +- test/cli/samples/node-config/_config.js | 4 +- .../samples/paths-output-option/_config.js | 4 +- .../samples/plugin/absolute-esm/_config.js | 4 +- test/cli/samples/plugin/absolute/_config.js | 4 +- .../samples/plugin/advanced-esm/_config.js | 4 +- test/cli/samples/plugin/advanced/_config.js | 4 +- test/cli/samples/plugin/basic/_config.js | 4 +- .../cli/samples/plugin/cannot-load/_config.js | 4 +- .../samples/plugin/default-export/_config.js | 4 +- .../plugin/export-not-found/_config.js | 4 +- .../plugin/invalid-argument/_config.js | 4 +- test/cli/samples/plugin/object/_config.js | 4 +- .../plugin/relative-camelized/_config.js | 4 +- .../samples/plugin/relative-esm/_config.js | 4 +- test/cli/samples/plugin/relative/_config.js | 4 +- .../property-read-side-effects/_config.js | 4 +- .../propertyReadSideEffects-always/_config.js | 4 +- test/cli/samples/silent-onwarn/_config.js | 4 +- test/cli/samples/silent/_config.js | 4 +- test/cli/samples/sourcemap-hidden/_config.js | 4 +- test/cli/samples/sourcemap-newline/_config.js | 4 +- test/cli/samples/stdin/commonjs/_config.js | 4 +- test/cli/samples/stdin/config-file/_config.js | 4 +- .../samples/stdin/force-stdin-tty/_config.js | 4 +- test/cli/samples/stdin/json/_config.js | 4 +- test/cli/samples/stdin/no-dash/_config.js | 4 +- .../stdin/no-stdin-config-file/_config.js | 4 +- .../cli/samples/stdin/no-stdin-tty/_config.js | 4 +- test/cli/samples/stdin/self-import/_config.js | 4 +- test/cli/samples/stdin/stdin-error/_config.js | 4 +- test/cli/samples/stdin/with-dash/_config.js | 4 +- .../samples/stdout-code-splitting/_config.js | 4 +- .../stdout-only-inline-sourcemaps/_config.js | 4 +- .../samples/stdout-single-input/_config.js | 4 +- test/cli/samples/symlinked-config/_config.js | 4 +- .../samples/symlinked-named-config/_config.js | 4 +- .../treeshake-preset-override/_config.js | 4 +- .../treeshake-unknown-preset/_config.js | 4 +- .../unfulfilled-hook-actions-error/_config.js | 4 +- .../_config.js | 4 +- .../unfulfilled-hook-actions/_config.js | 4 +- test/cli/samples/validate/_config.js | 4 +- .../wait-for-bundle-input-object/_config.js | 4 +- .../samples/wait-for-bundle-input/_config.js | 4 +- .../samples/warn-broken-sourcemap/_config.js | 4 +- .../samples/warn-broken-sourcemaps/_config.js | 4 +- .../samples/warn-circular-multiple/_config.js | 4 +- test/cli/samples/warn-circular/_config.js | 4 +- .../cli/samples/warn-eval-multiple/_config.js | 4 +- test/cli/samples/warn-eval/_config.js | 4 +- .../cli/samples/warn-import-export/_config.js | 4 +- .../warn-missing-global-multiple/_config.js | 4 +- .../samples/warn-missing-global/_config.js | 4 +- .../warn-mixed-exports-multiple/_config.js | 4 +- test/cli/samples/warn-multiple/_config.js | 4 +- test/cli/samples/warn-plugin-loc/_config.js | 4 +- test/cli/samples/warn-plugin/_config.js | 4 +- test/cli/samples/warn-this/_config.js | 4 +- .../samples/warn-unknown-options/_config.js | 4 +- .../cli/samples/watch/bundle-error/_config.js | 4 +- test/cli/samples/watch/clearScreen/_config.js | 4 +- test/cli/samples/watch/close-error/_config.js | 4 +- .../watch/close-on-generate-error/_config.js | 4 +- test/cli/samples/watch/close-stdin/_config.js | 4 +- .../watch/no-clearScreen-command/_config.js | 4 +- .../samples/watch/no-clearScreen/_config.js | 4 +- .../samples/watch/no-config-file/_config.js | 4 +- .../watch/no-watch-by-default/_config.js | 4 +- .../watch/no-watched-config/_config.js | 4 +- .../samples/watch/node-config-file/_config.js | 4 +- .../watch-config-early-update/_config.js | 4 +- .../watch/watch-config-error/_config.js | 4 +- .../watch-config-initial-error/_config.js | 4 +- .../watch/watch-config-no-update/_config.js | 4 +- .../watch/watch-event-hooks-error/_config.js | 4 +- .../watch/watch-event-hooks/_config.js | 4 +- test/file-hashes/index.js | 3 + .../samples/augment-chunk-hash/_config.js | 4 +- test/file-hashes/samples/banner/_config.js | 4 +- .../file-hashes/samples/chunk-name/_config.js | 4 +- test/file-hashes/samples/content/_config.js | 4 +- .../samples/dependency-content/_config.js | 4 +- .../samples/export-order-2/_config.js | 4 +- .../samples/export-order/_config.js | 4 +- test/file-hashes/samples/exports/_config.js | 4 +- .../external-dependency-names/_config.js | 4 +- test/file-hashes/samples/footer/_config.js | 4 +- test/file-hashes/samples/format/_config.js | 4 +- .../samples/internal-exports/_config.js | 4 +- test/file-hashes/samples/intro/_config.js | 4 +- .../samples/name-pattern/_config.js | 4 +- test/file-hashes/samples/outro/_config.js | 4 +- .../samples/render-chunk-changes/_config.js | 4 +- test/form/index.js | 3 + .../samples/absolute-path-resolver/_config.js | 4 +- .../samples/acorn-external-plugins/_config.js | 4 +- test/form/samples/addon-functions/_config.js | 4 +- test/form/samples/amd-id-auto/_config.js | 4 +- test/form/samples/amd-id/_config.js | 4 +- .../samples/amd-keep-extension/_config.js | 4 +- .../no-default-deoptimization/_config.js | 4 +- .../no-global-call-deoptimization/_config.js | 4 +- .../return-function-deoptimization/_config.js | 4 +- .../array-elements/_config.js | 4 +- .../array-mutation/_config.js | 4 +- .../array-spread/_config.js | 4 +- .../spread-element-deoptimization/_config.js | 4 +- .../arrow-function-call-parameters/_config.js | 4 +- .../arrow-function-return-values/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/assignment-to-exports/_config.js | 4 +- .../samples/assignment-to-global/_config.js | 4 +- .../samples/async-function-effects/_config.js | 4 +- .../samples/async-function-unused/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../form/samples/banner-and-footer/_config.js | 4 +- test/form/samples/base64-deshadow/_config.js | 4 +- test/form/samples/big-int/_config.js | 4 +- .../samples/binary-expressions/_config.js | 4 +- test/form/samples/block-comments/_config.js | 4 +- .../samples/body-less-for-loops/_config.js | 4 +- .../_config.js | 4 +- .../break-statement-labels-switch/_config.js | 4 +- .../break-statement-labels/_config.js | 4 +- .../break-statement-loops/_config.js | 4 +- .../caught-errors/_config.js | 4 +- .../hoisted-declarations/_config.js | 4 +- .../if-statement-breaks/_config.js | 4 +- .../if-statement-errors/_config.js | 4 +- .../break-control-flow/loop-errors/_config.js | 4 +- .../return-statements/_config.js | 4 +- .../switch-errors/_config.js | 4 +- .../thrown-errors/_config.js | 4 +- .../array-expression/_config.js | 4 +- .../_config.js | 4 +- .../builtin-prototypes/literal/_config.js | 4 +- .../object-expression/_config.js | 4 +- .../_config.js | 4 +- .../template-literal/_config.js | 4 +- .../catch-parameter-shadowing/_config.js | 4 +- .../samples/chained-assignments/_config.js | 4 +- .../circular-member-expression/_config.js | 4 +- .../class-constructor-side-effect/_config.js | 4 +- test/form/samples/class-fields/_config.js | 4 +- .../samples/class-method-access/_config.js | 4 +- .../_config.js | 4 +- .../form/samples/class-without-new/_config.js | 4 +- .../samples/comment-before-import/_config.js | 4 +- .../comment-start-inside-comment/_config.js | 4 +- .../samples/compact-empty-external/_config.js | 4 +- .../compact-multiple-imports/_config.js | 4 +- .../samples/compact-named-export/_config.js | 4 +- test/form/samples/compact/_config.js | 4 +- .../_config.js | 4 +- .../samples/computed-properties/_config.js | 4 +- .../_config.js | 4 +- .../conditional-expression-paths/_config.js | 4 +- .../samples/conditional-expression/_config.js | 4 +- .../_config.js | 4 +- .../samples/configure-file-url/_config.js | 4 +- .../samples/conflicting-imports/_config.js | 4 +- test/form/samples/curried-function/_config.js | 4 +- test/form/samples/custom-context/_config.js | 4 +- .../_config.js | 4 +- .../custom-module-context-function/_config.js | 4 +- .../samples/custom-module-context/_config.js | 4 +- .../declarations-with-side-effects/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../deconflict-module-priority/_config.js | 4 +- .../deconflict-nested-tree-shaking/_config.js | 4 +- .../deconflict-tree-shaken-globals/_config.js | 4 +- .../samples/deconflict-tree-shaken/_config.js | 4 +- .../dedupes-external-imports/_config.js | 4 +- .../samples/deep-properties-access/_config.js | 4 +- test/form/samples/deep-properties/_config.js | 4 +- .../deep-switch-declarations/_config.js | 4 +- .../_config.js | 4 +- .../samples/default-export-class/_config.js | 4 +- .../default-export-live-binding/_config.js | 4 +- .../samples/default-export-mode/_config.js | 4 +- .../default-identifier-deshadowing/_config.js | 4 +- .../define-es-modules-false/_config.js | 4 +- .../samples/define-replacement/_config.js | 4 +- .../form/samples/deopt-regexp-type/_config.js | 4 +- .../deopt-string-concatenation/_config.js | 4 +- .../samples/deoptimize-superclass/_config.js | 4 +- .../_config.js | 4 +- .../dynamic-import-inlining-array/_config.js | 4 +- .../dynamic-import-inlining/_config.js | 4 +- .../_config.js | 4 +- .../entry-default/_config.js | 4 +- .../namespace-tostring/entry-named/_config.js | 4 +- .../external-namespaces/_config.js | 4 +- .../inlined-namespace/_config.js | 4 +- .../nested-inlined-dynamic-import/_config.js | 4 +- .../deprecated/prefer-const/_config.js | 4 +- .../duplicated-var-declarations/_config.js | 4 +- .../dynamic-import-inlining-array/_config.js | 4 +- .../dynamic-import-inlining/_config.js | 4 +- .../dynamic-import-this-arrow/_config.js | 4 +- .../dynamic-import-this-function/_config.js | 4 +- .../dynamic-import-unresolvable/_config.js | 4 +- .../_config.js | 4 +- .../early-bind-member-expressions/_config.js | 4 +- .../_config.js | 4 +- .../samples/effect-in-for-of-loop/_config.js | 4 +- test/form/samples/emit-asset-file/_config.js | 4 +- .../emit-file-tree-shaken-access/_config.js | 4 +- .../emit-uint8array-no-buffer/_config.js | 4 +- .../samples/empty-block-statement/_config.js | 4 +- .../empty-do-while-statement/_config.js | 4 +- .../samples/empty-for-in-statement/_config.js | 4 +- .../samples/empty-for-statement/_config.js | 4 +- .../samples/empty-if-statement/_config.js | 4 +- .../empty-statement-consequent/_config.js | 4 +- test/form/samples/empty-statement/_config.js | 4 +- .../samples/empty-switch-statement/_config.js | 4 +- .../empty-try-catch-statement/_config.js | 4 +- .../samples/empty-while-statement/_config.js | 4 +- .../samples/enforce-addon-order/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../exponentiation-operator/_config.js | 4 +- .../export-all-before-named/_config.js | 4 +- .../export-all-from-internal/_config.js | 4 +- .../samples/export-all-multiple/_config.js | 4 +- test/form/samples/export-default-2/_config.js | 4 +- test/form/samples/export-default-3/_config.js | 4 +- test/form/samples/export-default-4/_config.js | 4 +- .../_config.js | 4 +- .../samples/export-default-global/_config.js | 4 +- .../samples/export-default-import/_config.js | 4 +- test/form/samples/export-default/_config.js | 4 +- test/form/samples/export-globals/_config.js | 4 +- .../export-internal-namespace-as/_config.js | 4 +- .../samples/export-live-bindings/_config.js | 4 +- .../samples/export-multiple-vars/_config.js | 4 +- .../samples/export-namespace-as/_config.js | 4 +- .../_config.js | 4 +- .../exports-at-end-if-possible/_config.js | 4 +- test/form/samples/extend-exports/_config.js | 4 +- .../extend-namespaced-exports/_config.js | 4 +- .../samples/external-deshadowing/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../external-export-tracing/_config.js | 4 +- .../external-import-alias-shadow/_config.js | 4 +- .../samples/external-import-order/_config.js | 4 +- .../_config.js | 4 +- .../external-imports-custom-names/_config.js | 4 +- test/form/samples/external-imports/_config.js | 4 +- .../external-namespace-and-named/_config.js | 4 +- .../external-namespace-reexport/_config.js | 4 +- test/form/samples/for-in-scopes/_config.js | 4 +- .../samples/for-loop-assignment/_config.js | 4 +- .../for-loop-body-var-declaration/_config.js | 4 +- .../for-loop-with-empty-head/_config.js | 4 +- test/form/samples/for-of-scopes/_config.js | 4 +- test/form/samples/for-scopes/_config.js | 4 +- test/form/samples/freeze/_config.js | 4 +- .../function-body-return-values/_config.js | 4 +- .../function-call-parameters/_config.js | 4 +- .../function-iterable-prototype/_config.js | 4 +- .../form/samples/function-mutation/_config.js | 4 +- test/form/samples/function-scopes/_config.js | 4 +- .../arrow-functions-false/_config.js | 4 +- .../arrow-functions-true/_config.js | 4 +- .../const-bindings-false/_config.js | 4 +- .../const-bindings-true/_config.js | 4 +- .../object-shorthand-false/_config.js | 4 +- .../object-shorthand-true/_config.js | 4 +- .../_config.js | 4 +- .../reserved-names-as-props-false/_config.js | 4 +- .../_config.js | 4 +- .../reserved-names-as-props-true/_config.js | 4 +- .../generated-code-presets/es2015/_config.js | 4 +- .../generated-code-presets/es5/_config.js | 4 +- .../preset-with-override/_config.js | 4 +- .../arrow-functions-false/_config.js | 4 +- .../arrow-functions-true/_config.js | 4 +- .../const-bindings-false/_config.js | 4 +- .../const-bindings-true/_config.js | 4 +- .../object-shorthand-false/_config.js | 4 +- .../object-shorthand-true/_config.js | 4 +- .../_config.js | 4 +- .../reserved-names-as-props-false/_config.js | 4 +- .../_config.js | 4 +- .../reserved-names-as-props-true/_config.js | 4 +- .../samples/getter-return-values/_config.js | 4 +- test/form/samples/globals-function/_config.js | 4 +- .../_config.js | 4 +- .../samples/guessed-global-names/_config.js | 4 +- .../samples/handles-async-await/_config.js | 4 +- .../handles-empty-imports-iife/_config.js | 4 +- .../handles-empty-imports-umd/_config.js | 4 +- test/form/samples/hashbang/_config.js | 4 +- .../hoisted-unused-conditional/_config.js | 4 +- .../hoisted-variable-case-stmt/_config.js | 4 +- .../hoisted-variable-if-stmt/_config.js | 4 +- .../hoisted-vars-in-dead-branches/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../implicit-undefined-assignments/_config.js | 4 +- .../assertion-shapes/_config.js | 4 +- .../keep-dynamic-assertions/_config.js | 4 +- .../keeps-static-assertions/_config.js | 4 +- .../_config.js | 4 +- .../plugin-assertions-resolveid/_config.js | 4 +- .../removes-dynamic-assertions/_config.js | 4 +- .../removes-static-assertions/_config.js | 4 +- .../form/samples/import-expression/_config.js | 4 +- .../_config.js | 4 +- .../samples/import-meta-resolve/_config.js | 4 +- test/form/samples/import-meta-url/_config.js | 4 +- test/form/samples/import-meta/_config.js | 4 +- .../_config.js | 4 +- .../import-namespace-systemjs/_config.js | 4 +- test/form/samples/import-namespace/_config.js | 4 +- .../import-specifier-deshadowing/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- test/form/samples/indent-false/_config.js | 4 +- test/form/samples/indent-spaces/_config.js | 4 +- .../samples/indent-true-spaces/_config.js | 4 +- test/form/samples/indent-true/_config.js | 4 +- .../_config.js | 4 +- .../internal-conflict-resolution/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/interop-per-dependency/_config.js | 4 +- .../_config.js | 4 +- test/form/samples/intro-and-outro/_config.js | 4 +- .../invalid-binary-expressions/_config.js | 4 +- .../samples/json-parse-is-not-pure/_config.js | 4 +- .../json-stringify-is-not-pure/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- test/form/samples/known-globals/_config.js | 4 +- .../labeled-break-statements/_config.js | 4 +- .../labeled-continue-statements/_config.js | 4 +- .../samples/large-var-cnt-deduping/_config.js | 4 +- .../lazy-assignment-deoptimization/_config.js | 4 +- .../literals-from-class-statics/_config.js | 4 +- .../_config.js | 4 +- .../deopzimize-while-included/_config.js | 4 +- .../mutate-logical-expression/_config.js | 4 +- .../simplify-non-boolean/_config.js | 4 +- .../make-relative-false/_config.js | 4 +- .../make-relative-relative/_config.js | 4 +- .../make-relative-true/_config.js | 4 +- .../samples/manual-pure-functions/_config.js | 4 +- .../merge-namespaces-non-live/_config.js | 4 +- test/form/samples/merge-namespaces/_config.js | 4 +- .../samples/minimal-this-mutation/_config.js | 4 +- test/form/samples/mjs/_config.js | 4 +- .../samples/modify-class-prototype/_config.js | 4 +- .../samples/modify-export-semi/_config.js | 4 +- .../module-name-scoped-package/_config.js | 4 +- test/form/samples/module-name-wat/_config.js | 4 +- .../module-name-with-dashes/_config.js | 4 +- .../samples/module-no-treeshake/_config.js | 4 +- .../samples/multi-expression-calls/_config.js | 4 +- test/form/samples/multiple-exports/_config.js | 4 +- .../samples/mutations-in-imports/_config.js | 4 +- .../samples/namespace-conflict/_config.js | 4 +- .../namespace-import-reexport-2/_config.js | 4 +- .../namespace-import-reexport/_config.js | 4 +- .../_config.js | 4 +- .../namespace-object-import/_config.js | 4 +- .../namespace-optimization-b/_config.js | 4 +- .../_config.js | 4 +- .../samples/namespace-optimization/_config.js | 4 +- .../namespace-reexport-name/_config.js | 4 +- .../samples/namespace-self-import/_config.js | 4 +- .../entry-default/_config.js | 4 +- .../namespace-tostring/entry-named/_config.js | 4 +- .../external-namespaces/_config.js | 4 +- .../_config.js | 4 +- .../inlined-namespace/_config.js | 4 +- .../namespaced-default-exports/_config.js | 4 +- .../namespaced-named-exports/_config.js | 4 +- .../namespaces-have-null-prototype/_config.js | 4 +- .../samples/nested-deoptimization/_config.js | 4 +- .../nested-inlined-dynamic-import/_config.js | 4 +- .../samples/nested-member-access/_config.js | 4 +- .../samples/nested-pure-comments/_config.js | 4 +- .../nested-this-expressions/_config.js | 4 +- .../samples/nested-tree-shaking/_config.js | 4 +- .../new-target-meta-property/_config.js | 4 +- .../_config.js | 4 +- .../no-external-live-bindings/_config.js | 4 +- .../samples/no-imports-or-exports/_config.js | 4 +- .../samples/no-treeshake-conflict/_config.js | 4 +- .../_config.js | 4 +- .../no-treeshake-include-labels/_config.js | 4 +- .../no-treeshake-namespace-object/_config.js | 4 +- test/form/samples/no-treeshake/_config.js | 4 +- .../non-empty-block-statement/_config.js | 4 +- .../ns-external-star-reexport/_config.js | 4 +- .../samples/nullish-coalescing/_config.js | 4 +- .../samples/numeric_separators/_config.js | 4 +- .../samples/object-define-property/_config.js | 4 +- .../_config.js | 4 +- .../computed-properties/_config.js | 4 +- .../method-side-effects/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../proto-property/_config.js | 4 +- .../reassign-prop-without-proto/_config.js | 4 +- .../return-expressions/_config.js | 4 +- .../unknown-getter-no-side-effect/_config.js | 4 +- .../unknown-setter-no-side-effect/_config.js | 4 +- .../unknown-setter-no-side-effect2/_config.js | 4 +- .../samples/object-freeze-effects/_config.js | 4 +- .../_config.js | 4 +- .../optional-chaining-namespace/_config.js | 4 +- .../form/samples/optional-chaining/_config.js | 4 +- .../samples/output-named-library/_config.js | 4 +- .../override-external-namespace/_config.js | 4 +- test/form/samples/paths-function/_config.js | 4 +- test/form/samples/paths-relative/_config.js | 4 +- test/form/samples/paths/_config.js | 4 +- .../samples/pattern-assignments/_config.js | 4 +- .../pattern-member-expressions/_config.js | 4 +- .../samples/per-output-plugins/_config.js | 4 +- test/form/samples/preserve-asm-js/_config.js | 4 +- .../form/samples/preserve-debugger/_config.js | 4 +- .../_config.js | 4 +- .../probe-external-namespace/_config.js | 4 +- test/form/samples/promises/_config.js | 4 +- .../samples/proper-this-context/_config.js | 4 +- .../access-when-called-effect/_config.js | 4 +- .../early-access-getter-return/_config.js | 4 +- .../early-access-getter-value/_config.js | 4 +- .../shadowed-setters/_config.js | 4 +- .../samples/protect-cjs-globals/_config.js | 4 +- test/form/samples/proto-null/_config.js | 4 +- .../samples/prototype-functions/_config.js | 4 +- .../prune-pure-unused-import-array/_config.js | 4 +- .../_config.js | 4 +- .../prune-pure-unused-import/_config.js | 4 +- test/form/samples/pure-class-field/_config.js | 4 +- .../pure-comment-line-break/_config.js | 4 +- .../pure-comment-scenarios-complex/_config.js | 4 +- .../pure-comment-scenarios-simple/_config.js | 4 +- .../samples/pure-comments-disabled/_config.js | 4 +- .../samples/pure-comments-multiple/_config.js | 4 +- test/form/samples/quote-id/_config.js | 4 +- .../samples/re-export-aliasing/_config.js | 4 +- .../_config.js | 4 +- .../samples/recursive-assignments/_config.js | 4 +- test/form/samples/recursive-calls/_config.js | 4 +- .../recursive-computed-members/_config.js | 4 +- .../recursive-literal-values/_config.js | 4 +- .../recursive-multi-expressions/_config.js | 4 +- .../_config.js | 4 +- .../recursive-this-deoptimization/_config.js | 4 +- test/form/samples/recursive-values/_config.js | 4 +- test/form/samples/redeclarations/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../reexport-external-default/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/reexport-external-name/_config.js | 4 +- .../reexport-external-namespace-as/_config.js | 4 +- .../reexport-external-namespace/_config.js | 4 +- test/form/samples/reexport-self/_config.js | 4 +- .../samples/reexport-star-deshadow/_config.js | 4 +- .../_config.js | 4 +- .../samples/relative-external-ids/_config.js | 4 +- .../relative-external-with-global/_config.js | 4 +- .../remove-invalid-pure-comments/_config.js | 4 +- .../_config.js | 4 +- .../remove-treeshaken-banners/_config.js | 4 +- .../_config.js | 4 +- .../removes-unused-babel-helpers/_config.js | 4 +- .../renamed-pattern-defaults/_config.js | 4 +- .../render-chunk-plugin-sourcemaps/_config.js | 4 +- .../samples/render-chunk-plugin/_config.js | 4 +- .../render-declaration-semicolons/_config.js | 4 +- .../_config.js | 4 +- .../render-removed-declarations/_config.js | 4 +- .../render-removed-statements/_config.js | 4 +- .../_config.js | 4 +- test/form/samples/resolution-order/_config.js | 4 +- .../_config.js | 4 +- .../resolve-import-meta-url-export/_config.js | 4 +- .../resolve-import-meta-url/_config.js | 4 +- .../samples/return-after-error/_config.js | 4 +- .../return-statement/missing-space/_config.js | 4 +- .../_config.js | 4 +- .../runs-output-plugins-last/_config.js | 4 +- .../_config.js | 4 +- .../samples/self-calling-function/_config.js | 4 +- .../samples/self-contained-bundle/_config.js | 4 +- .../samples/self-deoptimization/_config.js | 4 +- .../samples/sequence-expression/_config.js | 4 +- .../samples/shorthand-properties/_config.js | 4 +- test/form/samples/side-effect-b/_config.js | 4 +- test/form/samples/side-effect-c/_config.js | 4 +- test/form/samples/side-effect-d/_config.js | 4 +- .../side-effect-default-reexport/_config.js | 4 +- test/form/samples/side-effect-e/_config.js | 4 +- .../side-effect-es5-classes/_config.js | 4 +- test/form/samples/side-effect-f/_config.js | 4 +- test/form/samples/side-effect-g/_config.js | 4 +- test/form/samples/side-effect-h/_config.js | 4 +- test/form/samples/side-effect-i/_config.js | 4 +- test/form/samples/side-effect-j/_config.js | 4 +- test/form/samples/side-effect-k/_config.js | 4 +- test/form/samples/side-effect-l/_config.js | 4 +- test/form/samples/side-effect-m/_config.js | 4 +- test/form/samples/side-effect-n/_config.js | 4 +- test/form/samples/side-effect-o/_config.js | 4 +- test/form/samples/side-effect-p/_config.js | 4 +- test/form/samples/side-effect-q/_config.js | 4 +- test/form/samples/side-effect-r/_config.js | 4 +- test/form/samples/side-effect-s/_config.js | 4 +- test/form/samples/side-effect-t/_config.js | 4 +- .../_config.js | 4 +- test/form/samples/side-effect/_config.js | 4 +- .../samples/side-effects-await/_config.js | 4 +- .../side-effects-break-statements/_config.js | 4 +- .../side-effects-call-arguments/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/side-effects-delete/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../side-effects-es6-super-classes/_config.js | 4 +- .../_config.js | 4 +- .../side-effects-generators/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../side-effects-internal-modules/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../side-effects-pattern-defaults/_config.js | 4 +- .../_config.js | 4 +- .../side-effects-reassignment/_config.js | 4 +- .../side-effects-return-statements/_config.js | 4 +- .../side-effects-static-methods/_config.js | 4 +- .../side-effects-switch-statements/_config.js | 4 +- .../form/samples/side-effects-this/_config.js | 4 +- .../samples/simplified-initializer/_config.js | 4 +- .../_config.js | 4 +- .../simplify-return-expression/_config.js | 4 +- .../samples/skips-dead-branches-b/_config.js | 4 +- .../samples/skips-dead-branches-c/_config.js | 4 +- .../samples/skips-dead-branches-d/_config.js | 4 +- .../samples/skips-dead-branches-e/_config.js | 4 +- .../samples/skips-dead-branches-f/_config.js | 4 +- .../samples/skips-dead-branches-g/_config.js | 4 +- .../samples/skips-dead-branches-h/_config.js | 4 +- .../samples/skips-dead-branches-i/_config.js | 4 +- .../samples/skips-dead-branches-j/_config.js | 4 +- .../samples/skips-dead-branches/_config.js | 4 +- .../slash-in-function-parameters/_config.js | 4 +- .../sourcemaps-excludesources/_config.js | 4 +- .../samples/sourcemaps-external/_config.js | 4 +- .../form/samples/sourcemaps-hidden/_config.js | 4 +- .../form/samples/sourcemaps-inline/_config.js | 4 +- .../_config.js | 4 +- .../samples/static-block-render/_config.js | 4 +- .../static-class-property-calls/_config.js | 4 +- .../static-method-deoptimization/_config.js | 4 +- test/form/samples/strict-false/_config.js | 4 +- .../samples/string-indentation-b/_config.js | 4 +- .../samples/string-indentation/_config.js | 4 +- .../string-replace-side-effects/_config.js | 4 +- .../super-class-no-side-effects/_config.js | 4 +- .../super-class-prototype-access/_config.js | 4 +- .../_config.js | 4 +- .../super-class-prototype-calls/_config.js | 4 +- .../super-class-prototype-values/_config.js | 4 +- test/form/samples/supports-core-js/_config.js | 4 +- .../form/samples/supports-es5-shim/_config.js | 4 +- .../form/samples/supports-es6-shim/_config.js | 4 +- test/form/samples/switch-scopes/_config.js | 4 +- .../synthetic-named-exports/_config.js | 4 +- test/form/samples/system-comments/_config.js | 4 +- .../system-default-comments/_config.js | 4 +- .../system-export-declarations/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../system-export-rendering/_config.js | 4 +- .../samples/system-module-reserved/_config.js | 4 +- .../_config.js | 4 +- .../samples/system-null-setters/_config.js | 4 +- test/form/samples/system-reexports/_config.js | 4 +- test/form/samples/system-semicolon/_config.js | 4 +- .../samples/system-uninitialized/_config.js | 4 +- .../tdz-access-in-declaration/_config.js | 4 +- test/form/samples/tdz-common/_config.js | 4 +- .../samples/tdz-pattern-access/_config.js | 4 +- .../computed-properties/_config.js | 4 +- .../simplify-conditionals/_config.js | 4 +- .../samples/this-in-class-body/_config.js | 4 +- test/form/samples/this-in-imports/_config.js | 4 +- .../form/samples/this-is-undefined/_config.js | 4 +- test/form/samples/top-level-await/_config.js | 4 +- .../_config.js | 4 +- .../tree-shake-curried-functions/_config.js | 4 +- .../tree-shake-default-exports/_config.js | 4 +- .../tree-shake-if-statements/_config.js | 4 +- .../tree-shake-logical-expressions/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../treeshake-classes-with-fields/_config.js | 4 +- .../argument-side-effects/_config.js | 4 +- .../arguments-variable/_config.js | 4 +- .../arrow-function-arguments/_config.js | 4 +- .../function-arguments/_config.js | 4 +- .../namespace-members/_config.js | 4 +- .../patterns/_config.js | 4 +- .../rest-element/_config.js | 4 +- .../unused-parameters/_config.js | 4 +- .../treeshake-import-meta-props/_config.js | 4 +- .../samples/treeshake-import-meta/_config.js | 4 +- test/form/samples/treeshake-json/_config.js | 4 +- .../treeshake-namespace-access/_config.js | 4 +- .../preset-with-override/_config.js | 4 +- .../treeshake-presets/recommended/_config.js | 4 +- .../treeshake-presets/safest/_config.js | 4 +- .../treeshake-presets/smallest/_config.js | 4 +- .../samples/treeshake-presets/true/_config.js | 4 +- .../treeshake-sequence-expressions/_config.js | 4 +- .../deactivate-via-option/_config.js | 4 +- .../direct-inclusion/_config.js | 4 +- .../follow-parameters/_config.js | 4 +- .../follow-pattern-parameters/_config.js | 4 +- .../follow-variables/_config.js | 4 +- .../include-via-outside-variable/_config.js | 4 +- .../supports-core-js/_config.js | 4 +- .../samples/typeof-side-effect/_config.js | 4 +- .../samples/umd-noconflict-extend/_config.js | 4 +- .../umd-noconflict-namespaced/_config.js | 4 +- .../umd-noconflict-no-exports/_config.js | 4 +- test/form/samples/umd-noconflict/_config.js | 4 +- .../form/samples/unary-expressions/_config.js | 4 +- .../undefined-default-export/_config.js | 4 +- test/form/samples/undefined-var/_config.js | 4 +- .../samples/unknown-token-effects/_config.js | 4 +- .../_config.js | 4 +- .../unmodified-default-exports/_config.js | 4 +- .../samples/unused-called-import/_config.js | 4 +- .../_config.js | 4 +- .../samples/unused-default-exports/_config.js | 4 +- .../_config.js | 4 +- test/form/samples/unused-import/_config.js | 4 +- .../_config.js | 4 +- test/form/samples/unused-var/_config.js | 4 +- .../update-expression-side-effects/_config.js | 4 +- .../samples/updating-assignments/_config.js | 4 +- test/form/samples/url-external/_config.js | 4 +- .../use-class-name-in-static-block/_config.js | 4 +- .../use-global-map-for-export-name/_config.js | 4 +- .../_config.js | 4 +- .../wrap-simplified-expressions/_config.js | 4 +- .../yield-expression/missing-space/_config.js | 4 +- .../samples/access-instance-prop/_config.js | 4 +- .../add-watch-file-generate/_config.js | 4 +- .../_config.js | 4 +- .../adds-semicolons-if-necessary-b/_config.js | 4 +- .../adds-semicolons-if-necessary-c/_config.js | 4 +- .../adds-semicolons-if-necessary-d/_config.js | 4 +- .../adds-semicolons-if-necessary/_config.js | 4 +- .../_config.js | 4 +- .../samples/adds-timings-to-bundle/_config.js | 4 +- .../aliased-not-exported-twice/_config.js | 4 +- .../samples/allow-reserved/_config.js | 4 +- .../allow-undefined-as-parameter/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../already-deshadowed-import/_config.js | 4 +- .../samples/amd-auto-id-id/_config.js | 4 +- .../samples/amd-base-path-id/_config.js | 4 +- .../function/samples/amd-base-path/_config.js | 4 +- .../_config.js | 4 +- .../global-calls/_config.js | 4 +- .../parameter-access-mutation/_config.js | 4 +- .../parameter-call-mutation/_config.js | 4 +- .../parameter-deep-access-mutation/_config.js | 4 +- .../_config.js | 4 +- .../parameter-mutation-spread/_config.js | 4 +- .../parameter-mutation/_config.js | 4 +- .../parameter-variable-merge/_config.js | 4 +- .../return-function-known/_config.js | 4 +- .../return-function-unknown/_config.js | 4 +- .../unknown-global-assignment/_config.js | 4 +- .../unknown-global-call/_config.js | 4 +- .../_config.js | 4 +- .../samples/array-double-spread/_config.js | 4 +- .../samples/array-from-side-effect/_config.js | 4 +- test/function/samples/array-getter/_config.js | 4 +- .../samples/array-mutation/_config.js | 4 +- .../_config.js | 4 +- .../assign-namespace-to-var/_config.js | 4 +- .../assignee-is-deoptimized/_config.js | 4 +- .../_config.js | 4 +- .../nested-assignment/_config.js | 4 +- .../try-catch-inclusion/_config.js | 4 +- .../samples/assignment-patterns/_config.js | 4 +- .../assignment-to-exports-b/_config.js | 4 +- .../samples/assignment-to-exports/_config.js | 4 +- .../_config.js | 4 +- .../assignment-to-re-exports/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../associate-getter-return-values/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../associate-setter-parameters/_config.js | 4 +- .../samples/async-function-return/_config.js | 4 +- .../avoid-exports-dot-asterisk/_config.js | 4 +- .../avoid-variable-be-empty/_config.js | 4 +- test/function/samples/aync-options/_config.js | 4 +- .../samples/banner-and-footer/_config.js | 4 +- test/function/samples/bindings/_config.js | 4 +- .../_config.js | 4 +- test/function/samples/break-label/_config.js | 4 +- .../samples/build-promise-chain/_config.js | 4 +- .../argument-side-effects/_config.js | 4 +- .../builtin-prototypes/truthiness/_config.js | 4 +- .../samples/bundle-facade-order/_config.js | 4 +- .../samples/call-external-function/_config.js | 4 +- .../_config.js | 4 +- .../samples/call-marked-pure/_config.js | 4 +- .../_config.js | 4 +- .../can-import-self-treeshake/_config.js | 4 +- .../samples/can-import-self/_config.js | 4 +- .../cannot-call-external-namespace/_config.js | 4 +- .../cannot-call-internal-namespace/_config.js | 4 +- .../_config.js | 4 +- .../samples/catch-block-scope/_config.js | 4 +- .../catch-dynamic-import-failure/_config.js | 4 +- .../samples/catch-scope-shadowing/_config.js | 4 +- .../samples/catch-scope-variables/_config.js | 4 +- .../chained-mutable-array-methods/_config.js | 4 +- .../_config.js | 4 +- .../check-resolve-for-entry/_config.js | 4 +- .../_config.js | 4 +- .../chunking-duplicate-reexport/_config.js | 4 +- .../circular-default-exports/_config.js | 4 +- .../circular-missed-reexports-2/_config.js | 4 +- .../circular-missed-reexports/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../circular-preserve-modules/_config.js | 4 +- .../samples/circular-reexport/_config.js | 4 +- .../class-method-getter-properties/_config.js | 4 +- .../samples/class-method-mutation/_config.js | 4 +- .../samples/class-method-mutations/_config.js | 4 +- .../samples/class-method-returns/_config.js | 4 +- .../class-methods-not-renamed/_config.js | 4 +- .../samples/class-name-conflict-2/_config.js | 4 +- .../samples/class-name-conflict-3/_config.js | 4 +- .../samples/class-name-conflict-4/_config.js | 4 +- .../samples/class-name-conflict/_config.js | 4 +- .../samples/class-prop-returns/_config.js | 4 +- .../_config.js | 4 +- .../compact-multiple-imports/_config.js | 4 +- test/function/samples/compact/_config.js | 4 +- .../samples/conditional-catch/_config.js | 4 +- .../samples/conditional-definition/_config.js | 4 +- .../conditionals-deoptimization/_config.js | 4 +- .../configure-external-module-b/_config.js | 4 +- .../configure-external-module/_config.js | 4 +- .../_config.js | 4 +- .../named-import-external/_config.js | 4 +- .../named-import/_config.js | 4 +- .../namespace-import/_config.js | 4 +- .../same-binding/_config.js | 4 +- .../confused-default-identifier/_config.js | 4 +- .../samples/consistent-renaming-b/_config.js | 4 +- .../samples/consistent-renaming-c/_config.js | 4 +- .../samples/consistent-renaming-d/_config.js | 4 +- .../samples/consistent-renaming-e/_config.js | 4 +- .../samples/consistent-renaming-f/_config.js | 4 +- .../samples/consistent-renaming/_config.js | 4 +- .../_config.js | 4 +- .../context-resolve-skipself/_config.js | 4 +- .../samples/context-resolve/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../cross-chunk-live-binding/_config.js | 4 +- .../custom-external-module-options/_config.js | 4 +- .../custom-external-resolver-async/_config.js | 4 +- .../custom-external-resolver-sync/_config.js | 4 +- .../samples/custom-iterator-2/_config.js | 4 +- .../samples/custom-iterator/_config.js | 4 +- .../samples/custom-loaders/_config.js | 4 +- .../samples/custom-module-options/_config.js | 4 +- .../custom-path-resolver-async/_config.js | 4 +- .../custom-path-resolver-on-entry/_config.js | 4 +- .../custom-path-resolver-plural-b/_config.js | 4 +- .../custom-path-resolver-plural/_config.js | 4 +- .../custom-path-resolver-sync/_config.js | 4 +- .../samples/custom-resolve-options/_config.js | 4 +- .../_config.js | 4 +- .../samples/cycles-defaults/_config.js | 4 +- .../samples/cycles-export-star/_config.js | 4 +- .../samples/cycles-immediate/_config.js | 4 +- .../samples/cycles-pathological-2/_config.js | 4 +- .../samples/cycles-stack-overflow/_config.js | 4 +- .../samples/cyclic-assignments/_config.js | 4 +- .../deconflict-deconflicted/_config.js | 4 +- .../_config.js | 4 +- .../samples/deconflict-ids/_config.js | 4 +- .../deconflict-parameter-defaults/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/deconflicts-classes/_config.js | 4 +- .../samples/deconflicts-exports-2/_config.js | 4 +- .../samples/deconflicts-exports-3/_config.js | 4 +- .../samples/deconflicts-exports/_config.js | 4 +- .../deconflicts-external-imports/_config.js | 4 +- .../_config.js | 4 +- .../samples/deconflicts-globals/_config.js | 4 +- .../samples/deconflicts-interop/_config.js | 4 +- .../deconstructed-exported-vars/_config.js | 4 +- .../default-export-as-is-bound/_config.js | 4 +- .../_config.js | 4 +- .../default-export-is-not-bound-b/_config.js | 4 +- .../default-export-is-not-bound/_config.js | 4 +- .../_config.js | 4 +- .../default-exported-global/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/default-not-reexported/_config.js | 4 +- .../samples/default-on-warn/_config.js | 4 +- test/function/samples/delete/_config.js | 4 +- .../deoptimize-assumes-getters/_config.js | 4 +- .../samples/deoptimize-cached-prop/_config.js | 4 +- .../_config.js | 4 +- .../deoptimize-call-expressions/_config.js | 4 +- .../samples/deoptimize-class/_config.js | 4 +- .../deoptimize-computed-class-keys/_config.js | 4 +- .../deoptimize-computed-keys/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../deoptimize-logical-expressions/_config.js | 4 +- .../deoptimize-loop-element/_config.js | 4 +- .../deoptimize-member-expressions/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../deoptimize-object-expressions/_config.js | 4 +- .../samples/deoptimize-object/_config.js | 4 +- .../_config.js | 4 +- .../deoptimize-this-parameters/_config.js | 4 +- .../samples/deprecated/compact/_config.js | 4 +- .../dynamic-import-duplicates/_config.js | 4 +- .../dynamic-import-inlining/_config.js | 4 +- .../dynamic-import-name-warn/_config.js | 4 +- .../deprecated/dynamic-import-name/_config.js | 4 +- .../inline-dynamic-imports-bundle/_config.js | 4 +- .../inline-imports-with-manual/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../manual-chunks-conflict/_config.js | 4 +- .../deprecated/manual-chunks-info/_config.js | 4 +- .../manual-chunks-preserve-modules/_config.js | 4 +- .../infinity/_config.js | 4 +- .../max-parallel-file-reads/set/_config.js | 4 +- .../with-plugin/_config.js | 4 +- .../name-conflict-symbol/_config.js | 4 +- .../dynamic-import-default-mode/_config.js | 4 +- .../dynamic-import/_config.js | 4 +- .../entry-default/_config.js | 4 +- .../namespace-tostring/entry-named/_config.js | 4 +- .../external-namespaces/_config.js | 4 +- .../inlined-namespace/_config.js | 4 +- .../interop-property-descriptor/_config.js | 4 +- .../property-descriptor/_config.js | 4 +- .../_config.js | 4 +- .../deprecated/plugin-module-ids/_config.js | 4 +- .../inline-dynamic-imports/_config.js | 4 +- .../invalid-default-export-mode/_config.js | 4 +- .../_config.js | 4 +- .../invalid-none-export-mode/_config.js | 4 +- .../preserveModules/manual-chunks/_config.js | 4 +- .../preserveModules/mixed-exports/_config.js | 4 +- .../virtual-modules-conflict/_config.js | 4 +- .../virtual-modules/_config.js | 4 +- .../samples/deprecated/reexport-ns/_config.js | 4 +- .../deprecated/resolve-id-external/_config.js | 4 +- .../samples/deprecated/resolve-id/_config.js | 4 +- .../dynamicImportFunction/_config.js | 4 +- .../_config.js | 4 +- .../hasModuleSideEffects/_config.js | 4 +- .../inlineDynamicImports/_config.js | 4 +- .../deprecations/manualChunks/_config.js | 4 +- .../maxParallelFileReads/_config.js | 4 +- .../namespaceToStringTag/_config.js | 4 +- .../deprecations/plugin-module-ids/_config.js | 4 +- .../deprecations/prefer-const/_config.js | 4 +- .../deprecations/preserveModules/_config.js | 4 +- .../deshadow-respect-existing/_config.js | 4 +- .../deshadow-top-level-declaration/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../deshadowed-namespaced-import/_config.js | 4 +- .../deshadowed-shorthand-property/_config.js | 4 +- .../_config.js | 4 +- .../samples/destructuring-loop/_config.js | 4 +- .../disappearing-exported-value/_config.js | 4 +- .../do-while-conditional-break/_config.js | 4 +- .../does-not-deconflict-undefined/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../does-not-mangle-entry-point/_config.js | 4 +- .../samples/double-default-export/_config.js | 4 +- .../samples/double-named-export/_config.js | 4 +- .../samples/double-named-reexport/_config.js | 4 +- .../double-namespace-reexport/_config.js | 4 +- .../samples/duplicate-import-fails/_config.js | 4 +- .../_config.js | 4 +- .../samples/duplicate-input-entry/_config.js | 4 +- .../_config.js | 4 +- .../dynamic-import-duplicates/_config.js | 4 +- .../dynamic-import-existing/_config.js | 4 +- .../dynamic-import-expression/_config.js | 4 +- .../dynamic-import-inlining/_config.js | 4 +- .../dynamic-import-not-found/_config.js | 4 +- .../dynamic-import-only-default/_config.js | 4 +- .../_config.js | 4 +- .../dynamic-import-rewriting/_config.js | 4 +- .../dynamic-import-this-arrow/_config.js | 4 +- .../dynamic-import-this-function/_config.js | 4 +- .../dynamic-imports-shared-exports/_config.js | 4 +- .../dynamic-namespace-lookup/_config.js | 4 +- .../samples/emit-chunk-hash/_config.js | 4 +- .../emit-chunk-manual-asset-source/_config.js | 4 +- .../samples/emit-chunk-manual/_config.js | 4 +- .../emit-file/asset-source-invalid/_config.js | 4 +- .../asset-source-invalid2/_config.js | 4 +- .../asset-source-invalid3/_config.js | 4 +- .../asset-source-invalid4/_config.js | 4 +- .../emit-file/asset-source-missing/_config.js | 4 +- .../asset-source-missing2/_config.js | 4 +- .../asset-source-missing3/_config.js | 4 +- .../asset-source-missing4/_config.js | 4 +- .../asset-source-missing5/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../chunk-filename-not-available/_config.js | 4 +- .../emit-file/chunk-not-found/_config.js | 4 +- .../emit-from-output-options/_config.js | 4 +- .../emit-file/emit-same-file/_config.js | 4 +- .../file-references-in-bundle/_config.js | 4 +- .../emit-file/invalid-asset-name/_config.js | 4 +- .../emit-file/invalid-asset-name3/_config.js | 4 +- .../emit-file/invalid-chunk-id/_config.js | 4 +- .../emit-file/invalid-file-type/_config.js | 4 +- .../emit-file/invalid-reference-id/_config.js | 4 +- .../invalid-set-asset-source-id/_config.js | 4 +- .../emit-file/modules-loaded/_config.js | 4 +- .../samples/emit-file/no-input/_config.js | 4 +- .../set-asset-source-chunk/_config.js | 4 +- .../set-asset-source-transform/_config.js | 4 +- .../set-asset-source-twice/_config.js | 4 +- .../set-asset-source-twice2/_config.js | 4 +- .../set-source-in-output-options/_config.js | 4 +- .../_config.js | 4 +- .../empty-string-as-module-name/_config.js | 4 +- .../samples/enforce-plugin-order/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/error-missing-umd-name/_config.js | 4 +- .../samples/error-parse-json/_config.js | 4 +- .../error-parse-unknown-extension/_config.js | 4 +- .../es5-class-called-without-new/_config.js | 4 +- .../samples/escape-arguments/_config.js | 4 +- .../export-all-from-external/_config.js | 4 +- .../samples/export-all-multiple/_config.js | 4 +- test/function/samples/export-all/_config.js | 4 +- .../_config.js | 4 +- test/function/samples/export-as/_config.js | 4 +- .../export-deconflicted-names/_config.js | 4 +- .../_config.js | 4 +- .../samples/export-default-as-b/_config.js | 4 +- .../samples/export-default-as-c/_config.js | 4 +- .../samples/export-default-as/_config.js | 4 +- .../export-default-exported-id/_config.js | 4 +- .../export-default-expression/_config.js | 4 +- .../export-default-from-external/_config.js | 4 +- .../export-default-named-function/_config.js | 4 +- .../export-default-no-space/_config.js | 4 +- .../samples/export-destruction/_config.js | 4 +- .../export-from-default-renamed/_config.js | 4 +- .../samples/export-from-default/_config.js | 4 +- .../samples/export-from-external/_config.js | 4 +- .../export-from-internal-module/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../export-from-no-local-binding/_config.js | 4 +- .../samples/export-from-renamed/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../function/samples/export-global/_config.js | 4 +- .../export-not-at-top-level-fails/_config.js | 4 +- .../export-two-ways-default-b/_config.js | 4 +- .../export-two-ways-default/_config.js | 4 +- .../export-two-ways-function/_config.js | 4 +- .../samples/export-two-ways/_config.js | 4 +- .../samples/export-type-mismatch-b/_config.js | 4 +- .../samples/export-type-mismatch-c/_config.js | 4 +- .../samples/export-type-mismatch/_config.js | 4 +- .../_config.js | 4 +- .../samples/exports-named-values/_config.js | 4 +- .../samples/external-alias-parent/_config.js | 4 +- .../samples/external-alias/_config.js | 4 +- .../samples/external-conflict/_config.js | 4 +- .../external-directory-import/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../external-entry-point-object/_config.js | 4 +- .../samples/external-entry-point/_config.js | 4 +- .../external-function-always-true/_config.js | 4 +- .../samples/external-function/_config.js | 4 +- .../external-ids-not-resolved/_config.js | 4 +- .../_config.js | 4 +- .../external-live-binding-compact/_config.js | 4 +- .../samples/external-live-binding/_config.js | 4 +- .../samples/external-normalization/_config.js | 4 +- .../samples/external-regex-array/_config.js | 4 +- .../samples/external-regex/_config.js | 4 +- .../samples/external-resolve-false/_config.js | 4 +- .../samples/external-resolved/_config.js | 4 +- .../_config.js | 4 +- .../externally-reassigned-globals/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/facade-reexports/_config.js | 4 +- .../samples/fallback-on-warn/_config.js | 4 +- test/function/samples/file-and-dir/_config.js | 4 +- .../samples/for-in-accessors/_config.js | 4 +- .../for-in-loop-head-dependencies/_config.js | 4 +- .../for-loop-head-dependencies/_config.js | 4 +- .../samples/for-loop-parameter/_config.js | 4 +- .../for-loops-as-assignments/_config.js | 4 +- .../samples/for-of-accessors/_config.js | 4 +- .../for-of-loop-head-dependencies/_config.js | 4 +- .../for-of-with-in-operator/_config.js | 4 +- .../samples/function-asm-directive/_config.js | 4 +- .../function-directive-not-first/_config.js | 4 +- .../_config.js | 4 +- .../function-getter-side-effects/_config.js | 4 +- .../samples/function-side-effects/_config.js | 4 +- .../_config.js | 4 +- .../functions-renamed-correctly/_config.js | 4 +- .../generate-bundle-mutation/_config.js | 4 +- .../_config.js | 4 +- .../handle-calling-uncallable/_config.js | 4 +- .../handle-labels-inside-functions/_config.js | 4 +- .../handle-missing-export-source/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../handles-double-declarations/_config.js | 4 +- .../_config.js | 4 +- .../handles-stringified-sourcemaps/_config.js | 4 +- .../samples/has-default-export/_config.js | 4 +- .../samples/has-modules-array/_config.js | 4 +- .../hashing/length-at-non-hash/_config.js | 4 +- .../hashing/maximum-hash-size/_config.js | 4 +- .../hashing/minimum-hash-size/_config.js | 4 +- .../samples/hidden-directories/_config.js | 4 +- .../hoisted-variable-if-else/_config.js | 4 +- .../_config.js | 4 +- .../if-statement-insert-whitespace/_config.js | 4 +- .../if-statement-with-assignment/_config.js | 4 +- .../_config.js | 4 +- .../if-statement-with-update/_config.js | 4 +- .../samples/iife-code-splitting/_config.js | 4 +- .../function/samples/iife-comments/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../dependant-not-part-of-graph/_config.js | 4 +- .../external-dependant/_config.js | 4 +- .../missing-dependant/_config.js | 4 +- test/function/samples/import-as/_config.js | 4 +- .../plugin-assertions-this-resolve/_config.js | 4 +- .../warn-assertion-conflicts/_config.js | 4 +- .../samples/import-binding/_config.js | 4 +- .../samples/import-chain-as/_config.js | 4 +- test/function/samples/import-chain/_config.js | 4 +- .../_config.js | 4 +- .../import-default-as-named/_config.js | 4 +- .../import-default-as-other/_config.js | 4 +- .../samples/import-default-class/_config.js | 4 +- .../import-default-expression/_config.js | 4 +- .../import-default-from-external/_config.js | 4 +- .../import-default-function/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../import-empty-from-external/_config.js | 4 +- .../samples/import-meta-url/_config.js | 4 +- .../samples/import-named-class/_config.js | 4 +- .../import-named-from-external/_config.js | 4 +- .../import-named-function-as-other/_config.js | 4 +- .../samples/import-named-function/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../import-not-at-top-level-fails/_config.js | 4 +- .../import-of-unexported-fails/_config.js | 4 +- .../samples/import-var-declaration/_config.js | 4 +- .../imports-are-deconflicted-b/_config.js | 4 +- .../imports-are-deconflicted-c/_config.js | 4 +- .../imports-are-deconflicted/_config.js | 4 +- .../_config.js | 4 +- .../samples/includes-reassignments/_config.js | 4 +- .../samples/includes-superclass/_config.js | 4 +- .../inline-dynamic-imports-bundle/_config.js | 4 +- .../inline-dynamic-no-treeshake/_config.js | 4 +- .../inline-imports-with-manual/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/input-name-validation/_config.js | 4 +- .../samples/input-name-validation2/_config.js | 4 +- .../samples/input-name-validation3/_config.js | 4 +- .../instanceof/left-hand-effect/_config.js | 4 +- .../instanceof/right-hand-effect/_config.js | 4 +- .../instanceof/used-parameter/_config.js | 4 +- .../samples/instanceof/used/_config.js | 4 +- .../inter-chunk-execution-order/_config.js | 4 +- .../_config.js | 4 +- .../interop-auto-live-bindings/_config.js | 4 +- .../interop-auto-no-live-bindings/_config.js | 4 +- .../interop-default-conflict/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/interop-default-only/_config.js | 4 +- .../samples/interop-default/_config.js | 4 +- .../samples/interop-esmodule/_config.js | 4 +- .../samples/invalid-addon-hook/_config.js | 4 +- .../invalid-default-export-mode/_config.js | 4 +- .../invalid-ignore-list-function/_config.js | 4 +- .../samples/invalid-interop/_config.js | 4 +- .../invalid-pattern-replacement/_config.js | 4 +- .../samples/invalid-pattern/_config.js | 4 +- .../invalid-property-assignments/_config.js | 4 +- .../samples/invalid-property-calls/_config.js | 4 +- .../invalid-top-level-await/_config.js | 4 +- .../_config.js | 4 +- .../keep-cjs-dynamic-import/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../legal-import-modification/_config.js | 4 +- .../samples/legal-suggested-names/_config.js | 4 +- .../load-module-error/buildEnd/_config.js | 4 +- .../load-module-error/buildStart/_config.js | 4 +- .../generateBundle/_config.js | 4 +- .../samples/load-module-error/load/_config.js | 4 +- .../load-module-error/renderChunk/_config.js | 4 +- .../load-module-error/renderStart/_config.js | 4 +- .../load-module-error/resolveId/_config.js | 4 +- .../load-module-error/transform/_config.js | 4 +- .../load-resolve-dependencies/_config.js | 4 +- .../load-returns-empty-string/_config.js | 4 +- .../load-returns-string-or-null/_config.js | 4 +- .../samples/long-path-deopt/_config.js | 4 +- .../samples/manual-chunks-conflict/_config.js | 4 +- .../samples/manual-chunks-info/_config.js | 4 +- .../samples/mark-namespace-members/_config.js | 4 +- .../default/_config.js | 4 +- .../error/_config.js | 4 +- .../infinity/_config.js | 4 +- .../set/_config.js | 4 +- .../with-plugin/_config.js | 4 +- .../_config.js | 4 +- .../merged-namespace-live-bindings/_config.js | 4 +- .../method-call-mutates-this/_config.js | 4 +- .../method-call-side-effects/_config.js | 4 +- .../_config.js | 4 +- .../samples/mixed-external-paths/_config.js | 4 +- .../samples/modify-assumed-global/_config.js | 4 +- test/function/samples/modify-meta/_config.js | 4 +- .../modify-object-via-this-a/_config.js | 4 +- .../modify-object-via-this-b/_config.js | 4 +- .../modify-object-via-this-c/_config.js | 4 +- .../modify-object-via-this-d/_config.js | 4 +- .../deoptimized-props-with-getter/_config.js | 4 +- .../getter-in-assignment/_config.js | 4 +- .../getters-on-this/_config.js | 4 +- .../known-getter/_config.js | 4 +- .../known-super-prop/_config.js | 4 +- .../unknown-prop-getter/_config.js | 4 +- .../unknown-prop-unknown-access/_config.js | 4 +- .../unknown-property-access/_config.js | 4 +- .../unknown-super-prop/_config.js | 4 +- .../deoptimized-props-with-setter/_config.js | 4 +- .../known-setter/_config.js | 4 +- .../known-super-prop/_config.js | 4 +- .../unknown-prop-setter/_config.js | 4 +- .../unknown-prop-unknown-access/_config.js | 4 +- .../unknown-super-prop/_config.js | 4 +- .../samples/module-level-directive/_config.js | 4 +- .../samples/module-parsed-hook/_config.js | 4 +- .../module-parsed-imported-ids/_config.js | 4 +- .../module-side-effect-reexport/_config.js | 4 +- .../module-side-effects/array/_config.js | 4 +- .../external-false/_config.js | 4 +- .../global-false/_config.js | 4 +- .../invalid-option/_config.js | 4 +- .../module-side-effects/load/_config.js | 4 +- .../reexport-from-external/_config.js | 4 +- .../module-side-effects/reexports/_config.js | 4 +- .../resolve-id-external/_config.js | 4 +- .../module-side-effects/resolve-id/_config.js | 4 +- .../module-side-effects/transform/_config.js | 4 +- .../module-side-effects/writable/_config.js | 4 +- .../samples/module-sort-order/_config.js | 4 +- test/function/samples/module-tree/_config.js | 4 +- .../samples/name-conflict-object/_config.js | 4 +- .../samples/name-conflict-promise/_config.js | 4 +- .../samples/name-conflict-symbol/_config.js | 4 +- .../_config.js | 4 +- .../namespace-keys-are-sorted/_config.js | 4 +- .../namespace-literal-value/_config.js | 4 +- .../assignment/_config.js | 4 +- .../call/_config.js | 4 +- .../member-call/_config.js | 4 +- .../missing-access/_config.js | 4 +- .../unknown-access/_config.js | 4 +- .../namespace-missing-export/_config.js | 4 +- .../samples/namespace-override/_config.js | 4 +- .../_config.js | 4 +- .../dynamic-import-default-mode/_config.js | 4 +- .../dynamic-import/_config.js | 4 +- .../entry-default/_config.js | 4 +- .../namespace-tostring/entry-named/_config.js | 4 +- .../external-namespaces/_config.js | 4 +- .../inlined-namespace/_config.js | 4 +- .../interop-property-descriptor/_config.js | 4 +- .../property-descriptor/_config.js | 4 +- .../namespace-update-import-fails/_config.js | 4 +- .../samples/namespaces-are-frozen/_config.js | 4 +- .../namespaces-have-null-prototype/_config.js | 4 +- .../namespacing-collisions-2/_config.js | 4 +- .../samples/namespacing-collisions/_config.js | 4 +- .../namespacing-in-sub-functions/_config.js | 4 +- .../nested-and-async-plugin/_config.js | 4 +- .../samples/nested-foreach/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/new-target-meta/_config.js | 4 +- .../samples/newline-after-comment/_config.js | 4 +- .../_config.js | 4 +- .../no-external-live-bindings/_config.js | 4 +- test/function/samples/no-imports/_config.js | 4 +- .../samples/no-relative-external/_config.js | 4 +- .../samples/non-extension-dot/_config.js | 4 +- .../non-function-hook-async/_config.js | 4 +- .../samples/non-function-hook-sync/_config.js | 4 +- .../samples/non-js-extensions/_config.js | 4 +- .../object-deep-access-effect/_config.js | 4 +- .../object-destructuring-renaming/_config.js | 4 +- .../object-dynamic-properties/_config.js | 4 +- .../_config.js | 4 +- .../samples/object-properties/_config.js | 4 +- .../object-prototype-properties/_config.js | 4 +- .../object-spread-side-effect/_config.js | 4 +- .../samples/optional-catch-binding/_config.js | 4 +- .../optional-chaining-side-effect/_config.js | 4 +- .../samples/options-async-hook/_config.js | 4 +- test/function/samples/options-hook/_config.js | 4 +- .../samples/options-in-renderstart/_config.js | 4 +- .../samples/output-options-hook/_config.js | 4 +- .../override-external-namespace/_config.js | 4 +- .../_config.js | 4 +- .../parameter-defaults/arrays/_config.js | 4 +- .../class-fields/_config.js | 4 +- .../parameter-defaults/exported/_config.js | 4 +- .../function-as-default/_config.js | 4 +- .../function-return/_config.js | 4 +- .../logical-expressions/_config.js | 4 +- .../module-side-effects/_config.js | 4 +- .../parameter-defaults/objects/_config.js | 4 +- .../return-expressions/_config.js | 4 +- .../super-classes/_config.js | 4 +- .../tagged-templates/_config.js | 4 +- .../parameter-defaults/try-catch/_config.js | 4 +- .../samples/parameter-side-effects/_config.js | 4 +- .../parenthesised-default-export/_config.js | 4 +- .../pass-namespace-to-function/_config.js | 4 +- .../paths-are-case-sensitive/_config.js | 4 +- .../per-output-plugins-warn-hooks/_config.js | 4 +- .../_config.js | 4 +- .../perf-supports-object-hooks/_config.js | 4 +- .../plugin-cache/anonymous-delete/_config.js | 4 +- .../plugin-cache/anonymous-get/_config.js | 4 +- .../plugin-cache/anonymous-has/_config.js | 4 +- .../plugin-cache/anonymous-set/_config.js | 4 +- .../duplicate-names-no-cache/_config.js | 4 +- .../plugin-cache/duplicate-names/_config.js | 4 +- .../plugin-error-loc-instead-pos/_config.js | 4 +- .../plugin-error-module-parsed/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../plugin-error-should-transform/_config.js | 4 +- .../samples/plugin-error/buildEnd/_config.js | 4 +- .../plugin-error/buildStart/_config.js | 4 +- .../plugin-error/generateBundle/_config.js | 4 +- .../samples/plugin-error/load/_config.js | 4 +- .../plugin-error/renderChunk/_config.js | 4 +- .../plugin-error/renderStart/_config.js | 4 +- .../samples/plugin-error/resolveId/_config.js | 4 +- .../samples/plugin-error/transform/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../plugin-module-information/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- test/function/samples/plugin-parse/_config.js | 4 +- .../plugin-warn-loc-instead-pos/_config.js | 4 +- test/function/samples/plugin-warn/_config.js | 4 +- .../plugins-can-manipulate-options/_config.js | 4 +- .../samples/preload-after-build/_config.js | 4 +- .../samples/preload-cyclic-module/_config.js | 4 +- .../samples/preload-loading-module/_config.js | 4 +- .../samples/preload-module/_config.js | 4 +- .../preserve-for-of-iterable/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../inline-dynamic-imports/_config.js | 4 +- .../invalid-default-export-mode/_config.js | 4 +- .../_config.js | 4 +- .../invalid-none-export-mode/_config.js | 4 +- .../preserve-modules/manual-chunks/_config.js | 4 +- .../preserve-modules/mixed-exports/_config.js | 4 +- .../virtual-modules-conflict/_config.js | 4 +- .../virtual-modules/_config.js | 4 +- .../samples/preserve-symlink/_config.js | 4 +- .../preserves-catch-argument/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../prevent-asi-with-line-comments/_config.js | 4 +- .../prevent-context-resolve-loop/_config.js | 4 +- .../prevent-tree-shaking-asi/_config.js | 4 +- .../property-keys-not-renamed/_config.js | 4 +- .../propertyReadSideEffects-always/_config.js | 4 +- .../samples/protect-cjs-globals/_config.js | 4 +- .../samples/proto-accessors/_config.js | 4 +- .../re-export-default-import/_config.js | 4 +- .../re-export-namespace-import/_config.js | 4 +- .../_config.js | 4 +- .../reassign-computed-prototype/_config.js | 4 +- .../_config.js | 4 +- .../reassign-double-declarations/_config.js | 4 +- .../samples/reassign-empty-objects/_config.js | 4 +- .../reassign-for-loop-declarations/_config.js | 4 +- .../samples/reassign-import-fails/_config.js | 4 +- .../_config.js | 4 +- .../samples/reassign-namespace/_config.js | 4 +- .../reassign-object-literal-1/_config.js | 4 +- .../reassign-object-literal-2/_config.js | 4 +- .../reassign-parameter-property/_config.js | 4 +- .../samples/reassign-parameter/_config.js | 4 +- .../reassign-pattern-defaults/_config.js | 4 +- .../reassign-return-expression/_config.js | 4 +- .../reassign-return-expressions/_config.js | 4 +- .../reassigned-return-expression/_config.js | 4 +- .../_config.js | 4 +- .../samples/recursive-reexports/_config.js | 4 +- .../samples/redeclare-parameter/_config.js | 4 +- .../reexport-from-synthetic/_config.js | 4 +- .../samples/reexport-missing-error/_config.js | 4 +- test/function/samples/reexport-ns/_config.js | 4 +- .../reexports-from-external/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../relative-external-include-once/_config.js | 4 +- .../relative-outside-external/_config.js | 4 +- .../removes-empty-exported-vars/_config.js | 4 +- .../_config.js | 4 +- .../samples/rename-default-export/_config.js | 4 +- .../samples/renamed-arguments/_config.js | 4 +- .../samples/render-chunk-async/_config.js | 4 +- .../samples/resolve-id-object/_config.js | 4 +- .../resolve-relative-external-id/_config.js | 4 +- .../_config.js | 4 +- .../resolve-unordered-assignments/_config.js | 4 +- .../samples/resolveid-is-entry/_config.js | 4 +- .../resolves-namespace-default/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/retains-sort-order-b/_config.js | 4 +- .../samples/retains-sort-order/_config.js | 4 +- .../_config.js | 4 +- .../returned-array-mutation/_config.js | 4 +- .../samples/reuse-resolve-meta/_config.js | 4 +- .../rewrite-member-expressions/_config.js | 4 +- .../samples/sequence-expression/_config.js | 4 +- .../_config.js | 4 +- .../shadowed-external-export/_config.js | 4 +- .../samples/shadowed-namespace-b/_config.js | 4 +- .../samples/shadowed-namespace/_config.js | 4 +- .../samples/shadowed-variables/_config.js | 4 +- .../samples/shims-missing-exports/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/simplified-nested-if/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../simplify-sequence-expressions/_config.js | 4 +- .../simplify-with-destructuring/_config.js | 4 +- .../simplify-with-function-iife/_config.js | 4 +- .../sourcemap-base-url-invalid/_config.js | 4 +- .../_config.js | 4 +- .../sourcemap-true-generatebundle/_config.js | 4 +- .../sourcemapping-url-comment/_config.js | 4 +- .../sourcemapping-url-multiline/_config.js | 4 +- .../spread-arguments-unused/_config.js | 4 +- .../samples/statement-order/_config.js | 4 +- test/function/samples/switch-break/_config.js | 4 +- .../switch-cases-are-deconflicted/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- test/function/samples/symlink/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../circular-synthetic-exports/_config.js | 4 +- .../circular-synthetic-exports2/_config.js | 4 +- .../dynamic-import/_config.js | 4 +- .../synthetic-named-exports/entry/_config.js | 4 +- .../external-synthetic-exports/_config.js | 4 +- .../namespace-object/_config.js | 4 +- .../namespace-overrides/_config.js | 4 +- .../non-default-export/_config.js | 4 +- .../preserve-modules/_config.js | 4 +- .../synthetic-exports-need-default/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../synthetic-named-export-entry/_config.js | 4 +- .../tagged-template-deoptimize/_config.js | 4 +- .../samples/this-not-namespace/_config.js | 4 +- .../samples/this-side-effect/_config.js | 4 +- .../throws-not-found-module/_config.js | 4 +- .../top-level-arrow-function/_config.js | 4 +- .../samples/top-level-block/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/track-awaited-object/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/track-reassignments/_config.js | 4 +- .../tracks-alias-mutations-b/_config.js | 4 +- .../samples/tracks-alias-mutations/_config.js | 4 +- .../samples/transform-empty-string/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/transform-without-code/_config.js | 4 +- .../samples/transformer-async/_config.js | 4 +- .../samples/transformer-multiple/_config.js | 4 +- .../samples/transformer-single/_config.js | 4 +- .../transparent-dynamic-inlining/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/try-catch-scoping/_config.js | 4 +- .../unknown-for-loop-variables/_config.js | 4 +- .../unknown-generated-code-preset/_config.js | 4 +- .../unknown-generated-code-value/_config.js | 4 +- .../unknown-global-side-effects/_config.js | 4 +- .../samples/unknown-statement/_config.js | 4 +- .../unknown-treeshake-preset/_config.js | 4 +- .../unknown-treeshake-value/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../unused-for-in-loop-declaration/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../unused-for-of-loop-declaration/_config.js | 4 +- .../_config.js | 4 +- .../function/samples/unused-import/_config.js | 4 +- .../unused-parameter-side-effects/_config.js | 4 +- .../unused-parenthesed-assignment/_config.js | 4 +- test/function/samples/unused-var-a/_config.js | 4 +- test/function/samples/unused-var-b/_config.js | 4 +- test/function/samples/unused-var-c/_config.js | 4 +- test/function/samples/unused-var-d/_config.js | 4 +- .../unused-while-loop-declaration/_config.js | 4 +- .../update-expression-accessors/_config.js | 4 +- .../_config.js | 4 +- .../use-class-name-in-static-block/_config.js | 4 +- .../samples/use-var-before-decl/_config.js | 4 +- .../samples/uses-supplied-ast/_config.js | 4 +- .../samples/validate-output/_config.js | 4 +- .../validate-resolved-by-logic/_config.js | 4 +- .../samples/vars-in-for-loop-head/_config.js | 4 +- .../vars-not-removed-in-if-block/_config.js | 4 +- .../samples/vars-not-removed/_config.js | 4 +- .../vars-with-init-in-dead-branch/_config.js | 4 +- .../samples/warn-missing-iife-name/_config.js | 4 +- .../_config.js | 4 +- .../samples/warn-on-empty-bundle/_config.js | 4 +- test/function/samples/warn-on-eval/_config.js | 4 +- .../warn-on-namespace-conflict/_config.js | 4 +- .../samples/warn-on-top-level-this/_config.js | 4 +- .../warn-on-unused-missing-imports/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/warnings-to-string/_config.js | 4 +- .../warns-for-invalid-options/_config.js | 4 +- test/function/samples/watch-option/_config.js | 4 +- .../_config.js | 4 +- .../wraps-simplified-expressions/_config.js | 4 +- test/hooks/index.js | 3 + test/incremental/index.js | 3 + test/leak/index.js | 3 + test/sourcemaps/index.js | 3 + .../samples/basic-support/_config.js | 4 +- .../combined-sourcemap-with-loader/_config.js | 4 +- .../samples/combined-sourcemap/_config.js | 4 +- .../excludes-plugin-helpers/_config.js | 4 +- .../_config.js | 4 +- .../_config.js | 4 +- .../samples/ignore-list-default/_config.js | 4 +- .../samples/ignore-list-false/_config.js | 4 +- .../ignore-list-source-files/_config.js | 4 +- .../ignore-list-sourcemap-path/_config.js | 4 +- test/sourcemaps/samples/loaders/_config.js | 4 +- .../names-transformed-render-chunk/_config.js | 4 +- test/sourcemaps/samples/names/_config.js | 4 +- .../samples/reified-namespace/_config.js | 4 +- .../samples/relative-paths/_config.js | 4 +- .../samples/render-chunk-babili/_config.js | 4 +- .../samples/render-chunk/_config.js | 4 +- .../samples/single-length-segments/_config.js | 4 +- .../samples/sourcemap-base-url/_config.js | 4 +- .../samples/sourcemap-file-hashed/_config.js | 4 +- .../samples/sourcemap-file/_config.js | 4 +- .../transform-full-source-paths/_config.js | 4 +- .../transform-low-resolution/_config.js | 4 +- .../samples/transform-source-paths/_config.js | 4 +- .../_config.js | 4 +- test/sourcemaps/samples/transforms/_config.js | 4 +- .../samples/untransformed-modules/_config.js | 4 +- test/tsconfig.json | 4 + test/tsconfig.utils.json | 18 +++++ test/types.d.ts | 81 ++++++++++++++++++- test/utils.d.ts | 17 ++++ test/watch/index.js | 3 + 1952 files changed, 4032 insertions(+), 3881 deletions(-) create mode 100644 test/tsconfig.utils.json create mode 100644 test/utils.d.ts diff --git a/test/browser/index.js b/test/browser/index.js index d5177bdcb58..2546a0d1391 100644 --- a/test/browser/index.js +++ b/test/browser/index.js @@ -5,6 +5,9 @@ global.performance = require('node:perf_hooks').performance; const { basename, resolve } = require('node:path'); const fixturify = require('fixturify'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const { rollup } = require('../../browser/dist/rollup.browser.js'); const { assertFilesAreEqual, runTestSuiteWithSamples, compareError } = require('../utils.js'); diff --git a/test/browser/samples/basic/_config.js b/test/browser/samples/basic/_config.js index a1881638888..8ac93e1783d 100644 --- a/test/browser/samples/basic/_config.js +++ b/test/browser/samples/basic/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'bundles files for the browser', options: { plugins: loader({ @@ -9,4 +9,4 @@ console.log(foo);`, dep: `export const foo = 42;` }) } -}; +}); diff --git a/test/browser/samples/missing-dependency-resolution/_config.js b/test/browser/samples/missing-dependency-resolution/_config.js index c43f1b35637..ea6db6b6e30 100644 --- a/test/browser/samples/missing-dependency-resolution/_config.js +++ b/test/browser/samples/missing-dependency-resolution/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'fails if a dependency cannot be resolved', options: { plugins: loader({ @@ -15,4 +15,4 @@ console.log(foo);` url: 'https://rollupjs.org/plugin-development/#a-simple-example', watchFiles: ['main'] } -}; +}); diff --git a/test/browser/samples/missing-entry-resolution/_config.js b/test/browser/samples/missing-entry-resolution/_config.js index 138125544c4..667ff148d10 100644 --- a/test/browser/samples/missing-entry-resolution/_config.js +++ b/test/browser/samples/missing-entry-resolution/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'fails if an entry cannot be resolved', error: { code: 'NO_FS_IN_BROWSER', @@ -6,4 +6,4 @@ module.exports = { 'Cannot access the file system (via "path.resolve") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.', url: 'https://rollupjs.org/plugin-development/#a-simple-example' } -}; +}); diff --git a/test/browser/samples/renormalizes-external-paths/_config.js b/test/browser/samples/renormalizes-external-paths/_config.js index 85e9046542c..10e3650658a 100644 --- a/test/browser/samples/renormalizes-external-paths/_config.js +++ b/test/browser/samples/renormalizes-external-paths/_config.js @@ -1,6 +1,6 @@ const { join, dirname } = require('node:path').posix; -module.exports = { +module.exports = defineRollupTest({ description: 'renormalizes external paths if possible', options: { input: ['/main.js', '/nested/entry.js'], @@ -8,6 +8,7 @@ module.exports = { return id.endsWith('ext'); }, plugins: { + name: 'test-plugin', resolveId(source, importer) { if (source.endsWith('ext.js')) { return false; @@ -44,4 +45,4 @@ import './nested-ext.js';`; } } } -}; +}); diff --git a/test/browser/samples/supports-hashes/_config.js b/test/browser/samples/supports-hashes/_config.js index 6079c64980d..9a48f0c98e3 100644 --- a/test/browser/samples/supports-hashes/_config.js +++ b/test/browser/samples/supports-hashes/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'bundles files for the browser', options: { input: ['main', 'dep'], @@ -13,4 +13,4 @@ console.log(foo);`, entryFileNames: '[name]-[hash].js' } } -}; +}); diff --git a/test/chunking-form/index.js b/test/chunking-form/index.js index bf241964a27..8e27e625582 100644 --- a/test/chunking-form/index.js +++ b/test/chunking-form/index.js @@ -1,5 +1,8 @@ const { basename, resolve } = require('node:path'); const { chdir } = require('node:process'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const { rollup } = require('../../dist/rollup'); const { runTestSuiteWithSamples, assertDirectoriesAreEqual } = require('../utils.js'); diff --git a/test/chunking-form/samples/aliasing-extensions/_config.js b/test/chunking-form/samples/aliasing-extensions/_config.js index aa5a872d5b7..dbf318a82e5 100644 --- a/test/chunking-form/samples/aliasing-extensions/_config.js +++ b/test/chunking-form/samples/aliasing-extensions/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk aliasing with extensions', options: { input: ['main1', 'main2', 'main3.ts'] } -}; +}); diff --git a/test/chunking-form/samples/amd-id-auto-base-path-concat/_config.js b/test/chunking-form/samples/amd-id-auto-base-path-concat/_config.js index 754ccbcbd10..4b6460c70a8 100644 --- a/test/chunking-form/samples/amd-id-auto-base-path-concat/_config.js +++ b/test/chunking-form/samples/amd-id-auto-base-path-concat/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: "allows to use amd.autoId with amd.basePath and works when concat'd into one file", options: { input: ['main'], @@ -31,4 +31,4 @@ module.exports = { return exports.getA(); } } -}; +}); diff --git a/test/chunking-form/samples/amd-id-auto-base-path/_config.js b/test/chunking-form/samples/amd-id-auto-base-path/_config.js index f8158e4cd6a..9c5bd24bdaf 100644 --- a/test/chunking-form/samples/amd-id-auto-base-path/_config.js +++ b/test/chunking-form/samples/amd-id-auto-base-path/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to use amd.autoId with amd.basePath, and chunks folder', options: { input: ['main'], @@ -16,4 +16,4 @@ module.exports = { return exports.getA(); } } -}; +}); diff --git a/test/chunking-form/samples/amd-id-auto/_config.js b/test/chunking-form/samples/amd-id-auto/_config.js index e2ced9f0459..bd47b8dc295 100644 --- a/test/chunking-form/samples/amd-id-auto/_config.js +++ b/test/chunking-form/samples/amd-id-auto/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to use amd.autoId', options: { input: ['main'], @@ -13,4 +13,4 @@ module.exports = { return exports.getA(); } } -}; +}); diff --git a/test/chunking-form/samples/asset-needs-code-reference-same-source/_config.js b/test/chunking-form/samples/asset-needs-code-reference-same-source/_config.js index 158c7510a84..d370a635b02 100644 --- a/test/chunking-form/samples/asset-needs-code-reference-same-source/_config.js +++ b/test/chunking-form/samples/asset-needs-code-reference-same-source/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'emits unreferenced assets if needsCodeReference is true if they are also emitted without that flag', options: { @@ -95,4 +95,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/asset-needs-code-reference/_config.js b/test/chunking-form/samples/asset-needs-code-reference/_config.js index c832eba576a..5f45abc8768 100644 --- a/test/chunking-form/samples/asset-needs-code-reference/_config.js +++ b/test/chunking-form/samples/asset-needs-code-reference/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const fs = require('node:fs'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not emit unreferenced assets if needsCodeReference is true', options: { output: { @@ -32,4 +32,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/avoid-chunk-import-hoisting/_config.js b/test/chunking-form/samples/avoid-chunk-import-hoisting/_config.js index e46fa0fd615..0ae648f66e2 100644 --- a/test/chunking-form/samples/avoid-chunk-import-hoisting/_config.js +++ b/test/chunking-form/samples/avoid-chunk-import-hoisting/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids hoisting transitive dependencies via flag', options: { input: ['main1.js', 'main2.js'], @@ -7,4 +7,4 @@ module.exports = { hoistTransitiveImports: false } } -}; +}); diff --git a/test/chunking-form/samples/basic-chunking/_config.js b/test/chunking-form/samples/basic-chunking/_config.js index a601862651e..44edcd5c62b 100644 --- a/test/chunking-form/samples/basic-chunking/_config.js +++ b/test/chunking-form/samples/basic-chunking/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'simple chunking', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunk-deshadowing-reassignment/_config.js b/test/chunking-form/samples/chunk-deshadowing-reassignment/_config.js index e0abcec057f..7536fba83cd 100644 --- a/test/chunking-form/samples/chunk-deshadowing-reassignment/_config.js +++ b/test/chunking-form/samples/chunk-deshadowing-reassignment/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk reassignment import deshadowing', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunk-execution-order/_config.js b/test/chunking-form/samples/chunk-execution-order/_config.js index 74ee8f5f11c..033b2bbfb3f 100644 --- a/test/chunking-form/samples/chunk-execution-order/_config.js +++ b/test/chunking-form/samples/chunk-execution-order/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'maintains execution order ', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunk-export-deshadowing/_config.js b/test/chunking-form/samples/chunk-export-deshadowing/_config.js index 5301c6b729b..b570125e344 100644 --- a/test/chunking-form/samples/chunk-export-deshadowing/_config.js +++ b/test/chunking-form/samples/chunk-export-deshadowing/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk export deshadowing', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunk-export-renaming/_config.js b/test/chunking-form/samples/chunk-export-renaming/_config.js index e24d7ae8389..f538cfe0cfe 100644 --- a/test/chunking-form/samples/chunk-export-renaming/_config.js +++ b/test/chunking-form/samples/chunk-export-renaming/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk export renaming', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunk-import-deshadowing/_config.js b/test/chunking-form/samples/chunk-import-deshadowing/_config.js index 4bfe9e670a7..9b0f43c48f5 100644 --- a/test/chunking-form/samples/chunk-import-deshadowing/_config.js +++ b/test/chunking-form/samples/chunk-import-deshadowing/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk import deshadowing', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunk-live-bindings/_config.js b/test/chunking-form/samples/chunk-live-bindings/_config.js index 85aeb5f738b..7a8da3f8f28 100644 --- a/test/chunking-form/samples/chunk-live-bindings/_config.js +++ b/test/chunking-form/samples/chunk-live-bindings/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'ES module live bindings in chunks', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunk-namespace-boundary/_config.js b/test/chunking-form/samples/chunk-namespace-boundary/_config.js index 0a1af5188f6..baaf90cf316 100644 --- a/test/chunking-form/samples/chunk-namespace-boundary/_config.js +++ b/test/chunking-form/samples/chunk-namespace-boundary/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk with a namespace boundary', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunk-naming/_config.js b/test/chunking-form/samples/chunk-naming/_config.js index 1c4fa182faa..c324ba0c577 100644 --- a/test/chunking-form/samples/chunk-naming/_config.js +++ b/test/chunking-form/samples/chunk-naming/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'simple chunking', options: { input: { @@ -10,4 +10,4 @@ module.exports = { chunkFileNames: 'chunks/chunk.js' } } -}; +}); diff --git a/test/chunking-form/samples/chunk-variable-name-conflict/_config.js b/test/chunking-form/samples/chunk-variable-name-conflict/_config.js index bded69227e6..8f0159de38a 100644 --- a/test/chunking-form/samples/chunk-variable-name-conflict/_config.js +++ b/test/chunking-form/samples/chunk-variable-name-conflict/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk variable name conflict', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/chunking-compact/_config.js b/test/chunking-form/samples/chunking-compact/_config.js index 341b669ef2f..7bf530c5af9 100644 --- a/test/chunking-form/samples/chunking-compact/_config.js +++ b/test/chunking-form/samples/chunking-compact/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunking compact and mangled output', options: { input: ['main1.js', 'main2.js'], @@ -7,4 +7,4 @@ module.exports = { compact: true } } -}; +}); diff --git a/test/chunking-form/samples/chunking-externals/_config.js b/test/chunking-form/samples/chunking-externals/_config.js index 31a37faf7e6..7860565760e 100644 --- a/test/chunking-form/samples/chunking-externals/_config.js +++ b/test/chunking-form/samples/chunking-externals/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunking external module handling', options: { input: ['main1.js', 'main2.js'], external: ['external'] } -}; +}); diff --git a/test/chunking-form/samples/chunking-reexport/_config.js b/test/chunking-form/samples/chunking-reexport/_config.js index 19248895def..aa32efa8539 100644 --- a/test/chunking-form/samples/chunking-reexport/_config.js +++ b/test/chunking-form/samples/chunking-reexport/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunking star external', options: { input: ['main1.js', 'main2.js'], external: ['external'] } -}; +}); diff --git a/test/chunking-form/samples/chunking-source-maps/_config.js b/test/chunking-form/samples/chunking-source-maps/_config.js index 172d5f652b0..8ab1fae898b 100644 --- a/test/chunking-form/samples/chunking-source-maps/_config.js +++ b/test/chunking-form/samples/chunking-source-maps/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'source maps', options: { input: ['main1.js', 'main2.js'], @@ -6,4 +6,4 @@ module.exports = { sourcemap: true } } -}; +}); diff --git a/test/chunking-form/samples/chunking-star-external/_config.js b/test/chunking-form/samples/chunking-star-external/_config.js index 854a3591362..89bcd2c4697 100644 --- a/test/chunking-form/samples/chunking-star-external/_config.js +++ b/test/chunking-form/samples/chunking-star-external/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunking star external', options: { input: ['main1.js', 'main2.js'], external: ['external1', 'external2', 'starexternal1', 'starexternal2'] } -}; +}); diff --git a/test/chunking-form/samples/circular-entry-points/_config.js b/test/chunking-form/samples/circular-entry-points/_config.js index c594e1ff53b..eba994526a5 100644 --- a/test/chunking-form/samples/circular-entry-points/_config.js +++ b/test/chunking-form/samples/circular-entry-points/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunking circular entry points', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/circular-entry-points2/_config.js b/test/chunking-form/samples/circular-entry-points2/_config.js index 4894b95c53b..5a5aa050957 100644 --- a/test/chunking-form/samples/circular-entry-points2/_config.js +++ b/test/chunking-form/samples/circular-entry-points2/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not create a facade for one circular entry point if possible', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/circular-entry-points3/_config.js b/test/chunking-form/samples/circular-entry-points3/_config.js index 8902b116aef..65e6fe17ad8 100644 --- a/test/chunking-form/samples/circular-entry-points3/_config.js +++ b/test/chunking-form/samples/circular-entry-points3/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates facades for all circular entry points if they become tainted by another entry', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { input: ['main1.js', 'main2.js', 'main3.js'] } -}; +}); diff --git a/test/chunking-form/samples/circular-manual-chunks/_config.js b/test/chunking-form/samples/circular-manual-chunks/_config.js index 4a03dcf2c88..e710635e4f4 100644 --- a/test/chunking-form/samples/circular-manual-chunks/_config.js +++ b/test/chunking-form/samples/circular-manual-chunks/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles manual chunks with circular dependencies', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { input: 'main', output: { manualChunks: { lib1: ['lib1'], lib2: ['lib2'] } } } -}; +}); diff --git a/test/chunking-form/samples/combined-namespace-reexport/_config.js b/test/chunking-form/samples/combined-namespace-reexport/_config.js index 7c41d4f14e8..a14caa99d39 100644 --- a/test/chunking-form/samples/combined-namespace-reexport/_config.js +++ b/test/chunking-form/samples/combined-namespace-reexport/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles combined namespace reexports', options: { input: ['main1', 'main2'] } -}; +}); diff --git a/test/chunking-form/samples/custom-sanitizer/_config.js b/test/chunking-form/samples/custom-sanitizer/_config.js index 0abca0b2f08..653bc2ebe94 100644 --- a/test/chunking-form/samples/custom-sanitizer/_config.js +++ b/test/chunking-form/samples/custom-sanitizer/_config.js @@ -1,8 +1,9 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports custom file name sanitizer functions', options: { plugins: [ { + name: 'test-plugin', buildStart() { this.emitFile({ type: 'asset', name: 'asset.txt', source: 'asset' }); } @@ -15,4 +16,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/deconflict-globals/_config.js b/test/chunking-form/samples/deconflict-globals/_config.js index 9ffbdeef487..7b16ddea120 100644 --- a/test/chunking-form/samples/deconflict-globals/_config.js +++ b/test/chunking-form/samples/deconflict-globals/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not deconflict due to global variables used in other chunks', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/deconflict-system-default-export-variable/_config.js b/test/chunking-form/samples/deconflict-system-default-export-variable/_config.js index f0300a3c472..6bde5351e7c 100644 --- a/test/chunking-form/samples/deconflict-system-default-export-variable/_config.js +++ b/test/chunking-form/samples/deconflict-system-default-export-variable/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts SystemJS default export variable with namespace imports', options: { external: 'external', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/deduplicate-imports-referencing-originals-2/_config.js b/test/chunking-form/samples/deduplicate-imports-referencing-originals-2/_config.js index a393eccd704..722609fc2cc 100644 --- a/test/chunking-form/samples/deduplicate-imports-referencing-originals-2/_config.js +++ b/test/chunking-form/samples/deduplicate-imports-referencing-originals-2/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not import variables that reference an original if another variable referencing it is already imported', options: { input: ['main1', 'main2'] } -}; +}); diff --git a/test/chunking-form/samples/deduplicate-imports-referencing-originals/_config.js b/test/chunking-form/samples/deduplicate-imports-referencing-originals/_config.js index 8bf09102383..3f717441229 100644 --- a/test/chunking-form/samples/deduplicate-imports-referencing-originals/_config.js +++ b/test/chunking-form/samples/deduplicate-imports-referencing-originals/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not import variables that reference an original if the original is already imported', options: { input: ['main1', 'main2'] } -}; +}); diff --git a/test/chunking-form/samples/default-export-name-conflict/_config.js b/test/chunking-form/samples/default-export-name-conflict/_config.js index 958b2db90bb..8f877c97b9c 100644 --- a/test/chunking-form/samples/default-export-name-conflict/_config.js +++ b/test/chunking-form/samples/default-export-name-conflict/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not produce name conflicts when reexporting via default exports', options: { input: ['main1', 'main2'] } -}; +}); diff --git a/test/chunking-form/samples/default-identifier-renaming/_config.js b/test/chunking-form/samples/default-identifier-renaming/_config.js index d6e0502667f..6b0724eafb9 100644 --- a/test/chunking-form/samples/default-identifier-renaming/_config.js +++ b/test/chunking-form/samples/default-identifier-renaming/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Default export identifier name handling', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/default-reexport-namespace/_config.js b/test/chunking-form/samples/default-reexport-namespace/_config.js index 20ee29986bd..b4673c0accb 100644 --- a/test/chunking-form/samples/default-reexport-namespace/_config.js +++ b/test/chunking-form/samples/default-reexport-namespace/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Properly handle adding a default reexport to a namespace (#3583)', options: { input: ['main.js', 'icons/one.js'] } -}; +}); diff --git a/test/chunking-form/samples/deprecated/avoid-imports-preserve-modules/_config.js b/test/chunking-form/samples/deprecated/avoid-imports-preserve-modules/_config.js index 4f170640cfb..5ef9ab79019 100644 --- a/test/chunking-form/samples/deprecated/avoid-imports-preserve-modules/_config.js +++ b/test/chunking-form/samples/deprecated/avoid-imports-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids empty imports if they do not have side-effects when preserving modules (#3359)', options: { @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/circular-manual-chunks/_config.js b/test/chunking-form/samples/deprecated/circular-manual-chunks/_config.js index c52339e8003..54adb55ca9c 100644 --- a/test/chunking-form/samples/deprecated/circular-manual-chunks/_config.js +++ b/test/chunking-form/samples/deprecated/circular-manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles manual chunks with circular dependencies', expectedWarnings: ['CIRCULAR_DEPENDENCY', 'DEPRECATED_FEATURE'], options: { @@ -6,4 +6,4 @@ module.exports = { input: 'main', manualChunks: { lib1: ['lib1'], lib2: ['lib2'] } } -}; +}); diff --git a/test/chunking-form/samples/deprecated/dynamic-import-comments/_config.js b/test/chunking-form/samples/deprecated/dynamic-import-comments/_config.js index 29065eec4a7..1e2742c33ce 100644 --- a/test/chunking-form/samples/deprecated/dynamic-import-comments/_config.js +++ b/test/chunking-form/samples/deprecated/dynamic-import-comments/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'should not remove inline comments inside dynamic import', options: { strictDeprecations: false, @@ -14,4 +14,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_config.js b/test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_config.js index a40ae4c75ed..5b928a58cc4 100644 --- a/test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_config.js +++ b/test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports an object with a single entry when inlining dynamic imports', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { input: { entry: 'main' } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/dynamic-import-name/_config.js b/test/chunking-form/samples/deprecated/dynamic-import-name/_config.js index cd7d733c719..05d4e795d37 100644 --- a/test/chunking-form/samples/deprecated/dynamic-import-name/_config.js +++ b/test/chunking-form/samples/deprecated/dynamic-import-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows specifying a custom importer function', options: { strictDeprecations: false, @@ -14,4 +14,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/emit-file-chunk-facade/_config.js b/test/chunking-form/samples/deprecated/emit-file-chunk-facade/_config.js index 1aff87db4b2..cf7cfad890b 100644 --- a/test/chunking-form/samples/deprecated/emit-file-chunk-facade/_config.js +++ b/test/chunking-form/samples/deprecated/emit-file-chunk-facade/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'retrieves the correct name of an emitted chunk in case a facade is created', options: { strictDeprecations: false, @@ -19,4 +19,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js b/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js index ec6702573ae..9124573825d 100644 --- a/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js +++ b/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const { getObject } = require('../../../../utils'); -module.exports = { +module.exports = defineRollupTest({ description: 'associates empty modules with chunks if tree-shaking is disabled for them', options: { strictDeprecations: false, @@ -66,4 +66,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/indirect-reexports-preserve-modules/_config.js b/test/chunking-form/samples/deprecated/indirect-reexports-preserve-modules/_config.js index 41677d57da1..d5b81c427d6 100644 --- a/test/chunking-form/samples/deprecated/indirect-reexports-preserve-modules/_config.js +++ b/test/chunking-form/samples/deprecated/indirect-reexports-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not drop indirect reexports when preserving modules', expectedWarnings: ['MIXED_EXPORTS', 'DEPRECATED_FEATURE'], options: { @@ -6,4 +6,4 @@ module.exports = { output: { name: 'bundle' }, preserveModules: true } -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunk-avoid-facade/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-avoid-facade/_config.js index f0d81228885..7923b266803 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-avoid-facade/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-avoid-facade/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoid facades if possible when using manual chunks', options: { strictDeprecations: false, @@ -8,4 +8,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-conflict/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-conflict/_config.js index 2a955ff0af5..4ceaf33051b 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-conflict/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Uses entry alias if manual chunks contain entry chunks with different alias', options: { strictDeprecations: false, @@ -11,4 +11,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-match/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-match/_config.js index 5b1b3bd7d42..a3287e58979 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-match/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-match/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Identifies the entry chunk with the manual chunk that contains it if the aliases match', options: { @@ -11,4 +11,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunk-is-entry-conflict/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-is-entry-conflict/_config.js index d43369b5207..f2f927012e1 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-is-entry-conflict/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-is-entry-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Uses entry alias if manual chunks are entry chunks with different alias', options: { strictDeprecations: false, @@ -11,4 +11,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunk-is-entry-match/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-is-entry-match/_config.js index 7a8a9aa09d6..1312bd452c3 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-is-entry-match/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-is-entry-match/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Identifies the entry chunk with the manual chunk that has the same entry if the aliases match', options: { @@ -11,4 +11,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunks-different-nested/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-different-nested/_config.js index 97bdd7c68aa..783d0e10896 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-different-nested/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-different-nested/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'manual chunks can have other manual chunks as dependencies', options: { strictDeprecations: false, @@ -10,4 +10,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunks-dynamic-facades/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-dynamic-facades/_config.js index 957df0be4f3..e06d5a83542 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-dynamic-facades/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-dynamic-facades/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates facades for dynamic manual chunks if necessary', options: { strictDeprecations: false, @@ -8,4 +8,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunks-dynamic-name-conflict/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-dynamic-name-conflict/_config.js index c7344810ced..c35e5def592 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-dynamic-name-conflict/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-dynamic-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles name conflicts in manual chunks', options: { strictDeprecations: false, @@ -8,4 +8,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunks-dynamic/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-dynamic/_config.js index cdf062d322f..2250f389971 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-dynamic/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-dynamic/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports dynamic manual chunks', options: { strictDeprecations: false, @@ -8,4 +8,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunks-function/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-function/_config.js index ab8ca176201..facde1ee75b 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-function/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to define manual chunks via a function', options: { strictDeprecations: false, @@ -10,4 +10,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunks-nested/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-nested/_config.js index 29e3d7d3db0..1c239acf7fb 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-nested/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-nested/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'manual chunks can contain nested modules', options: { strictDeprecations: false, @@ -8,4 +8,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/manual-chunks/_config.js b/test/chunking-form/samples/deprecated/manual-chunks/_config.js index bfe73d1c721..d781f565606 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'manual chunks support', options: { strictDeprecations: false, @@ -9,4 +9,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/missing-export-reused-deconflicting/_config.js b/test/chunking-form/samples/deprecated/missing-export-reused-deconflicting/_config.js index ccf4f87d8d0..0da91354fdb 100644 --- a/test/chunking-form/samples/deprecated/missing-export-reused-deconflicting/_config.js +++ b/test/chunking-form/samples/deprecated/missing-export-reused-deconflicting/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles using dependencies with shimmed missing exports as ', expectedWarnings: ['SHIMMED_EXPORT', 'DEPRECATED_FEATURE'], options: { @@ -7,4 +7,4 @@ module.exports = { preserveModules: true, shimMissingExports: true } -}; +}); diff --git a/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js b/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js index 793d274dd1e..60dfd8f23fe 100644 --- a/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js +++ b/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', options: { @@ -9,4 +9,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import/_config.js b/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import/_config.js index 6c668f2287e..24d34aafcaf 100644 --- a/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import/_config.js +++ b/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to dynamic imports', options: { strictDeprecations: false, @@ -7,4 +7,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-auto-export-mode/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-auto-export-mode/_config.js index 82c01d0483c..42f4523d31f 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-auto-export-mode/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-auto-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Uses entry point semantics for all files when preserving modules', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-commonjs/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-commonjs/_config.js index d0a5ee29834..e8f4f0c9788 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-commonjs/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-commonjs/_config.js @@ -1,6 +1,6 @@ const commonjs = require('@rollup/plugin-commonjs'); -module.exports = { +module.exports = defineRollupTest({ description: 'Handles output from @rollup/plugin-commonjs', expectedWarnings: ['MIXED_EXPORTS', 'DEPRECATED_FEATURE'], options: { @@ -10,4 +10,4 @@ module.exports = { external: ['external'], plugins: [commonjs()] } -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-dynamic-imports/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-dynamic-imports/_config.js index 9d22f1265be..2198b1f2339 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-dynamic-imports/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'dynamic imports are handled correctly when preserving modules', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-dynamic-namespace/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-dynamic-namespace/_config.js index 7ee5f88593a..9cf47fcf603 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-dynamic-namespace/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-dynamic-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Preserve modules properly handles internal namespace imports (#2576)', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-empty/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-empty/_config.js index af98a0768a3..aef5949ec08 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-empty/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-empty/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Preserve modules remove empty dependencies', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-export-alias/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-export-alias/_config.js index de49b787e78..ccce2412fb5 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-export-alias/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-export-alias/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'confirm export aliases are preserved in modules', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-filename-pattern/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-filename-pattern/_config.js index 45c40e15b67..9da57d69056 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-filename-pattern/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-filename-pattern/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'entryFileNames pattern supported in combination with preserveModules', options: { strictDeprecations: false, @@ -9,4 +9,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-id-case-sensitive/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-id-case-sensitive/_config.js index 4e94da5c1ff..712bd01da14 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-id-case-sensitive/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-id-case-sensitive/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Preserve modules id case sensitive', options: { strictDeprecations: false, @@ -20,4 +20,4 @@ module.exports = { ] }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-named-export-mode/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-named-export-mode/_config.js index 9a4318fbc5d..6c1c335f893 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-named-export-mode/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-named-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects "named" export mode in all chunks when preserving modules', options: { strictDeprecations: false, @@ -9,4 +9,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-nested-barrel-es-export/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-nested-barrel-es-export/_config.js index 130b08f42dd..1b3fd23827d 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-nested-barrel-es-export/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-nested-barrel-es-export/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'confirm exports are deconflicted when exporting nested index aliases', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-nested-export/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-nested-export/_config.js index 3f39126a643..77ed92cd6ed 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-nested-export/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-nested-export/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'confirm exports are preserved when exporting a module', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-non-entry-imports/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-non-entry-imports/_config.js index 9a74ad23ea9..67fad9fdc90 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-non-entry-imports/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-non-entry-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports and exports of non-entry points are tracked', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-proxy-import/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-proxy-import/_config.js index 277a0d24c49..79636515115 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-proxy-import/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-proxy-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly resolves imports via a proxy module as direct imports when preserving modules', options: { @@ -7,4 +7,4 @@ module.exports = { external: 'external' }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-reaching-outside/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-reaching-outside/_config.js index 0d5c9eb2e76..bb847c2bded 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-reaching-outside/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-reaching-outside/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'change the module destination', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-scriptified-assets/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-scriptified-assets/_config.js index 9d6b22b98da..9d782e1287d 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-scriptified-assets/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-scriptified-assets/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'scriptified assets have extension in preserveModules output filename', options: { strictDeprecations: false, @@ -29,4 +29,4 @@ module.exports = { ] }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-single-entry/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-single-entry/_config.js index 4f9cbcbea6d..2cfe6a41771 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-single-entry/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-single-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'single entry names file correctly', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules-virtual-modules/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-virtual-modules/_config.js index 163da380583..3ba42c4097f 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-virtual-modules/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-virtual-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { strictDeprecations: false, @@ -21,4 +21,4 @@ module.exports = { ] }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/deprecated/preserve-modules/_config.js b/test/chunking-form/samples/deprecated/preserve-modules/_config.js index 77705540676..1f47d7a745b 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Rewrite modules in-place', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { preserveModules: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-chained/_config.js b/test/chunking-form/samples/dynamic-import-chained/_config.js index 31a03c704ee..f83a999534a 100644 --- a/test/chunking-form/samples/dynamic-import-chained/_config.js +++ b/test/chunking-form/samples/dynamic-import-chained/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes chained dynamic imports', options: { input: 'main.js' } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-chunking/_config.js b/test/chunking-form/samples/dynamic-import-chunking/_config.js index b4c10960b3f..da2f51cdb29 100644 --- a/test/chunking-form/samples/dynamic-import-chunking/_config.js +++ b/test/chunking-form/samples/dynamic-import-chunking/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Code splitting with dynamic import', options: { input: ['main.js'], preserveEntrySignatures: 'strict' } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-comments/_config.js b/test/chunking-form/samples/dynamic-import-comments/_config.js index 9e74bcab779..1e253f9c5de 100644 --- a/test/chunking-form/samples/dynamic-import-comments/_config.js +++ b/test/chunking-form/samples/dynamic-import-comments/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not remove inline comments inside dynamic imports', options: { input: 'main.js', @@ -12,4 +12,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-dynamic/_config.js b/test/chunking-form/samples/dynamic-import-dynamic/_config.js index 288d17f8111..a85db3a93c3 100644 --- a/test/chunking-form/samples/dynamic-import-dynamic/_config.js +++ b/test/chunking-form/samples/dynamic-import-dynamic/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Code splitting with dynamic import', options: { input: ['main.js'] } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-external/_config.js b/test/chunking-form/samples/dynamic-import-external/_config.js index 1e5e80586bd..85ffd5397c0 100644 --- a/test/chunking-form/samples/dynamic-import-external/_config.js +++ b/test/chunking-form/samples/dynamic-import-external/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks dynamic imports as external when resolveDynamicImport returns false', options: { input: 'main.js', @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-facade/_config.js b/test/chunking-form/samples/dynamic-import-facade/_config.js index 62db88c24ef..b2f441808b8 100644 --- a/test/chunking-form/samples/dynamic-import-facade/_config.js +++ b/test/chunking-form/samples/dynamic-import-facade/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure dynamic chunks are not tainted', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-from-manual-chunk/_config.js b/test/chunking-form/samples/dynamic-import-from-manual-chunk/_config.js index 626a63f40ab..bc35ce0ef80 100644 --- a/test/chunking-form/samples/dynamic-import-from-manual-chunk/_config.js +++ b/test/chunking-form/samples/dynamic-import-from-manual-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles dynamic imports in manual chunks', options: { input: 'main.js', @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-inline-colouring/_config.js b/test/chunking-form/samples/dynamic-import-inline-colouring/_config.js index b5769882caf..9a8a41a2f4e 100644 --- a/test/chunking-form/samples/dynamic-import-inline-colouring/_config.js +++ b/test/chunking-form/samples/dynamic-import-inline-colouring/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Handle dynamic imports that are part of a static graph', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-inlining-object/_config.js b/test/chunking-form/samples/dynamic-import-inlining-object/_config.js index 7dec64bfdc0..20adf37a0b6 100644 --- a/test/chunking-form/samples/dynamic-import-inlining-object/_config.js +++ b/test/chunking-form/samples/dynamic-import-inlining-object/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports an object with a single entry when inlining dynamic imports', options: { output: { inlineDynamicImports: true }, input: { entry: 'main' } } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-only-default/_config.js b/test/chunking-form/samples/dynamic-import-only-default/_config.js index c96873edaf0..8c579212cb0 100644 --- a/test/chunking-form/samples/dynamic-import-only-default/_config.js +++ b/test/chunking-form/samples/dynamic-import-only-default/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly imports dynamic namespaces with only a default export from entry- and non-entry-point chunks', options: { input: ['main', 'entry'] } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-only-reexports/_config.js b/test/chunking-form/samples/dynamic-import-only-reexports/_config.js index 1848e95f2e8..44d62832d27 100644 --- a/test/chunking-form/samples/dynamic-import-only-reexports/_config.js +++ b/test/chunking-form/samples/dynamic-import-only-reexports/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles dynamic imports when the imported module only reexports from other modules', options: { input: ['main'] } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-statically-imported-2/_config.js b/test/chunking-form/samples/dynamic-import-statically-imported-2/_config.js index 2da1b771499..7013d87b227 100644 --- a/test/chunking-form/samples/dynamic-import-statically-imported-2/_config.js +++ b/test/chunking-form/samples/dynamic-import-statically-imported-2/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles dynamic imports of previously statically imported chunks that are also dynamically imported by other chunks', options: { input: ['main.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-statically-imported/_config.js b/test/chunking-form/samples/dynamic-import-statically-imported/_config.js index 4fd6f721ac4..4eb4282f086 100644 --- a/test/chunking-form/samples/dynamic-import-statically-imported/_config.js +++ b/test/chunking-form/samples/dynamic-import-statically-imported/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles dynamic imports of previously statically imported chunks', options: { input: ['main.js'] } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-synthetic-exports-preserve-modules/_config.js b/test/chunking-form/samples/dynamic-import-synthetic-exports-preserve-modules/_config.js index 9c29bfb5406..c7637cc876c 100644 --- a/test/chunking-form/samples/dynamic-import-synthetic-exports-preserve-modules/_config.js +++ b/test/chunking-form/samples/dynamic-import-synthetic-exports-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handle dynamically importing a module with synthetic named exports when preserving modules', options: { @@ -16,4 +16,4 @@ module.exports = { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-tree-shaking-1/_config.js b/test/chunking-form/samples/dynamic-import-tree-shaking-1/_config.js index dcff9ec11b4..e1c7d066640 100644 --- a/test/chunking-form/samples/dynamic-import-tree-shaking-1/_config.js +++ b/test/chunking-form/samples/dynamic-import-tree-shaking-1/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses tree-shaking information to improve chunking', options: { input: { @@ -6,4 +6,4 @@ module.exports = { entryB: 'main2.js' } } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import-tree-shaking-2/_config.js b/test/chunking-form/samples/dynamic-import-tree-shaking-2/_config.js index 6d2783787e6..6d3cbf8d422 100644 --- a/test/chunking-form/samples/dynamic-import-tree-shaking-2/_config.js +++ b/test/chunking-form/samples/dynamic-import-tree-shaking-2/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not expose exports of chunks which were used by tree-shaken dynamic imports', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/dynamic-import/_config.js b/test/chunking-form/samples/dynamic-import/_config.js index c62aae20125..4c79dd128b6 100644 --- a/test/chunking-form/samples/dynamic-import/_config.js +++ b/test/chunking-form/samples/dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles dynamic imports with a shared dependency', options: { input: ['main'], @@ -11,4 +11,4 @@ module.exports = { return exports.promise; } } -}; +}); diff --git a/test/chunking-form/samples/dynamically-import-facaded-entry/_config.js b/test/chunking-form/samples/dynamically-import-facaded-entry/_config.js index 0807ed35e5e..81086de40b5 100644 --- a/test/chunking-form/samples/dynamically-import-facaded-entry/_config.js +++ b/test/chunking-form/samples/dynamically-import-facaded-entry/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses existing entry facades for dynamic imports if present', options: { input: ['main.js', 'importer.js'], preserveEntrySignatures: 'strict' } -}; +}); diff --git a/test/chunking-form/samples/dynamically-import-non-preserved-entry/_config.js b/test/chunking-form/samples/dynamically-import-non-preserved-entry/_config.js index 4a2c34eaccc..57805fe5e4a 100644 --- a/test/chunking-form/samples/dynamically-import-non-preserved-entry/_config.js +++ b/test/chunking-form/samples/dynamically-import-non-preserved-entry/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports dynamically importing entries with additional exports', options: { input: ['main.js', 'importer.js'], preserveEntrySignatures: false } -}; +}); diff --git a/test/chunking-form/samples/dynamically-import-tainted-entry/_config.js b/test/chunking-form/samples/dynamically-import-tainted-entry/_config.js index a1585477b41..1e71e42a862 100644 --- a/test/chunking-form/samples/dynamically-import-tainted-entry/_config.js +++ b/test/chunking-form/samples/dynamically-import-tainted-entry/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports dynamically importing entries with additional exports', options: { input: ['main.js', 'importer.js'], preserveEntrySignatures: 'allow-extension' } -}; +}); diff --git a/test/chunking-form/samples/dynamically-import-untainted-entry/_config.js b/test/chunking-form/samples/dynamically-import-untainted-entry/_config.js index 423f6c73b4c..8e2220265c9 100644 --- a/test/chunking-form/samples/dynamically-import-untainted-entry/_config.js +++ b/test/chunking-form/samples/dynamically-import-untainted-entry/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'makes existing entries a proper facade if possible when importing dynamically', options: { input: ['main.js', 'importer.js'], preserveEntrySignatures: false } -}; +}); diff --git a/test/chunking-form/samples/emit-file/asset-file-names/_config.js b/test/chunking-form/samples/emit-file/asset-file-names/_config.js index c1350154cbf..6c3610f6e44 100644 --- a/test/chunking-form/samples/emit-file/asset-file-names/_config.js +++ b/test/chunking-form/samples/emit-file/asset-file-names/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports custom asset file names', options: { input: ['main.js'], @@ -12,4 +12,4 @@ module.exports = { assetFileNames: '[ext]/[hash]-[name][extname]' } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/deconflict-against-named-files/_config.js b/test/chunking-form/samples/emit-file/deconflict-against-named-files/_config.js index a3622a8c983..d6ed639bbbc 100644 --- a/test/chunking-form/samples/emit-file/deconflict-against-named-files/_config.js +++ b/test/chunking-form/samples/emit-file/deconflict-against-named-files/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts files against named files', options: { input: 'main', @@ -44,4 +44,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/emit-file/deduplicate-assets/_config.js b/test/chunking-form/samples/emit-file/deduplicate-assets/_config.js index 747fbbadf41..eecaa69bf6c 100644 --- a/test/chunking-form/samples/emit-file/deduplicate-assets/_config.js +++ b/test/chunking-form/samples/emit-file/deduplicate-assets/_config.js @@ -9,7 +9,7 @@ let string1Id, sameBufferAsStringId, otherBufferId; -module.exports = { +module.exports = defineRollupTest({ description: 'deduplicates asset that have the same source', options: { input: ['main.js'], @@ -105,4 +105,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-asset-without-name/_config.js b/test/chunking-form/samples/emit-file/emit-asset-without-name/_config.js index 94cd5b89b47..b2c36658660 100644 --- a/test/chunking-form/samples/emit-file/emit-asset-without-name/_config.js +++ b/test/chunking-form/samples/emit-file/emit-asset-without-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports emitting an asset without a name', options: { input: ['main.js'], @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-facade/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-facade/_config.js index 803f954f9d7..6013d4f227b 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-facade/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-facade/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'retrieves the correct name of an emitted chunk in case a facade is created', options: { input: 'main', @@ -19,4 +19,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-filename/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-filename/_config.js index be6d7e3ad7a..024c2158cad 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-filename/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-filename/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'supports specifying a file name when emitting a chunk', options: { input: 'main', @@ -24,4 +24,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-name-conflict/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-name-conflict/_config.js index ce14a9334cf..0f73b49eacd 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-name-conflict/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deduplicates named chunks emitted more than once', options: { // For the second entry, a facade is created @@ -28,4 +28,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-named/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-named/_config.js index a0599023032..5fe02e8a7f1 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-named/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-named/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'allows naming emitted chunks', options: { input: 'main', @@ -14,4 +14,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-order1/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-order1/_config.js index 53b698506da..2afc7efe4fb 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-order1/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-order1/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'creates a consistent chunking order (needs to be consistent with the other test of this kind)', options: { @@ -33,4 +33,4 @@ console.log(id, value); } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-order2/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-order2/_config.js index 74f74b0cf9b..affdf1cdd31 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-order2/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-order2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'creates a consistent chunking order (needs to be consistent with the other test of this kind)', options: { @@ -39,4 +39,4 @@ console.log(id, value); } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-with-importer/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-with-importer/_config.js index 86d1c79d864..0c9b9cafd18 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-with-importer/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-with-importer/_config.js @@ -3,7 +3,7 @@ let noImporterReferenceId; let mainReferenceId; let nestedReferenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'allows specifying an importer when resolving ids', options: { input: 'main', @@ -32,4 +32,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-worker/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-worker/_config.js index f77180193a7..34cc3ba90bc 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-worker/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-worker/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); let workerId; let proxyId; -module.exports = { +module.exports = defineRollupTest({ description: 'allows adding additional chunks to be used in workers', options: { input: 'main', @@ -51,4 +51,4 @@ requirejs(['${chunkFileName}']);`; } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk-worklet/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-worklet/_config.js index 70bd5ddb829..6ad63b39342 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-worklet/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-worklet/_config.js @@ -1,6 +1,6 @@ const REGISTER_WORKLET = 'register-paint-worklet:'; -module.exports = { +module.exports = defineRollupTest({ description: 'allows adding additional chunks to be used in worklets', options: { input: 'main', @@ -26,4 +26,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emit-chunk/_config.js b/test/chunking-form/samples/emit-file/emit-chunk/_config.js index 0e416de5b8f..3bdef9c0422 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'allows adding additional chunks and retrieving their file name', options: { input: 'main', @@ -22,4 +22,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emits-existing-chunk/_config.js b/test/chunking-form/samples/emit-file/emits-existing-chunk/_config.js index 404461da95e..d3b02ef04d7 100644 --- a/test/chunking-form/samples/emit-file/emits-existing-chunk/_config.js +++ b/test/chunking-form/samples/emit-file/emits-existing-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows adding modules already in the graph as entry points', options: { input: { @@ -16,4 +16,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/emits-files-from-various-hooks/_config.js b/test/chunking-form/samples/emit-file/emits-files-from-various-hooks/_config.js index 4ef7b6e67d7..675192ef65d 100644 --- a/test/chunking-form/samples/emit-file/emits-files-from-various-hooks/_config.js +++ b/test/chunking-form/samples/emit-file/emits-files-from-various-hooks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports emitting assets from plugin hooks', options: { input: ['main.js'], @@ -81,4 +81,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/filenames-function-patterns-preserve-modules/_config.js b/test/chunking-form/samples/emit-file/filenames-function-patterns-preserve-modules/_config.js index 14dd6ed6738..c2bb3492d9b 100644 --- a/test/chunking-form/samples/emit-file/filenames-function-patterns-preserve-modules/_config.js +++ b/test/chunking-form/samples/emit-file/filenames-function-patterns-preserve-modules/_config.js @@ -4,7 +4,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEB = path.join(__dirname, 'deb.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports using a function that returns a pattern for entryFileNames, with output.preserveModules option', options: { @@ -53,4 +53,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/filenames-function-patterns/_config.js b/test/chunking-form/samples/emit-file/filenames-function-patterns/_config.js index ca50740d716..67f0fcc3831 100644 --- a/test/chunking-form/samples/emit-file/filenames-function-patterns/_config.js +++ b/test/chunking-form/samples/emit-file/filenames-function-patterns/_config.js @@ -4,11 +4,12 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEB = path.join(__dirname, 'deb.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports using a function that returns a pattern for FileNames', options: { input: ['main.js'], plugins: { + name: 'test-plugin', transform() { this.emitFile({ type: 'asset', name: 'test.txt', source: 'hello world' }); return null; @@ -63,4 +64,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/named-user-chunks/_config.js b/test/chunking-form/samples/emit-file/named-user-chunks/_config.js index fd3a66ca677..ff4d85b4bf8 100644 --- a/test/chunking-form/samples/emit-file/named-user-chunks/_config.js +++ b/test/chunking-form/samples/emit-file/named-user-chunks/_config.js @@ -4,7 +4,7 @@ let referenceIdName; let referenceIdFileName1; let referenceIdFileName2; -module.exports = { +module.exports = defineRollupTest({ description: 'deduplicates with named chunks defined by the user', options: { input: { mainChunk: 'main', mainChunkFacade: 'main' }, @@ -29,4 +29,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/reference-files/_config.js b/test/chunking-form/samples/emit-file/reference-files/_config.js index 8eaf23c4310..392ae410fd1 100644 --- a/test/chunking-form/samples/emit-file/reference-files/_config.js +++ b/test/chunking-form/samples/emit-file/reference-files/_config.js @@ -1,7 +1,7 @@ const { readFileSync } = require('node:fs'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows referencing emitted files', options: { strictDeprecations: false, @@ -11,8 +11,9 @@ module.exports = { chunkFileNames: 'nested/chunk.js' }, plugins: { + name: 'test-plugin', resolveId(id, importee) { - if (id.endsWith('.svg')) { + if (id.endsWith('.svg') && importee) { return path.resolve(path.dirname(importee), id); } }, @@ -27,4 +28,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/sanitize-file-name/_config.js b/test/chunking-form/samples/emit-file/sanitize-file-name/_config.js index 39a76de71d6..e3a4c09d6ad 100644 --- a/test/chunking-form/samples/emit-file/sanitize-file-name/_config.js +++ b/test/chunking-form/samples/emit-file/sanitize-file-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows adding additional chunks and retrieving their file name', options: { input: 'main', @@ -18,4 +18,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/emit-file/set-asset-source/_config.js b/test/chunking-form/samples/emit-file/set-asset-source/_config.js index 067a3de14bb..ae68e73e377 100644 --- a/test/chunking-form/samples/emit-file/set-asset-source/_config.js +++ b/test/chunking-form/samples/emit-file/set-asset-source/_config.js @@ -13,7 +13,7 @@ let renderChunkNamed; let generateBundle; let generateBundleNamed; -module.exports = { +module.exports = defineRollupTest({ description: 'supports setting the asset source during generate', options: { input: ['main.js'], @@ -88,4 +88,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/empty-chunks/_config.js b/test/chunking-form/samples/empty-chunks/_config.js index 4f26f947897..f20396423bf 100644 --- a/test/chunking-form/samples/empty-chunks/_config.js +++ b/test/chunking-form/samples/empty-chunks/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'empty chunk pruning', expectedWarnings: ['EMPTY_BUNDLE'], options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/empty-module-no-treeshake/_config.js b/test/chunking-form/samples/empty-module-no-treeshake/_config.js index 6cbadc55400..360b520354b 100644 --- a/test/chunking-form/samples/empty-module-no-treeshake/_config.js +++ b/test/chunking-form/samples/empty-module-no-treeshake/_config.js @@ -2,11 +2,12 @@ const assert = require('node:assert'); const path = require('node:path'); const { getObject } = require('../../../utils'); -module.exports = { +module.exports = defineRollupTest({ description: 'associates empty modules with chunks if tree-shaking is disabled for them', options: { input: ['main1.js', 'main2.js'], plugins: { + name: 'test-plugin', resolveId(id) { if (id.startsWith('empty')) { if (id === 'emptyResolved') { @@ -64,4 +65,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/entry-aliases/_config.js b/test/chunking-form/samples/entry-aliases/_config.js index b34e645a489..b78a06ea2f8 100644 --- a/test/chunking-form/samples/entry-aliases/_config.js +++ b/test/chunking-form/samples/entry-aliases/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'alias module dependency inlining', options: { input: { @@ -10,4 +10,4 @@ module.exports = { entryFileNames: '[name]' } } -}; +}); diff --git a/test/chunking-form/samples/entry-chunk-export-mode/_config.js b/test/chunking-form/samples/entry-chunk-export-mode/_config.js index e1044841bf5..38a44d4d76a 100644 --- a/test/chunking-form/samples/entry-chunk-export-mode/_config.js +++ b/test/chunking-form/samples/entry-chunk-export-mode/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'entry chunk export mode checks', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/entry-point-without-own-code/_config.js b/test/chunking-form/samples/entry-point-without-own-code/_config.js index cdd3035cbc1..2ebbc34f6b0 100644 --- a/test/chunking-form/samples/entry-point-without-own-code/_config.js +++ b/test/chunking-form/samples/entry-point-without-own-code/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Handles entry points that contain no own code except imports and exports', options: { input: ['main.js', 'm1.js', 'm2.js'] } -}; +}); diff --git a/test/chunking-form/samples/entrypoint-aliasing/_config.js b/test/chunking-form/samples/entrypoint-aliasing/_config.js index 19a22686336..6428bfddcb0 100644 --- a/test/chunking-form/samples/entrypoint-aliasing/_config.js +++ b/test/chunking-form/samples/entrypoint-aliasing/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'entry point facade creation', options: { input: { @@ -6,4 +6,4 @@ module.exports = { main2alias: 'main2.js' } } -}; +}); diff --git a/test/chunking-form/samples/entrypoint-facade/_config.js b/test/chunking-form/samples/entrypoint-facade/_config.js index c044e70e346..c8c32a70682 100644 --- a/test/chunking-form/samples/entrypoint-facade/_config.js +++ b/test/chunking-form/samples/entrypoint-facade/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'entry point facade creation', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/export-default-from-entry/_config.js b/test/chunking-form/samples/export-default-from-entry/_config.js index 1fa07bc2cf0..cb1d54d7f68 100644 --- a/test/chunking-form/samples/export-default-from-entry/_config.js +++ b/test/chunking-form/samples/export-default-from-entry/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly imports the default from an entry point', options: { input: ['main', 'dep'] } -}; +}); diff --git a/test/chunking-form/samples/external-imports/_config.js b/test/chunking-form/samples/external-imports/_config.js index 1270c73478a..37b93bb0b9e 100644 --- a/test/chunking-form/samples/external-imports/_config.js +++ b/test/chunking-form/samples/external-imports/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct interop per chunk when importing from external modules', options: { external: module => module.includes('external'), input: ['main-default.js', 'main-named.js', 'main-namespace'], output: { interop: 'compat' } } -}; +}); diff --git a/test/chunking-form/samples/external-reexports/_config.js b/test/chunking-form/samples/external-reexports/_config.js index c50aa2ac32a..017437e5507 100644 --- a/test/chunking-form/samples/external-reexports/_config.js +++ b/test/chunking-form/samples/external-reexports/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct interop per chunk when reexporting from external modules', options: { external: module => module.includes('external'), input: ['main-default.js', 'main-named.js', 'main-namespace'], output: { interop: 'compat' } } -}; +}); diff --git a/test/chunking-form/samples/filenames-patterns/_config.js b/test/chunking-form/samples/filenames-patterns/_config.js index 80f91291ada..91e4a8c690c 100644 --- a/test/chunking-form/samples/filenames-patterns/_config.js +++ b/test/chunking-form/samples/filenames-patterns/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'filenames custom pattern', options: { input: ['main1.js', 'main2.js'], @@ -7,4 +7,4 @@ module.exports = { chunkFileNames: 'chunk-[name]-[hash]-[format].js' } } -}; +}); diff --git a/test/chunking-form/samples/generated-code/arrow-functions-false/_config.js b/test/chunking-form/samples/generated-code/arrow-functions-false/_config.js index dd376d6ae24..990108a4dee 100644 --- a/test/chunking-form/samples/generated-code/arrow-functions-false/_config.js +++ b/test/chunking-form/samples/generated-code/arrow-functions-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not use arrow functions', options: { input: ['main', 'main2'], @@ -6,4 +6,4 @@ module.exports = { generatedCode: { arrowFunctions: false } } } -}; +}); diff --git a/test/chunking-form/samples/generated-code/arrow-functions-true/_config.js b/test/chunking-form/samples/generated-code/arrow-functions-true/_config.js index 3b00bf4c398..4b54c44994f 100644 --- a/test/chunking-form/samples/generated-code/arrow-functions-true/_config.js +++ b/test/chunking-form/samples/generated-code/arrow-functions-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses arrow functions', options: { input: ['main', 'main2'], @@ -6,4 +6,4 @@ module.exports = { generatedCode: { arrowFunctions: true } } } -}; +}); diff --git a/test/chunking-form/samples/generated-code/reserved-names-as-props-false/_config.js b/test/chunking-form/samples/generated-code/reserved-names-as-props-false/_config.js index 8aa9eb1f2fc..0341cc96ff4 100644 --- a/test/chunking-form/samples/generated-code/reserved-names-as-props-false/_config.js +++ b/test/chunking-form/samples/generated-code/reserved-names-as-props-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props', options: { input: ['main', 'main2'], @@ -9,4 +9,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/chunking-form/samples/generated-code/reserved-names-as-props-true/_config.js b/test/chunking-form/samples/generated-code/reserved-names-as-props-true/_config.js index e1427430320..6694a3473b6 100644 --- a/test/chunking-form/samples/generated-code/reserved-names-as-props-true/_config.js +++ b/test/chunking-form/samples/generated-code/reserved-names-as-props-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props', options: { input: ['main', 'main2'], @@ -9,4 +9,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/chunking-form/samples/hashing/deconflict-hashes/_config.js b/test/chunking-form/samples/hashing/deconflict-hashes/_config.js index f201f896d67..1f9aea9bd69 100644 --- a/test/chunking-form/samples/hashing/deconflict-hashes/_config.js +++ b/test/chunking-form/samples/hashing/deconflict-hashes/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deduplicates hashes for identical files', options: { input: ['main1', 'main2'], output: { entryFileNames: 'entry-[hash].js' } } -}; +}); diff --git a/test/chunking-form/samples/hashing/double-hash/_config.js b/test/chunking-form/samples/hashing/double-hash/_config.js index 065a56632e9..a3087c20a67 100644 --- a/test/chunking-form/samples/hashing/double-hash/_config.js +++ b/test/chunking-form/samples/hashing/double-hash/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports double hashes in patterns', options: { output: { entryFileNames: '[hash]/entry-[hash].js' } } -}; +}); diff --git a/test/chunking-form/samples/hashing/hash-size/_config.js b/test/chunking-form/samples/hashing/hash-size/_config.js index 885a12e5409..2d50c700ece 100644 --- a/test/chunking-form/samples/hashing/hash-size/_config.js +++ b/test/chunking-form/samples/hashing/hash-size/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows configurable hash size', options: { input: ['main1.js', 'main2.js'], @@ -17,4 +17,4 @@ module.exports = { assetFileNames: '[name]-[hash:18][extname]' } } -}; +}); diff --git a/test/chunking-form/samples/hashing/random-match/_config.js b/test/chunking-form/samples/hashing/random-match/_config.js index 939d7935703..238ca1b4ad7 100644 --- a/test/chunking-form/samples/hashing/random-match/_config.js +++ b/test/chunking-form/samples/hashing/random-match/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'leaves random hash matches untransformed', options: { output: { entryFileNames: 'entry-[hash]-!~{001}~-!~{123}~.js' } } -}; +}); diff --git a/test/chunking-form/samples/hashing/tree-shaken-dynamic-hash/_config.js b/test/chunking-form/samples/hashing/tree-shaken-dynamic-hash/_config.js index fde4c170eb6..cc8cae04e20 100644 --- a/test/chunking-form/samples/hashing/tree-shaken-dynamic-hash/_config.js +++ b/test/chunking-form/samples/hashing/tree-shaken-dynamic-hash/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Does not fail when calculating the hash of a file containing a tree-shaken dynamic import', options: { @@ -7,4 +7,4 @@ module.exports = { entryFileNames: '[hash].js' } } -}; +}); diff --git a/test/chunking-form/samples/ignore-chunk-name-query/_config.js b/test/chunking-form/samples/ignore-chunk-name-query/_config.js index 2109243a262..9b81d837e9d 100644 --- a/test/chunking-form/samples/ignore-chunk-name-query/_config.js +++ b/test/chunking-form/samples/ignore-chunk-name-query/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'ignores queries and hashes for chunk names when preserving modules', options: { input: ['a.js?query', 'b.js#hash'], @@ -12,4 +12,4 @@ module.exports = { }) ] } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/dependant-entry-no-effects/_config.js b/test/chunking-form/samples/implicit-dependencies/dependant-entry-no-effects/_config.js index ab57ea9f387..dd476362371 100644 --- a/test/chunking-form/samples/implicit-dependencies/dependant-entry-no-effects/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/dependant-entry-no-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly emits a chunk when it is implicitly loaded after an empty entry module', expectedWarnings: ['EMPTY_BUNDLE'], options: { @@ -13,4 +13,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-emitted-entry/_config.js b/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-emitted-entry/_config.js index 820a9b787d0..6c015bf2a0e 100644 --- a/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-emitted-entry/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-emitted-entry/_config.js @@ -5,7 +5,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB = path.join(__dirname, 'lib.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure emitted entry points are never implicit dependencies', options: { preserveEntrySignatures: 'allow-extension', @@ -195,4 +195,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-entry/_config.js b/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-entry/_config.js index 9ab957666c4..bd66d8ff197 100644 --- a/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-entry/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-entry/_config.js @@ -5,7 +5,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB = path.join(__dirname, 'lib.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure actual entry points are never implicit dependencies', options: { input: ['main', 'dep'], @@ -191,4 +191,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/multiple-dependencies/_config.js b/test/chunking-form/samples/implicit-dependencies/multiple-dependencies/_config.js index dcb69f6e9d0..04f1419a7b1 100644 --- a/test/chunking-form/samples/implicit-dependencies/multiple-dependencies/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/multiple-dependencies/_config.js @@ -9,7 +9,7 @@ const ID_LIB2 = path.join(__dirname, 'lib2.js'); const ID_LIB3 = path.join(__dirname, 'lib3.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports emitting the same chunk with different and multiple dependencies', options: { input: ['main1', 'main2'], @@ -428,4 +428,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/preserve-signature-allow-extension/_config.js b/test/chunking-form/samples/implicit-dependencies/preserve-signature-allow-extension/_config.js index 63dd296f16e..50bdf256a2e 100644 --- a/test/chunking-form/samples/implicit-dependencies/preserve-signature-allow-extension/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/preserve-signature-allow-extension/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports implicit dependencies when emitting files', options: { plugins: { @@ -13,4 +13,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/preserve-signature-false/_config.js b/test/chunking-form/samples/implicit-dependencies/preserve-signature-false/_config.js index e55905d0227..3d39e2d2e08 100644 --- a/test/chunking-form/samples/implicit-dependencies/preserve-signature-false/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/preserve-signature-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports implicit dependencies when emitting files', options: { plugins: { @@ -13,4 +13,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/preserve-signature-strict/_config.js b/test/chunking-form/samples/implicit-dependencies/preserve-signature-strict/_config.js index e86db665836..3ae7ce231ba 100644 --- a/test/chunking-form/samples/implicit-dependencies/preserve-signature-strict/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/preserve-signature-strict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports implicit dependencies when emitting files', options: { plugins: { @@ -13,4 +13,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/same-chunk-dependency/_config.js b/test/chunking-form/samples/implicit-dependencies/same-chunk-dependency/_config.js index 15c4f59a241..22dcc3d6613 100644 --- a/test/chunking-form/samples/implicit-dependencies/same-chunk-dependency/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/same-chunk-dependency/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'handles implicit dependencies where the dependant is inlined into the same chunk', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { @@ -20,4 +20,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_config.js b/test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_config.js index 564795d4540..4f5b140ad64 100644 --- a/test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles shared dependencies between implicit chunks without side-effects', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_config.js b/test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_config.js index c3fa81549a0..77730617482 100644 --- a/test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles shared dependencies when there are only reexports', options: { plugins: { @@ -12,4 +12,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/implicit-dependencies/single-dependency/_config.js b/test/chunking-form/samples/implicit-dependencies/single-dependency/_config.js index eb28587ec04..ecd41391c86 100644 --- a/test/chunking-form/samples/implicit-dependencies/single-dependency/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/single-dependency/_config.js @@ -5,7 +5,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB = path.join(__dirname, 'lib.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports implicit dependencies when emitting files', options: { preserveEntrySignatures: 'allow-extension', @@ -194,4 +194,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/import-meta-numeric-paths/_config.js b/test/chunking-form/samples/import-meta-numeric-paths/_config.js index 045146cd4bb..94be4998284 100644 --- a/test/chunking-form/samples/import-meta-numeric-paths/_config.js +++ b/test/chunking-form/samples/import-meta-numeric-paths/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports nested numeric paths without issues on Windows', options: { output: { preserveModules: true }, @@ -13,4 +13,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/import-meta-url/_config.js b/test/chunking-form/samples/import-meta-url/_config.js index e6560873bb7..29817568436 100644 --- a/test/chunking-form/samples/import-meta-url/_config.js +++ b/test/chunking-form/samples/import-meta-url/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports import.meta.url', options: { preserveEntrySignatures: false, @@ -6,4 +6,4 @@ module.exports = { chunkFileNames: 'nested/chunk.js' } } -}; +}); diff --git a/test/chunking-form/samples/import-variable-duplicates/_config.js b/test/chunking-form/samples/import-variable-duplicates/_config.js index 950b01a7535..ab225361c7e 100644 --- a/test/chunking-form/samples/import-variable-duplicates/_config.js +++ b/test/chunking-form/samples/import-variable-duplicates/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk duplicate import deshadowing', options: { input: ['main1.js', 'main2.js', 'first.js', 'head.js'] } -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/chained-dynamic-with-shared/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/chained-dynamic-with-shared/_config.js index ba9c4c3c981..9a1d81d455e 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/chained-dynamic-with-shared/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/chained-dynamic-with-shared/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chained dynamic import that imports something already loaded' -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/circular-dynamic-imports/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/circular-dynamic-imports/_config.js index 86aea7fe346..f8e6270a387 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/circular-dynamic-imports/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/circular-dynamic-imports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles circular dynamic imports' -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/cut-off/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/cut-off/_config.js index c576b1c3250..c11600bdb49 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/cut-off/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/cut-off/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not avoid separate chunks if too many modules dynamically import the same chunk', options: { input: ['main1', 'main2', 'main3', 'main4'] } -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-1/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-1/_config.js index f475a15a739..064cdc89a2c 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-1/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-1/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'inlines dynamic imports that are already statically imported' -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-2/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-2/_config.js index 8fb4c32176c..eafacef6f02 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-2/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-2/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'inlines dynamic imports that are already statically imported by their importers' -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic-multi-stage/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic-multi-stage/_config.js index d8b7a769273..581eed25c20 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic-multi-stage/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic-multi-stage/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles if a dynamically imported module imports another module dynamically' -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic/_config.js index d8b7a769273..581eed25c20 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles if a dynamically imported module imports another module dynamically' -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-not-in-memory/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-not-in-memory/_config.js index 8d679763598..a01e32fe431 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-not-in-memory/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-not-in-memory/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps chunks separate when not in memory for all dynamic imports', options: { input: ['main1', 'main2', 'main3'] } -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-and-shared-dependencies/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-and-shared-dependencies/_config.js index fd9e687a29a..a9104fadba1 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-and-shared-dependencies/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-and-shared-dependencies/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids chunks for always loaded dependencies if multiple entry points with different dependencies have dynamic imports', options: { input: ['main1', 'main2'] } -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-dependencies/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-dependencies/_config.js index fd9e687a29a..a9104fadba1 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-dependencies/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-dependencies/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids chunks for always loaded dependencies if multiple entry points with different dependencies have dynamic imports', options: { input: ['main1', 'main2'] } -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-partly-already-loaded-dynamic/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-partly-already-loaded-dynamic/_config.js index fd9e687a29a..a9104fadba1 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-partly-already-loaded-dynamic/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-partly-already-loaded-dynamic/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids chunks for always loaded dependencies if multiple entry points with different dependencies have dynamic imports', options: { input: ['main1', 'main2'] } -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-shared-static-with-dynamic-import/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-shared-static-with-dynamic-import/_config.js index fd9e687a29a..a9104fadba1 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-shared-static-with-dynamic-import/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-shared-static-with-dynamic-import/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids chunks for always loaded dependencies if multiple entry points with different dependencies have dynamic imports', options: { input: ['main1', 'main2'] } -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic-multiple-imports/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic-multiple-imports/_config.js index 03f32f46185..b05f059ffb5 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic-multiple-imports/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic-multiple-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not create a separate chunk if a dynamically imported chunk shares a dependency with its importer, and dynamic chunk imported from multiple places' -}; +}); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic/_config.js index 4ca923a9bb0..2d58b44d7b9 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not create a separate chunk if a dynamically imported chunk shares a dependency with its importer' -}; +}); diff --git a/test/chunking-form/samples/indirect-reexports-preserve-modules/_config.js b/test/chunking-form/samples/indirect-reexports-preserve-modules/_config.js index e2616fe4ab7..09e66122fcb 100644 --- a/test/chunking-form/samples/indirect-reexports-preserve-modules/_config.js +++ b/test/chunking-form/samples/indirect-reexports-preserve-modules/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not drop indirect reexports when preserving modules', expectedWarnings: ['MIXED_EXPORTS'], options: { output: { name: 'bundle', preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/interop-per-reexported-default-dependency/_config.js b/test/chunking-form/samples/interop-per-reexported-default-dependency/_config.js index 128dc1e4400..6250b4cfb30 100644 --- a/test/chunking-form/samples/interop-per-reexported-default-dependency/_config.js +++ b/test/chunking-form/samples/interop-per-reexported-default-dependency/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to configure the interop type per reexported default from an external dependency', options: { @@ -10,4 +10,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunk-avoid-facade/_config.js b/test/chunking-form/samples/manual-chunk-avoid-facade/_config.js index b3f1783fee8..8061ea87fbc 100644 --- a/test/chunking-form/samples/manual-chunk-avoid-facade/_config.js +++ b/test/chunking-form/samples/manual-chunk-avoid-facade/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoid facades if possible when using manual chunks', options: { input: ['main1', 'main2'], @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunk-contains-entry-conflict/_config.js b/test/chunking-form/samples/manual-chunk-contains-entry-conflict/_config.js index a37dc57a3b7..2a08b8d23dd 100644 --- a/test/chunking-form/samples/manual-chunk-contains-entry-conflict/_config.js +++ b/test/chunking-form/samples/manual-chunk-contains-entry-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ expectedWarnings: ['EMPTY_BUNDLE'], description: 'Uses entry alias if manual chunks contain entry chunks with different alias', options: { @@ -12,4 +12,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunk-contains-entry-match/_config.js b/test/chunking-form/samples/manual-chunk-contains-entry-match/_config.js index 886f2483469..220e5c9e69e 100644 --- a/test/chunking-form/samples/manual-chunk-contains-entry-match/_config.js +++ b/test/chunking-form/samples/manual-chunk-contains-entry-match/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Identifies the entry chunk with the manual chunk that contains it if the aliases match', options: { @@ -11,4 +11,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunk-is-entry-conflict/_config.js b/test/chunking-form/samples/manual-chunk-is-entry-conflict/_config.js index ff3ff114277..1223c61a817 100644 --- a/test/chunking-form/samples/manual-chunk-is-entry-conflict/_config.js +++ b/test/chunking-form/samples/manual-chunk-is-entry-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Uses entry alias if manual chunks are entry chunks with different alias', options: { input: { @@ -11,4 +11,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunk-is-entry-match/_config.js b/test/chunking-form/samples/manual-chunk-is-entry-match/_config.js index e48ab6e5c57..ceecbc6d971 100644 --- a/test/chunking-form/samples/manual-chunk-is-entry-match/_config.js +++ b/test/chunking-form/samples/manual-chunk-is-entry-match/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Identifies the entry chunk with the manual chunk that has the same entry if the aliases match', options: { @@ -11,4 +11,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunk-not-included/_config.js b/test/chunking-form/samples/manual-chunk-not-included/_config.js index 4ad3e9f1e3a..af9cf6eee56 100644 --- a/test/chunking-form/samples/manual-chunk-not-included/_config.js +++ b/test/chunking-form/samples/manual-chunk-not-included/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles manual chunks where the root is not part of the module graph', options: { input: ['main.js'], @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunks-different-nested/_config.js b/test/chunking-form/samples/manual-chunks-different-nested/_config.js index b3cb648c6ce..fb0df84c2ac 100644 --- a/test/chunking-form/samples/manual-chunks-different-nested/_config.js +++ b/test/chunking-form/samples/manual-chunks-different-nested/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'manual chunks can have other manual chunks as dependencies', options: { input: ['main.js'], @@ -10,4 +10,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunks-dynamic-facades/_config.js b/test/chunking-form/samples/manual-chunks-dynamic-facades/_config.js index 4b561f0ff92..fd7fcc89b20 100644 --- a/test/chunking-form/samples/manual-chunks-dynamic-facades/_config.js +++ b/test/chunking-form/samples/manual-chunks-dynamic-facades/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates facades for dynamic manual chunks if necessary', options: { input: ['main.js'], @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunks-dynamic-name-conflict/_config.js b/test/chunking-form/samples/manual-chunks-dynamic-name-conflict/_config.js index 05c5ee743cf..056f8e0d8bf 100644 --- a/test/chunking-form/samples/manual-chunks-dynamic-name-conflict/_config.js +++ b/test/chunking-form/samples/manual-chunks-dynamic-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles name conflicts in manual chunks', options: { input: ['main.js'], @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunks-dynamic/_config.js b/test/chunking-form/samples/manual-chunks-dynamic/_config.js index e41c6eed7a7..f3798005b93 100644 --- a/test/chunking-form/samples/manual-chunks-dynamic/_config.js +++ b/test/chunking-form/samples/manual-chunks-dynamic/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports dynamic manual chunks', options: { input: ['main.js'], @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunks-function/_config.js b/test/chunking-form/samples/manual-chunks-function/_config.js index 13245c87f9d..411f79754ce 100644 --- a/test/chunking-form/samples/manual-chunks-function/_config.js +++ b/test/chunking-form/samples/manual-chunks-function/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows to define manual chunks via a function', options: { input: ['main-a'], @@ -25,4 +25,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/manual-chunks-nested/_config.js b/test/chunking-form/samples/manual-chunks-nested/_config.js index 8214e629eaf..74c42e894f4 100644 --- a/test/chunking-form/samples/manual-chunks-nested/_config.js +++ b/test/chunking-form/samples/manual-chunks-nested/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'manual chunks can contain nested modules', options: { input: ['main.js'], @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/manual-chunks/_config.js b/test/chunking-form/samples/manual-chunks/_config.js index 2589e95d79a..58123231188 100644 --- a/test/chunking-form/samples/manual-chunks/_config.js +++ b/test/chunking-form/samples/manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'manual chunks support', options: { input: ['main.js'], @@ -9,4 +9,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/max-parallel-file-operations/_config.js b/test/chunking-form/samples/max-parallel-file-operations/_config.js index b68b3518720..7ee93992ed0 100644 --- a/test/chunking-form/samples/max-parallel-file-operations/_config.js +++ b/test/chunking-form/samples/max-parallel-file-operations/_config.js @@ -6,7 +6,7 @@ const fsWriteFile = fs.writeFile; let currentWrites = 0; let maxWrites = 0; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileOps limits write operations', options: { maxParallelFileOps: 3, @@ -25,4 +25,4 @@ module.exports = { fs.writeFile = fsWriteFile; assert.strictEqual(maxWrites, 3, 'Wrong number of parallel file writes: ' + maxWrites); } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/avoid-circular-dependencies/_config.js b/test/chunking-form/samples/min-chunk-size/avoid-circular-dependencies/_config.js index e3d1f21b0ae..7dcf86a9a82 100644 --- a/test/chunking-form/samples/min-chunk-size/avoid-circular-dependencies/_config.js +++ b/test/chunking-form/samples/min-chunk-size/avoid-circular-dependencies/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids circular dependencies when merging chunks', options: { input: ['main1.js', 'main2.js', 'main3.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/avoid-transitive-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/avoid-transitive-side-effects/_config.js index a919035dba8..98ff8be45c7 100644 --- a/test/chunking-form/samples/min-chunk-size/avoid-transitive-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/avoid-transitive-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not merge chunks if a dependency would introduce a new side effect', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/best-merge-target/_config.js b/test/chunking-form/samples/min-chunk-size/best-merge-target/_config.js index ca1b905a639..18fbd931610 100644 --- a/test/chunking-form/samples/min-chunk-size/best-merge-target/_config.js +++ b/test/chunking-form/samples/min-chunk-size/best-merge-target/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses the merge target that is closest', options: { input: [ @@ -16,4 +16,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/ignore-correlated-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/ignore-correlated-side-effects/_config.js index 2d21d596898..4a9812d1207 100644 --- a/test/chunking-form/samples/min-chunk-size/ignore-correlated-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/ignore-correlated-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'ignores correlated side effects if they cannot be merged', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js', 'main5.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/merge-chunk-into-distant-shared/_config.js b/test/chunking-form/samples/min-chunk-size/merge-chunk-into-distant-shared/_config.js index 1b184ed33a0..89730230eb2 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-chunk-into-distant-shared/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-chunk-into-distant-shared/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges small chunks into shared chunks that are loaded by a non-close super-set of entry points', options: { @@ -7,4 +7,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/merge-chunk-into-shared/_config.js b/test/chunking-form/samples/min-chunk-size/merge-chunk-into-shared/_config.js index a6b8f26fbba..a33c5fe5204 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-chunk-into-shared/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-chunk-into-shared/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges small chunks into shared chunks that are loaded by a super-set of entry points', options: { @@ -7,4 +7,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/merge-correlated-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/merge-correlated-side-effects/_config.js index 24e9b6f1fe8..d36414511ba 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-correlated-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-correlated-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges correlated side effects with pure chunks', options: { input: ['main1.js', 'main2.js', 'main3.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/merge-dependency-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/merge-dependency-side-effects/_config.js index 5a53def33c2..76b5a8d4efb 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-dependency-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-dependency-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges chunks if their dependency side effects are the same', options: { input: ['main1.js', 'main2.js', 'main3.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/merge-despite-correlated-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/merge-despite-correlated-side-effects/_config.js index 6afd5febb9c..a86892d8e4a 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-despite-correlated-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-despite-correlated-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: "merges chunks if their dependency side effects are a subset of the other's correlated side effects", options: { @@ -7,4 +7,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/merge-dynamic-imports/_config.js b/test/chunking-form/samples/min-chunk-size/merge-dynamic-imports/_config.js index 316a0906846..0d5ad102f11 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-dynamic-imports/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-dynamic-imports/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges small chunks with side effects into suitable pure chunks', options: { output: { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/merge-small-side-effect-chunks/_config.js b/test/chunking-form/samples/min-chunk-size/merge-small-side-effect-chunks/_config.js index 3ae974729b7..e20c72c2043 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-small-side-effect-chunks/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-small-side-effect-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges small chunks with side effects into suitable pure chunks', options: { input: ['main1.js', 'main2.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/merge-unrelated/_config.js b/test/chunking-form/samples/min-chunk-size/merge-unrelated/_config.js index 7bc0924b1a2..4f1eccaf18f 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-unrelated/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-unrelated/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges unrelated small chunks if there is no better alternative', options: { input: ['main1.js', 'main2.js', 'main3.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/no-merge-for-big-chunks/_config.js b/test/chunking-form/samples/min-chunk-size/no-merge-for-big-chunks/_config.js index a72a748e3e5..3ec549701a1 100644 --- a/test/chunking-form/samples/min-chunk-size/no-merge-for-big-chunks/_config.js +++ b/test/chunking-form/samples/min-chunk-size/no-merge-for-big-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not merge chunks if all chunks are below the size limit', options: { input: ['main1.js', 'main2.js', 'main3.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 1 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/no-merge-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/no-merge-side-effects/_config.js index 5146a813748..b9e1a59437f 100644 --- a/test/chunking-form/samples/min-chunk-size/no-merge-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/no-merge-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not merge small chunks that have side effects', options: { input: ['main1.js', 'main2.js', 'main3.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-a/_config.js b/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-a/_config.js index 80ff49b83e7..de182bdb25e 100644 --- a/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-a/_config.js +++ b/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-a/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'when there are two valid merge targets, the one that is loaded under more similar conditions is preferred', options: { @@ -7,4 +7,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-b/_config.js b/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-b/_config.js index 80ff49b83e7..de182bdb25e 100644 --- a/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-b/_config.js +++ b/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'when there are two valid merge targets, the one that is loaded under more similar conditions is preferred', options: { @@ -7,4 +7,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-a/_config.js b/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-a/_config.js index 065171aa5fd..17cccb80f4c 100644 --- a/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-a/_config.js +++ b/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-a/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'when there are two equally valid merge targets, the smaller is preferred', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-b/_config.js b/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-b/_config.js index 065171aa5fd..17cccb80f4c 100644 --- a/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-b/_config.js +++ b/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'when there are two equally valid merge targets, the smaller is preferred', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'], @@ -6,4 +6,4 @@ module.exports = { experimentalMinChunkSize: 100 } } -}; +}); diff --git a/test/chunking-form/samples/minify-internal-exports/_config.js b/test/chunking-form/samples/minify-internal-exports/_config.js index e550586d56d..c0fc57b45bc 100644 --- a/test/chunking-form/samples/minify-internal-exports/_config.js +++ b/test/chunking-form/samples/minify-internal-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to force the minification of internal exports', options: { input: ['main1.js', 'main2.js'], @@ -6,4 +6,4 @@ module.exports = { minifyInternalExports: true } } -}; +}); diff --git a/test/chunking-form/samples/missing-export-compact/_config.js b/test/chunking-form/samples/missing-export-compact/_config.js index 236f582eb45..807b53a0be9 100644 --- a/test/chunking-form/samples/missing-export-compact/_config.js +++ b/test/chunking-form/samples/missing-export-compact/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'missing export compact', expectedWarnings: ['SHIMMED_EXPORT'], options: { @@ -8,4 +8,4 @@ module.exports = { compact: true } } -}; +}); diff --git a/test/chunking-form/samples/missing-export-reused-deconflicting/_config.js b/test/chunking-form/samples/missing-export-reused-deconflicting/_config.js index fa8ef996a91..328a10b44cf 100644 --- a/test/chunking-form/samples/missing-export-reused-deconflicting/_config.js +++ b/test/chunking-form/samples/missing-export-reused-deconflicting/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles using dependencies with shimmed missing exports as ', expectedWarnings: ['SHIMMED_EXPORT'], options: { @@ -6,4 +6,4 @@ module.exports = { shimMissingExports: true, output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/missing-export/_config.js b/test/chunking-form/samples/missing-export/_config.js index bd55b234392..6fb44fec3d2 100644 --- a/test/chunking-form/samples/missing-export/_config.js +++ b/test/chunking-form/samples/missing-export/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'missing export', expectedWarnings: ['SHIMMED_EXPORT', 'MIXED_EXPORTS'], options: { input: ['main.js', 'dep.js'], shimMissingExports: true } -}; +}); diff --git a/test/chunking-form/samples/multi-chunking/_config.js b/test/chunking-form/samples/multi-chunking/_config.js index 7e89c5b03b0..d9c55b44b29 100644 --- a/test/chunking-form/samples/multi-chunking/_config.js +++ b/test/chunking-form/samples/multi-chunking/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'simple chunking', options: { input: ['main1.js', 'main2.js', 'main3.js'] } -}; +}); diff --git a/test/chunking-form/samples/multiple-entry-points/_config.js b/test/chunking-form/samples/multiple-entry-points/_config.js index e8f588be523..33381de6df1 100644 --- a/test/chunking-form/samples/multiple-entry-points/_config.js +++ b/test/chunking-form/samples/multiple-entry-points/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles multiple entry points with a shared dependency', options: { input: ['main', 'other'], @@ -7,4 +7,4 @@ module.exports = { } }, runAmd: true -}; +}); diff --git a/test/chunking-form/samples/namespace-imports-from-chunks/_config.js b/test/chunking-form/samples/namespace-imports-from-chunks/_config.js index b5ff817c4b6..121868615fe 100644 --- a/test/chunking-form/samples/namespace-imports-from-chunks/_config.js +++ b/test/chunking-form/samples/namespace-imports-from-chunks/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handle namespace imports from chunks', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/namespace-object-import/_config.js b/test/chunking-form/samples/namespace-object-import/_config.js index c746cbbbf8a..2b9df55e0ae 100644 --- a/test/chunking-form/samples/namespace-object-import/_config.js +++ b/test/chunking-form/samples/namespace-object-import/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'namespace object import', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/chunking-form/samples/namespace-reexport-name-conflict/_config.js b/test/chunking-form/samples/namespace-reexport-name-conflict/_config.js index 538fbb40363..6a914901aef 100644 --- a/test/chunking-form/samples/namespace-reexport-name-conflict/_config.js +++ b/test/chunking-form/samples/namespace-reexport-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'renders namespaces with reexports that conflict with existing imports', options: { input: ['main1.js', 'main2.js', 'main3.js'], @@ -7,4 +7,4 @@ module.exports = { exports: 'named' } } -}; +}); diff --git a/test/chunking-form/samples/namespace-reexports/_config.js b/test/chunking-form/samples/namespace-reexports/_config.js index 16b17829701..ae50022e5c7 100644 --- a/test/chunking-form/samples/namespace-reexports/_config.js +++ b/test/chunking-form/samples/namespace-reexports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'namespace rendering with reexports', options: { input: ['main.js', 'hsl2hsv.js', 'index.js'], @@ -6,4 +6,4 @@ module.exports = { exports: 'named' } } -}; +}); diff --git a/test/chunking-form/samples/namespace-retracing/_config.js b/test/chunking-form/samples/namespace-retracing/_config.js index 6169fb37668..9de889a3d98 100644 --- a/test/chunking-form/samples/namespace-retracing/_config.js +++ b/test/chunking-form/samples/namespace-retracing/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'internal reexported namespaces over chunk boundaries', options: { input: ['main-a.js', 'main-b.js'] } -}; +}); diff --git a/test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.js b/test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.js index cce31ed90cf..7ec599c2e29 100644 --- a/test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.js +++ b/test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', options: { @@ -7,4 +7,4 @@ module.exports = { generatedCode: { symbols: true } } } -}; +}); diff --git a/test/chunking-form/samples/namespace-tostring/dynamic-import/_config.js b/test/chunking-form/samples/namespace-tostring/dynamic-import/_config.js index 1e26346fe3b..1b28b020380 100644 --- a/test/chunking-form/samples/namespace-tostring/dynamic-import/_config.js +++ b/test/chunking-form/samples/namespace-tostring/dynamic-import/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to dynamic imports', options: { output: { generatedCode: { symbols: true } } } -}; +}); diff --git a/test/chunking-form/samples/namespace-tracing/_config.js b/test/chunking-form/samples/namespace-tracing/_config.js index 230f2306e52..8ef12626be3 100644 --- a/test/chunking-form/samples/namespace-tracing/_config.js +++ b/test/chunking-form/samples/namespace-tracing/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Something', options: { input: ['main-a.js', 'main-b.js', 'main-c.js'] } -}; +}); diff --git a/test/chunking-form/samples/nested-chunks/_config.js b/test/chunking-form/samples/nested-chunks/_config.js index c9c0bdd593b..10d8f5490ab 100644 --- a/test/chunking-form/samples/nested-chunks/_config.js +++ b/test/chunking-form/samples/nested-chunks/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'nested chunks', options: { input: { main1: 'main1', 'nested/main2': 'main2' }, external: './external.js' } -}; +}); diff --git a/test/chunking-form/samples/nested-dynamic-imports/_config.js b/test/chunking-form/samples/nested-dynamic-imports/_config.js index f96b6c536d2..8cde419ff76 100644 --- a/test/chunking-form/samples/nested-dynamic-imports/_config.js +++ b/test/chunking-form/samples/nested-dynamic-imports/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles dynamic imports containing dynamic imports', options: { input: 'main' } -}; +}); diff --git a/test/chunking-form/samples/no-minify-internal-exports/_config.js b/test/chunking-form/samples/no-minify-internal-exports/_config.js index c6a38b51532..007b4b3d7fe 100644 --- a/test/chunking-form/samples/no-minify-internal-exports/_config.js +++ b/test/chunking-form/samples/no-minify-internal-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to disable the minification of internal exports', options: { input: ['main1.js', 'main2.js'], @@ -6,4 +6,4 @@ module.exports = { minifyInternalExports: false } } -}; +}); diff --git a/test/chunking-form/samples/no-treeshake-imports/_config.js b/test/chunking-form/samples/no-treeshake-imports/_config.js index 091a658f468..b941534b90b 100644 --- a/test/chunking-form/samples/no-treeshake-imports/_config.js +++ b/test/chunking-form/samples/no-treeshake-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes all imports when setting moduleSideEffects to "no-treeshake"', options: { input: ['main1', 'main2'], @@ -10,4 +10,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/preserve-entry-signatures/allow-extension/_config.js b/test/chunking-form/samples/preserve-entry-signatures/allow-extension/_config.js index ea3e5f737cf..d3fdeba75c8 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/allow-extension/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/allow-extension/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Never creates facades for allow-extension', options: { preserveEntrySignatures: 'allow-extension' } -}; +}); diff --git a/test/chunking-form/samples/preserve-entry-signatures/exports-only-no-exports/_config.js b/test/chunking-form/samples/preserve-entry-signatures/exports-only-no-exports/_config.js index 6fb75a89816..3865340d1dd 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/exports-only-no-exports/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/exports-only-no-exports/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Does not create a facade for exports-only if there are no exports', options: { preserveEntrySignatures: 'exports-only' } -}; +}); diff --git a/test/chunking-form/samples/preserve-entry-signatures/exports-only/_config.js b/test/chunking-form/samples/preserve-entry-signatures/exports-only/_config.js index e00716aa766..2202db546aa 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/exports-only/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/exports-only/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Creates a facade if necessary for exports-only if there are exports', options: { preserveEntrySignatures: 'exports-only' } -}; +}); diff --git a/test/chunking-form/samples/preserve-entry-signatures/false/_config.js b/test/chunking-form/samples/preserve-entry-signatures/false/_config.js index 601608a5d93..c759457e255 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/false/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/false/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Does not include entry exports and does not preserve the signature', options: { preserveEntrySignatures: false } -}; +}); diff --git a/test/chunking-form/samples/preserve-entry-signatures/override-via-plugin/_config.js b/test/chunking-form/samples/preserve-entry-signatures/override-via-plugin/_config.js index d4888307bcf..adbfebdb92b 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/override-via-plugin/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/override-via-plugin/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Allows overriding behaviour for emitted chunks', options: { input: [], @@ -32,4 +32,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/preserve-entry-signatures/strict/_config.js b/test/chunking-form/samples/preserve-entry-signatures/strict/_config.js index 858e5fd4d3e..e294cfe45b2 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/strict/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/strict/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Creates a facade if necessary for strict entry signatures', options: { preserveEntrySignatures: 'strict' } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-auto-export-mode/_config.js b/test/chunking-form/samples/preserve-modules-auto-export-mode/_config.js index 7afad981a92..a34d524ab6e 100644 --- a/test/chunking-form/samples/preserve-modules-auto-export-mode/_config.js +++ b/test/chunking-form/samples/preserve-modules-auto-export-mode/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Uses entry point semantics for all files when preserving modules', options: { input: 'main.js', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-commonjs/_config.js b/test/chunking-form/samples/preserve-modules-commonjs/_config.js index c748f85794d..c546dd2aa0e 100644 --- a/test/chunking-form/samples/preserve-modules-commonjs/_config.js +++ b/test/chunking-form/samples/preserve-modules-commonjs/_config.js @@ -1,6 +1,6 @@ const commonjs = require('@rollup/plugin-commonjs'); -module.exports = { +module.exports = defineRollupTest({ description: 'Handles output from @rollup/plugin-commonjs', expectedWarnings: ['MIXED_EXPORTS'], options: { @@ -9,4 +9,4 @@ module.exports = { plugins: [commonjs()], output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-default-mode-namespace/_config.js b/test/chunking-form/samples/preserve-modules-default-mode-namespace/_config.js index 12e5ced8b34..b9659d7acdf 100644 --- a/test/chunking-form/samples/preserve-modules-default-mode-namespace/_config.js +++ b/test/chunking-form/samples/preserve-modules-default-mode-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'import namespace from chunks with default export mode when preserving modules', options: { input: ['main', 'lib'], @@ -6,4 +6,4 @@ module.exports = { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-default-mode-namespace2/_config.js b/test/chunking-form/samples/preserve-modules-default-mode-namespace2/_config.js index 12e5ced8b34..b9659d7acdf 100644 --- a/test/chunking-form/samples/preserve-modules-default-mode-namespace2/_config.js +++ b/test/chunking-form/samples/preserve-modules-default-mode-namespace2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'import namespace from chunks with default export mode when preserving modules', options: { input: ['main', 'lib'], @@ -6,4 +6,4 @@ module.exports = { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-dynamic-imports/_config.js b/test/chunking-form/samples/preserve-modules-dynamic-imports/_config.js index cd38717b589..db4fb811297 100644 --- a/test/chunking-form/samples/preserve-modules-dynamic-imports/_config.js +++ b/test/chunking-form/samples/preserve-modules-dynamic-imports/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'dynamic imports are handled correctly when preserving modules', options: { input: ['main.js'], output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-dynamic-namespace/_config.js b/test/chunking-form/samples/preserve-modules-dynamic-namespace/_config.js index 10c317cd8fc..15cb68c04a2 100644 --- a/test/chunking-form/samples/preserve-modules-dynamic-namespace/_config.js +++ b/test/chunking-form/samples/preserve-modules-dynamic-namespace/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Preserve modules properly handles internal namespace imports (#2576)', options: { input: ['main.js'], output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-empty/_config.js b/test/chunking-form/samples/preserve-modules-empty/_config.js index 7b9d517b336..543e43f0754 100644 --- a/test/chunking-form/samples/preserve-modules-empty/_config.js +++ b/test/chunking-form/samples/preserve-modules-empty/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Preserve modules remove empty dependencies', options: { input: 'main.js', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-export-alias/_config.js b/test/chunking-form/samples/preserve-modules-export-alias/_config.js index 9c422ba3d6d..6158ea525de 100644 --- a/test/chunking-form/samples/preserve-modules-export-alias/_config.js +++ b/test/chunking-form/samples/preserve-modules-export-alias/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'confirm export aliases are preserved in modules', options: { input: ['main1.js', 'main2.js'], output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-filename-pattern/_config.js b/test/chunking-form/samples/preserve-modules-filename-pattern/_config.js index 9b4472713fb..66a224dca57 100644 --- a/test/chunking-form/samples/preserve-modules-filename-pattern/_config.js +++ b/test/chunking-form/samples/preserve-modules-filename-pattern/_config.js @@ -14,7 +14,7 @@ const expectedNames = new Set([ 'no-ext' ]); -module.exports = { +module.exports = defineRollupTest({ description: 'entryFileNames pattern supported in combination with preserveModules', options: { input: 'src/main.js', @@ -41,4 +41,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-id-case-sensitive/_config.js b/test/chunking-form/samples/preserve-modules-id-case-sensitive/_config.js index 7650f6f19b0..73c52535dd8 100644 --- a/test/chunking-form/samples/preserve-modules-id-case-sensitive/_config.js +++ b/test/chunking-form/samples/preserve-modules-id-case-sensitive/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Preserve modules id case sensitive', options: { input: 'main.js', @@ -18,4 +18,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-named-export-mode/_config.js b/test/chunking-form/samples/preserve-modules-named-export-mode/_config.js index 0ad8d5aad54..6ce1e6897a2 100644 --- a/test/chunking-form/samples/preserve-modules-named-export-mode/_config.js +++ b/test/chunking-form/samples/preserve-modules-named-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects "named" export mode in all chunks when preserving modules', options: { input: 'main.js', @@ -7,4 +7,4 @@ module.exports = { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_config.js b/test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_config.js index 7772cc95c37..181e5489ef1 100644 --- a/test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_config.js +++ b/test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles doing a namespace reexport of a reexport', options: { output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-nested-barrel-es-export/_config.js b/test/chunking-form/samples/preserve-modules-nested-barrel-es-export/_config.js index 209f77d87a8..24996b2915e 100644 --- a/test/chunking-form/samples/preserve-modules-nested-barrel-es-export/_config.js +++ b/test/chunking-form/samples/preserve-modules-nested-barrel-es-export/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'confirm exports are deconflicted when exporting nested index aliases', options: { input: 'main.js', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-nested-export/_config.js b/test/chunking-form/samples/preserve-modules-nested-export/_config.js index f2cdd1cc149..9669a56b868 100644 --- a/test/chunking-form/samples/preserve-modules-nested-export/_config.js +++ b/test/chunking-form/samples/preserve-modules-nested-export/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'confirm exports are preserved when exporting a module', options: { input: 'main.js', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-non-entry-imports/_config.js b/test/chunking-form/samples/preserve-modules-non-entry-imports/_config.js index 732fa455ebe..d1018a906d9 100644 --- a/test/chunking-form/samples/preserve-modules-non-entry-imports/_config.js +++ b/test/chunking-form/samples/preserve-modules-non-entry-imports/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports and exports of non-entry points are tracked', options: { input: 'main.js', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-proxy-import/_config.js b/test/chunking-form/samples/preserve-modules-proxy-import/_config.js index 23a87ffcbec..2984a845abb 100644 --- a/test/chunking-form/samples/preserve-modules-proxy-import/_config.js +++ b/test/chunking-form/samples/preserve-modules-proxy-import/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly resolves imports via a proxy module as direct imports when preserving modules', options: { external: 'external', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-reaching-outside/_config.js b/test/chunking-form/samples/preserve-modules-reaching-outside/_config.js index 61fa9b612c1..3e3af8ac52c 100644 --- a/test/chunking-form/samples/preserve-modules-reaching-outside/_config.js +++ b/test/chunking-form/samples/preserve-modules-reaching-outside/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'change the module destination', options: { input: 'src/lib/main.js', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-root/_config.js b/test/chunking-form/samples/preserve-modules-root/_config.js index 5518c9c5483..8d9194723f7 100644 --- a/test/chunking-form/samples/preserve-modules-root/_config.js +++ b/test/chunking-form/samples/preserve-modules-root/_config.js @@ -1,7 +1,7 @@ const commonjs = require('@rollup/plugin-commonjs'); const resolve = require('@rollup/plugin-node-resolve').default; -module.exports = { +module.exports = defineRollupTest({ description: 'confirm preserveModulesRoot restructures src appropriately', expectedWarnings: ['MIXED_EXPORTS'], options: { @@ -25,4 +25,4 @@ module.exports = { preserveModulesRoot: 'src' } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-scriptified-assets/_config.js b/test/chunking-form/samples/preserve-modules-scriptified-assets/_config.js index 43f0815cba3..03e72da25f8 100644 --- a/test/chunking-form/samples/preserve-modules-scriptified-assets/_config.js +++ b/test/chunking-form/samples/preserve-modules-scriptified-assets/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'scriptified assets have extension in preserveModules output filename', options: { input: 'src/main.js', @@ -27,4 +27,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-single-entry/_config.js b/test/chunking-form/samples/preserve-modules-single-entry/_config.js index 05ac0170147..50a9248646a 100644 --- a/test/chunking-form/samples/preserve-modules-single-entry/_config.js +++ b/test/chunking-form/samples/preserve-modules-single-entry/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'single entry names file correctly', options: { input: 'main.js', output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-special-chunk-names/_config.js b/test/chunking-form/samples/preserve-modules-special-chunk-names/_config.js index 3d08854fc4a..ad7db05a1cc 100644 --- a/test/chunking-form/samples/preserve-modules-special-chunk-names/_config.js +++ b/test/chunking-form/samples/preserve-modules-special-chunk-names/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'Supports chunk names from config when preserving modules', options: { input: { 'main-entry': 'main.js' }, @@ -15,4 +15,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-virtual-modules-filename-pattern/_config.js b/test/chunking-form/samples/preserve-modules-virtual-modules-filename-pattern/_config.js index 304bdc11300..db8a4d84c4c 100644 --- a/test/chunking-form/samples/preserve-modules-virtual-modules-filename-pattern/_config.js +++ b/test/chunking-form/samples/preserve-modules-virtual-modules-filename-pattern/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Generates actual files whose filename adheres to entryFileNames for virtual modules when preserving modules', options: { @@ -31,4 +31,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules-virtual-modules/_config.js b/test/chunking-form/samples/preserve-modules-virtual-modules/_config.js index bd10fa0ad02..9902dbb0676 100644 --- a/test/chunking-form/samples/preserve-modules-virtual-modules/_config.js +++ b/test/chunking-form/samples/preserve-modules-virtual-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { input: 'main.js', @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/preserve-modules/_config.js b/test/chunking-form/samples/preserve-modules/_config.js index 54d9611466a..8a6d3fbedc1 100644 --- a/test/chunking-form/samples/preserve-modules/_config.js +++ b/test/chunking-form/samples/preserve-modules/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Rewrite modules in-place', options: { input: ['main1.js', 'main2.js'], output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/reexport-from-entry/_config.js b/test/chunking-form/samples/reexport-from-entry/_config.js index ad0d2c5dfd1..2cc27d25a84 100644 --- a/test/chunking-form/samples/reexport-from-entry/_config.js +++ b/test/chunking-form/samples/reexport-from-entry/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows reexporting from other entry points', options: { input: ['main', 'otherEntry'] } -}; +}); diff --git a/test/chunking-form/samples/reexport-shortpaths/_config.js b/test/chunking-form/samples/reexport-shortpaths/_config.js index 965cd2a2c6b..19d217176c3 100644 --- a/test/chunking-form/samples/reexport-shortpaths/_config.js +++ b/test/chunking-form/samples/reexport-shortpaths/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Tracing reexport shortpaths to entry points', options: { input: ['main1.js', 'main2.js', 'main3.js'] } -}; +}); diff --git a/test/chunking-form/samples/render-chunk-transform/_config.js b/test/chunking-form/samples/render-chunk-transform/_config.js index b623fa23427..c7d038e8a4b 100644 --- a/test/chunking-form/samples/render-chunk-transform/_config.js +++ b/test/chunking-form/samples/render-chunk-transform/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { replaceDirectoryInStringifiedObject } = require('../../../utils'); -module.exports = { +module.exports = defineRollupTest({ description: 'replaces hashes when mutating chunk info in renderChunk', options: { input: ['main1', 'main2'], @@ -73,4 +73,4 @@ module.exports = { chunkFileNames: 'chunk-[name]-[hash].js' } } -}; +}); diff --git a/test/chunking-form/samples/render-chunk/_config.js b/test/chunking-form/samples/render-chunk/_config.js index 8f9a8bc9b6e..6c8bbeee1a9 100644 --- a/test/chunking-form/samples/render-chunk/_config.js +++ b/test/chunking-form/samples/render-chunk/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { replaceDirectoryInStringifiedObject } = require('../../../utils'); -module.exports = { +module.exports = defineRollupTest({ description: 'transforms chunks in the renderChunk hook, also transforming hashes added in the hook', options: { @@ -30,4 +30,4 @@ module.exports = { assetFileNames: 'asset-[name]-[hash][extname]' } } -}; +}); diff --git a/test/chunking-form/samples/render-dynamic-import/_config.js b/test/chunking-form/samples/render-dynamic-import/_config.js index 2de4e2e67ab..986a61e63ba 100644 --- a/test/chunking-form/samples/render-dynamic-import/_config.js +++ b/test/chunking-form/samples/render-dynamic-import/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports custom rendering for dynamic imports', options: { plugins: { @@ -20,4 +20,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/resolve-dynamic-import/_config.js b/test/chunking-form/samples/resolve-dynamic-import/_config.js index 5dd6e8d73b7..aea65588da5 100644 --- a/test/chunking-form/samples/resolve-dynamic-import/_config.js +++ b/test/chunking-form/samples/resolve-dynamic-import/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const EXISTING = path.resolve(__dirname, 'existing.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'Supports all resolution formats for dynamic imports', options: { plugins: { @@ -88,4 +88,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/resolve-file-url/_config.js b/test/chunking-form/samples/resolve-file-url/_config.js index 7116c2b042d..82c294addf3 100644 --- a/test/chunking-form/samples/resolve-file-url/_config.js +++ b/test/chunking-form/samples/resolve-file-url/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to configure file urls', options: { output: { @@ -48,4 +48,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/sanitize-chunk-names/_config.js b/test/chunking-form/samples/sanitize-chunk-names/_config.js index a7be50fa92d..8283e5cd786 100644 --- a/test/chunking-form/samples/sanitize-chunk-names/_config.js +++ b/test/chunking-form/samples/sanitize-chunk-names/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'sanitizes chunk names from virtual entry points', options: { input: ['main1'], @@ -17,4 +17,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/sanitize-internal-exports/_config.js b/test/chunking-form/samples/sanitize-internal-exports/_config.js index b387cc182e6..c409d13f4db 100644 --- a/test/chunking-form/samples/sanitize-internal-exports/_config.js +++ b/test/chunking-form/samples/sanitize-internal-exports/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'make sure internal exports are sanitized', options: { input: ['main.js'] } -}; +}); diff --git a/test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_config.js index 48c8a85b3ff..2baf5d5450c 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids empty imports if they do not have side-effects when preserving modules (#3359)', options: { output: { preserveModules: true } } -}; +}); diff --git a/test/chunking-form/samples/side-effect-free-dependencies/avoid-side-effect-free-empty-imports/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/avoid-side-effect-free-empty-imports/_config.js index 78767a46819..b7e8ab412af 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/avoid-side-effect-free-empty-imports/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/avoid-side-effect-free-empty-imports/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids empty imports if they do not have side-effects', options: { input: ['main1', 'main2'], external: ['external-side-effect'] } -}; +}); diff --git a/test/chunking-form/samples/side-effect-free-dependencies/hoist-side-effect-modules/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/hoist-side-effect-modules/_config.js index 0e131b8996e..62488d720d7 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/hoist-side-effect-modules/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/hoist-side-effect-modules/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'hoist side-effect imports when avoiding empty imports', options: { input: ['main1', 'main2', 'main3'] }, expectedWarnings: ['CIRCULAR_DEPENDENCY'] -}; +}); diff --git a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-empty-imports/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-empty-imports/_config.js index 615562a76d9..5f84252baf7 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-empty-imports/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-empty-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids empty imports if moduleSideEffects are false', options: { input: ['main1', 'main2'], @@ -6,4 +6,4 @@ module.exports = { moduleSideEffects: false } } -}; +}); diff --git a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-1/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-1/_config.js index ba74be8e44a..a679fb83d37 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-1/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-1/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles re-exports in entry points if moduleSideEffects are false', options: { treeshake: { moduleSideEffects: false } } -}; +}); diff --git a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-2/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-2/_config.js index ba74be8e44a..a679fb83d37 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-2/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-2/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles re-exports in entry points if moduleSideEffects are false', options: { treeshake: { moduleSideEffects: false } } -}; +}); diff --git a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-3/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-3/_config.js index ba74be8e44a..a679fb83d37 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-3/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-3/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles re-exports in entry points if moduleSideEffects are false', options: { treeshake: { moduleSideEffects: false } } -}; +}); diff --git a/test/chunking-form/samples/single-file-manual-chunk/_config.js b/test/chunking-form/samples/single-file-manual-chunk/_config.js index 99a67c2a3e4..c166b0d842c 100644 --- a/test/chunking-form/samples/single-file-manual-chunk/_config.js +++ b/test/chunking-form/samples/single-file-manual-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'chunk aliasing with extensions', options: { output: { @@ -9,4 +9,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/chained-default-reexport/_config.js b/test/chunking-form/samples/synthetic-named-exports/chained-default-reexport/_config.js index 78f0aef3f81..f15f7b9cde7 100644 --- a/test/chunking-form/samples/synthetic-named-exports/chained-default-reexport/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/chained-default-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles synthetic named exports that are reexported as a default export over several stages', options: { @@ -9,4 +9,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/deduplicate-synthetic-named-exports-and-default/_config.js b/test/chunking-form/samples/synthetic-named-exports/deduplicate-synthetic-named-exports-and-default/_config.js index 9553f613606..804048efb41 100644 --- a/test/chunking-form/samples/synthetic-named-exports/deduplicate-synthetic-named-exports-and-default/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/deduplicate-synthetic-named-exports-and-default/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles importing a synthetic named export together with the default export', options: { input: ['main1', 'main2', 'main3'], @@ -14,4 +14,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/default-reexport/_config.js b/test/chunking-form/samples/synthetic-named-exports/default-reexport/_config.js index fec9cd1e44b..52482ee067c 100644 --- a/test/chunking-form/samples/synthetic-named-exports/default-reexport/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/default-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles synthetic named exports that are reexported as a default export where both the default and a named export is used', options: { @@ -9,4 +9,4 @@ module.exports = { } } } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/dynamic-import/_config.js b/test/chunking-form/samples/synthetic-named-exports/dynamic-import/_config.js index 9a5dad50910..4e81ee4d4ac 100644 --- a/test/chunking-form/samples/synthetic-named-exports/dynamic-import/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'synthetic named exports', options: { input: ['main.js'], @@ -12,4 +12,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/entry/_config.js b/test/chunking-form/samples/synthetic-named-exports/entry/_config.js index dc6f4350347..4c1fa87eaec 100644 --- a/test/chunking-form/samples/synthetic-named-exports/entry/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/entry/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not expose the synthetic namespace if an entry point uses a string value', options: { input: ['main', 'other'], @@ -10,4 +10,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/global-conflict/_config.js b/test/chunking-form/samples/synthetic-named-exports/global-conflict/_config.js index 5848d32b403..df0b7b540b5 100644 --- a/test/chunking-form/samples/synthetic-named-exports/global-conflict/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/global-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids conflicts with global variables when re-exporting synthetic named exports', options: { plugins: [ @@ -13,4 +13,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports-2/_config.js b/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports-2/_config.js index 9627155afc2..3fbe8f426fa 100644 --- a/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports-2/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports-2/_config.js @@ -1,9 +1,10 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'mixed synthetic named exports 2', options: { input: ['main.js', 'main2.js'], plugins: [ { + name: 'test-plugin', transform(code, id) { if (id.endsWith('dep1.js') || id.endsWith('dep2.js')) { return { @@ -16,4 +17,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports/_config.js b/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports/_config.js index b13731d1b7d..183d830d106 100644 --- a/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports/_config.js @@ -1,9 +1,10 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'mixed synthetic named exports', options: { input: ['main.js'], plugins: [ { + name: 'test-plugin', resolveId(id) { if (id.endsWith('dep1.js')) { return { @@ -11,9 +12,8 @@ module.exports = { syntheticNamedExports: true }; } - return null; } } ] } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/multi-level/_config.js b/test/chunking-form/samples/synthetic-named-exports/multi-level/_config.js index 428b9202e06..b6583198392 100644 --- a/test/chunking-form/samples/synthetic-named-exports/multi-level/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/multi-level/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles multiple levels of synthetic named exports', options: { input: ['main.js', 'main2.js', 'main3.js', 'main4.js', 'main5.js'], @@ -14,4 +14,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/synthetic-named-exports/namespace/_config.js b/test/chunking-form/samples/synthetic-named-exports/namespace/_config.js index cfc5383d876..9f63509ea65 100644 --- a/test/chunking-form/samples/synthetic-named-exports/namespace/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports re-exported synthetic exports in namespace objects', options: { plugins: [ @@ -15,4 +15,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/chunking-form/samples/system-exports-wrap-pure-annotation/_config.js b/test/chunking-form/samples/system-exports-wrap-pure-annotation/_config.js index 8e4f3669378..7954286990e 100644 --- a/test/chunking-form/samples/system-exports-wrap-pure-annotation/_config.js +++ b/test/chunking-form/samples/system-exports-wrap-pure-annotation/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'system exports should wrap pure annotations', options: { input: ['main1.js', 'main2.js'] } -}; +}); diff --git a/test/cli/samples/allow-output-prefix/_config.js b/test/cli/samples/allow-output-prefix/_config.js index db33b01555a..aeba98b0545 100644 --- a/test/cli/samples/allow-output-prefix/_config.js +++ b/test/cli/samples/allow-output-prefix/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows output options to be prefixed with "output."', command: 'rollup main.js --output.format es --output.footer "console.log(\'Rollup!\')"' -}; +}); diff --git a/test/cli/samples/amd/_config.js b/test/cli/samples/amd/_config.js index 3a6ddb0ff66..8417bfed016 100644 --- a/test/cli/samples/amd/_config.js +++ b/test/cli/samples/amd/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'sets AMD module ID and define function', command: 'rollup -i main.js -f amd --amd.id foo --amd.define defn' -}; +}); diff --git a/test/cli/samples/banner-intro-outro-footer/_config.js b/test/cli/samples/banner-intro-outro-footer/_config.js index 5c37680a1af..ce46e710499 100644 --- a/test/cli/samples/banner-intro-outro-footer/_config.js +++ b/test/cli/samples/banner-intro-outro-footer/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds banner/intro/outro/footer', command: 'rollup -i main.js -f iife --indent --banner "// banner" --intro "// intro" --outro "// outro" --footer "// footer"' -}; +}); diff --git a/test/cli/samples/code-splitting-named-default-inputs/_config.js b/test/cli/samples/code-splitting-named-default-inputs/_config.js index ce8a380dec3..e1e3a9421db 100644 --- a/test/cli/samples/code-splitting-named-default-inputs/_config.js +++ b/test/cli/samples/code-splitting-named-default-inputs/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows defining names via CLI', command: 'rollup entry1=main1.js "Entry 2"="main 2.js" "main3.js" --entryFileNames [name]-[hash].js -f es', @@ -18,4 +18,4 @@ module.exports = { "console.log('main3');\n" ); } -}; +}); diff --git a/test/cli/samples/code-splitting-named-inputs/_config.js b/test/cli/samples/code-splitting-named-inputs/_config.js index a381d39986b..2ea23242d18 100644 --- a/test/cli/samples/code-splitting-named-inputs/_config.js +++ b/test/cli/samples/code-splitting-named-inputs/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows defining names via CLI', command: 'rollup --entryFileNames [name]-[hash].js --input entry1=main1.js -i "Entry 2"="main 2.js" -i "main3.js" -f es', @@ -18,4 +18,4 @@ module.exports = { "console.log('main3');\n" ); } -}; +}); diff --git a/test/cli/samples/config-async-function/_config.js b/test/cli/samples/config-async-function/_config.js index 2f42324610a..e8d0389afc1 100644 --- a/test/cli/samples/config-async-function/_config.js +++ b/test/cli/samples/config-async-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports using an async function as config', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/config-cjs-dirname/_config.js b/test/cli/samples/config-cjs-dirname/_config.js index 7b8f251fc3e..cf46da4aace 100644 --- a/test/cli/samples/config-cjs-dirname/_config.js +++ b/test/cli/samples/config-cjs-dirname/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not transpile cjs configs and provides correct __filename', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/config-cwd-case-insensitive-es6/_config.js b/test/cli/samples/config-cwd-case-insensitive-es6/_config.js index 0e5ec766147..5414ef9c8a4 100644 --- a/test/cli/samples/config-cwd-case-insensitive-es6/_config.js +++ b/test/cli/samples/config-cwd-case-insensitive-es6/_config.js @@ -2,10 +2,10 @@ function toggleCase(s) { return s == s.toLowerCase() ? s.toUpperCase() : s.toLowerCase(); } -module.exports = { +module.exports = defineRollupTest({ onlyWindows: true, description: "can load ES6 config with cwd that doesn't match realpath", command: 'rollup -c', cwd: __dirname.replace(/^[a-z]:\\/i, toggleCase), execute: true -}; +}); diff --git a/test/cli/samples/config-cwd-case-insensitive/_config.js b/test/cli/samples/config-cwd-case-insensitive/_config.js index 93daf102b21..7c274cb6120 100644 --- a/test/cli/samples/config-cwd-case-insensitive/_config.js +++ b/test/cli/samples/config-cwd-case-insensitive/_config.js @@ -2,10 +2,10 @@ function toggleCase(s) { return s == s.toLowerCase() ? s.toUpperCase() : s.toLowerCase(); } -module.exports = { +module.exports = defineRollupTest({ onlyWindows: true, description: "can load config with cwd that doesn't match realpath", command: 'rollup -c', cwd: __dirname.replace(/^[a-z]:\\/i, toggleCase), execute: true -}; +}); diff --git a/test/cli/samples/config-defineConfig-cjs/_config.js b/test/cli/samples/config-defineConfig-cjs/_config.js index 48bf7c3a5ff..5a98174efd1 100644 --- a/test/cli/samples/config-defineConfig-cjs/_config.js +++ b/test/cli/samples/config-defineConfig-cjs/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses cjs config file which return config wrapped by defineConfig', command: 'rollup --config rollup.config.js', execute: true -}; +}); diff --git a/test/cli/samples/config-defineConfig-mjs/_config.js b/test/cli/samples/config-defineConfig-mjs/_config.js index 5a33e72eea3..72ce93af594 100644 --- a/test/cli/samples/config-defineConfig-mjs/_config.js +++ b/test/cli/samples/config-defineConfig-mjs/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses mjs config file which return config wrapped by defineConfig', command: 'rollup --config rollup.config.mjs', execute: true -}; +}); diff --git a/test/cli/samples/config-env-multiple/_config.js b/test/cli/samples/config-env-multiple/_config.js index c2d2b539981..0cf82fb60e2 100644 --- a/test/cli/samples/config-env-multiple/_config.js +++ b/test/cli/samples/config-env-multiple/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'passes environment variables to config file via multiple --environment values', command: 'rollup --config --environment PRODUCTION,FOO:bar --environment SECOND,KEY:value --environment FOO:foo', execute: true -}; +}); diff --git a/test/cli/samples/config-env/_config.js b/test/cli/samples/config-env/_config.js index 3036cc208f5..7f98b9c48bb 100644 --- a/test/cli/samples/config-env/_config.js +++ b/test/cli/samples/config-env/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'passes environment variables to config file', command: 'rollup --config --environment PRODUCTION,FOO:bar,HOST:http://localhost:4000', execute: true -}; +}); diff --git a/test/cli/samples/config-es6/_config.js b/test/cli/samples/config-es6/_config.js index 1ed454a1ad9..e7355e85f72 100644 --- a/test/cli/samples/config-es6/_config.js +++ b/test/cli/samples/config-es6/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses ES6 module config file', command: 'rollup --config rollup.config.js --bundleConfigAsCjs', execute: true -}; +}); diff --git a/test/cli/samples/config-external-function/_config.js b/test/cli/samples/config-external-function/_config.js index 9f21d968ead..226010ff1f6 100644 --- a/test/cli/samples/config-external-function/_config.js +++ b/test/cli/samples/config-external-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external option gets passed from config', command: 'rollup -c -e assert,external-module' -}; +}); diff --git a/test/cli/samples/config-external/_config.js b/test/cli/samples/config-external/_config.js index 59df4b7dbd7..4bcebf9e128 100644 --- a/test/cli/samples/config-external/_config.js +++ b/test/cli/samples/config-external/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external option gets passed from config', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/config-function-modify-command/_config.js b/test/cli/samples/config-function-modify-command/_config.js index e80816ba3cb..d167bea8f74 100644 --- a/test/cli/samples/config-function-modify-command/_config.js +++ b/test/cli/samples/config-function-modify-command/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows cleaning up and modifying the command args in the config file', command: 'rollup --config rollup.config.mjs --some-option="foo" --another-option=42', execute: true -}; +}); diff --git a/test/cli/samples/config-function/_config.js b/test/cli/samples/config-function/_config.js index ad5009c9802..ebe21af4eca 100644 --- a/test/cli/samples/config-function/_config.js +++ b/test/cli/samples/config-function/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'if the config file returns a function then this will be called with the command args', command: 'rollup --config rollup.config.mjs --silent', execute: true -}; +}); diff --git a/test/cli/samples/config-import-meta/_config.js b/test/cli/samples/config-import-meta/_config.js index 50b766ab53e..cf5aebff998 100644 --- a/test/cli/samples/config-import-meta/_config.js +++ b/test/cli/samples/config-import-meta/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct import.meta.url in config files', command: 'rollup -c --bundleConfigAsCjs' -}; +}); diff --git a/test/cli/samples/config-json/_config.js b/test/cli/samples/config-json/_config.js index 0c6fb91feae..ae022a99da0 100644 --- a/test/cli/samples/config-json/_config.js +++ b/test/cli/samples/config-json/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows config file to import json', command: 'rollup --config rollup.config.js --bundleConfigAsCjs', execute: true -}; +}); diff --git a/test/cli/samples/config-missing-export/_config.js b/test/cli/samples/config-missing-export/_config.js index bdc1e039344..6cc0b5c92ba 100644 --- a/test/cli/samples/config-missing-export/_config.js +++ b/test/cli/samples/config-missing-export/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws error if config does not export an object', command: 'rollup -c', error(error) { assert.ok(/Config file must export an options object/.test(error.message)); } -}; +}); diff --git a/test/cli/samples/config-mjs-plugins/_config.js b/test/cli/samples/config-mjs-plugins/_config.js index a6f62f01ce3..e7249b4b3a9 100644 --- a/test/cli/samples/config-mjs-plugins/_config.js +++ b/test/cli/samples/config-mjs-plugins/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports native esm as well as CJS plugins when using .mjs in Node 13+', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/config-mjs/_config.js b/test/cli/samples/config-mjs/_config.js index bd9fe8544ed..a07be4ab42d 100644 --- a/test/cli/samples/config-mjs/_config.js +++ b/test/cli/samples/config-mjs/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses config file (.mjs)', command: 'rollup --config rollup.config.mjs', execute: true -}; +}); diff --git a/test/cli/samples/config-multiple-getfilename/_config.js b/test/cli/samples/config-multiple-getfilename/_config.js index 842113b93e1..fc724f86f46 100644 --- a/test/cli/samples/config-multiple-getfilename/_config.js +++ b/test/cli/samples/config-multiple-getfilename/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'returns correct file names for multiple outputs (#3467)', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/config-multiple-source-maps/_config.js b/test/cli/samples/config-multiple-source-maps/_config.js index 1de74ea00b9..72b2c2ba846 100644 --- a/test/cli/samples/config-multiple-source-maps/_config.js +++ b/test/cli/samples/config-multiple-source-maps/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly generates sourcemaps for multiple outputs', command: 'rollup -c --bundleConfigAsCjs' -}; +}); diff --git a/test/cli/samples/config-no-output/_config.js b/test/cli/samples/config-no-output/_config.js index e65b6155526..f278f1aacad 100644 --- a/test/cli/samples/config-no-output/_config.js +++ b/test/cli/samples/config-no-output/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { readFileSync, unlinkSync } = require('node:fs'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses -o from CLI', command: 'rollup -c -o output.js', test() { @@ -9,4 +9,4 @@ module.exports = { assert.equal(output.trim(), 'console.log(42);'); unlinkSync('output.js'); } -}; +}); diff --git a/test/cli/samples/config-override/_config.js b/test/cli/samples/config-override/_config.js index 49fc4811440..c30e54a5d4e 100644 --- a/test/cli/samples/config-override/_config.js +++ b/test/cli/samples/config-override/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'overrides config file with command line arguments', command: 'rollup -c -i main.js -f cjs', execute: true -}; +}); diff --git a/test/cli/samples/config-plugin-entry/_config.js b/test/cli/samples/config-plugin-entry/_config.js index 3f8b027cede..f7356abddb4 100644 --- a/test/cli/samples/config-plugin-entry/_config.js +++ b/test/cli/samples/config-plugin-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows plugins to set options.entry', command: 'rollup -c --bundleConfigAsCjs' -}; +}); diff --git a/test/cli/samples/config-promise-cjs/_config.js b/test/cli/samples/config-promise-cjs/_config.js index 75219d417ed..af8a4e904af 100644 --- a/test/cli/samples/config-promise-cjs/_config.js +++ b/test/cli/samples/config-promise-cjs/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses cjs config file which returns a Promise', command: 'rollup --config rollup.config.cjs', execute: true -}; +}); diff --git a/test/cli/samples/config-promise-mjs/_config.js b/test/cli/samples/config-promise-mjs/_config.js index d605500053e..73c4397dcfd 100644 --- a/test/cli/samples/config-promise-mjs/_config.js +++ b/test/cli/samples/config-promise-mjs/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses mjs config file which returns a Promise', command: 'rollup --config rollup.config.mjs', execute: true -}; +}); diff --git a/test/cli/samples/config-promise/_config.js b/test/cli/samples/config-promise/_config.js index 848c006f2f7..08a5a5b48b0 100644 --- a/test/cli/samples/config-promise/_config.js +++ b/test/cli/samples/config-promise/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses config file which returns a Promise', command: 'rollup --config rollup.config.mjs', execute: true -}; +}); diff --git a/test/cli/samples/config-true/_config.js b/test/cli/samples/config-true/_config.js index ca48ad0c303..194c136c10b 100644 --- a/test/cli/samples/config-true/_config.js +++ b/test/cli/samples/config-true/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'defaults to rollup.config.js', command: 'rollup -c --bundleConfigAsCjs', execute: true -}; +}); diff --git a/test/cli/samples/config-ts/_config.js b/test/cli/samples/config-ts/_config.js index b4e2435de4a..7d8c28a0106 100644 --- a/test/cli/samples/config-ts/_config.js +++ b/test/cli/samples/config-ts/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports loading TypeScript config files via plugin option', command: 'rollup --config rollup.config.ts --configPlugin typescript', execute: true -}; +}); diff --git a/test/cli/samples/config-type-module/_config.js b/test/cli/samples/config-type-module/_config.js index 362bbf54e45..1e9681874e1 100644 --- a/test/cli/samples/config-type-module/_config.js +++ b/test/cli/samples/config-type-module/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'tries to load .js config file if package type is "module"', command: 'cd sub && rollup -c rollup.config.js', error: () => true, @@ -15,4 +15,4 @@ module.exports = { 'contains "type": "module". To treat it as a CommonJS script, rename it to use the \'.cjs\' file extension.' ); } -}; +}); diff --git a/test/cli/samples/config-warnings/_config.js b/test/cli/samples/config-warnings/_config.js index f807bb3c129..e88f2be60ab 100644 --- a/test/cli/samples/config-warnings/_config.js +++ b/test/cli/samples/config-warnings/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'displays warnings when a config is loaded', command: 'rollup -c --bundleConfigAsCjs', stderr: stderr => @@ -8,4 +8,4 @@ module.exports = { stderr, 'loaded rollup.config.js with warnings\n(!) Use of eval is strongly discouraged' ) -}; +}); diff --git a/test/cli/samples/config/_config.js b/test/cli/samples/config/_config.js index 4dff8e5be22..7ad42c80c53 100644 --- a/test/cli/samples/config/_config.js +++ b/test/cli/samples/config/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses config file', command: 'rollup --config rollup.config.js', execute: true -}; +}); diff --git a/test/cli/samples/context/_config.js b/test/cli/samples/context/_config.js index 9f2d46d6667..232185a606e 100644 --- a/test/cli/samples/context/_config.js +++ b/test/cli/samples/context/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Uses --context to set `this` value', command: 'rollup main.js --format commonjs --context window' -}; +}); diff --git a/test/cli/samples/custom-frame-with-pos/_config.js b/test/cli/samples/custom-frame-with-pos/_config.js index 2af0a903e4d..fc1518f557c 100644 --- a/test/cli/samples/custom-frame-with-pos/_config.js +++ b/test/cli/samples/custom-frame-with-pos/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'custom (plugin generated) code frame taking priority over pos generated one', command: 'rollup -c', error: () => true, @@ -9,4 +9,4 @@ module.exports = { stderr, '[!] (plugin at position 1) Error: My error.\n' + 'main.js (1:5)\n' + 'custom code frame\n' ) -}; +}); diff --git a/test/cli/samples/custom-frame/_config.js b/test/cli/samples/custom-frame/_config.js index bd3f7c35c69..887606facec 100644 --- a/test/cli/samples/custom-frame/_config.js +++ b/test/cli/samples/custom-frame/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'errors with plugin generated code frames also contain stack', command: 'rollup -c', error: () => true, @@ -13,4 +13,4 @@ module.exports = { ); assertIncludes(stderr, 'rollup.config.js:9:19'); } -}; +}); diff --git a/test/cli/samples/deconflict-entry-point-in-subdir/_config.js b/test/cli/samples/deconflict-entry-point-in-subdir/_config.js index e45bfaeb3b0..5b2652a1a4b 100644 --- a/test/cli/samples/deconflict-entry-point-in-subdir/_config.js +++ b/test/cli/samples/deconflict-entry-point-in-subdir/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflict entry points with the same name in different directories', command: 'rollup --input main.js --input sub/main.js --format es --dir _actual' -}; +}); diff --git a/test/cli/samples/duplicate-import-options/_config.js b/test/cli/samples/duplicate-import-options/_config.js index 14ff13ae654..6814bba2d15 100644 --- a/test/cli/samples/duplicate-import-options/_config.js +++ b/test/cli/samples/duplicate-import-options/_config.js @@ -1,10 +1,10 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws if different types of entries are combined', command: 'rollup main.js --format es --input main.js', error: () => true, stderr(stderr) { assertIncludes(stderr, '[!] Either use --input, or pass input path as argument'); } -}; +}); diff --git a/test/cli/samples/emit-file-multiple-dirs/_config.js b/test/cli/samples/emit-file-multiple-dirs/_config.js index 34c81bf123b..d5f4f63f9fb 100644 --- a/test/cli/samples/emit-file-multiple-dirs/_config.js +++ b/test/cli/samples/emit-file-multiple-dirs/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'writes files emitted by plugins in different output dirs', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/empty-chunk-multiple/_config.js b/test/cli/samples/empty-chunk-multiple/_config.js index 5b343d1f0c9..1863196f92c 100644 --- a/test/cli/samples/empty-chunk-multiple/_config.js +++ b/test/cli/samples/empty-chunk-multiple/_config.js @@ -1,8 +1,8 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'shows warning when multiple chunks empty', command: 'rollup -c', error: () => true, stderr: stderr => assertIncludes(stderr, '(!) Generated empty chunks\n"a" and "b"') -}; +}); diff --git a/test/cli/samples/empty-chunk/_config.js b/test/cli/samples/empty-chunk/_config.js index 88e55b8b0c0..5220c40467f 100644 --- a/test/cli/samples/empty-chunk/_config.js +++ b/test/cli/samples/empty-chunk/_config.js @@ -1,8 +1,8 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'shows warning when chunk empty', command: 'rollup -c', error: () => true, stderr: stderr => assertIncludes(stderr, '(!) Generated an empty chunk\n"main"') -}; +}); diff --git a/test/cli/samples/external-modules-auto-global/_config.js b/test/cli/samples/external-modules-auto-global/_config.js index 5f21ae87f33..7aa41a0d0dd 100644 --- a/test/cli/samples/external-modules-auto-global/_config.js +++ b/test/cli/samples/external-modules-auto-global/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'populates options.external with --global keys', command: 'rollup main.js --format iife --globals mathematics:Math,promises:Promise --external promises', @@ -8,4 +8,4 @@ module.exports = { stderr(stderr) { assert.ok(!stderr.includes('(!)')); } -}; +}); diff --git a/test/cli/samples/external-modules/_config.js b/test/cli/samples/external-modules/_config.js index cf38798421d..9b03c93528a 100644 --- a/test/cli/samples/external-modules/_config.js +++ b/test/cli/samples/external-modules/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows external modules to be specified with --external=foo,bar,baz', command: 'rollup main.js --format cjs --external=path,util', execute: true, stderr(stderr) { assert.ok(!stderr.includes('(!)')); } -}; +}); diff --git a/test/cli/samples/fail-after-warnings/_config.js b/test/cli/samples/fail-after-warnings/_config.js index a525e9eb155..bec5070e370 100644 --- a/test/cli/samples/fail-after-warnings/_config.js +++ b/test/cli/samples/fail-after-warnings/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'errors on warnings with --failAfterWarnings', command: 'rollup -i main.js --failAfterWarnings', error: () => true, @@ -8,4 +8,4 @@ module.exports = { assertIncludes(stderr, '[!] Warnings occurred and --failAfterWarnings flag present'); return true; } -}; +}); diff --git a/test/cli/samples/format-aliases/_config.js b/test/cli/samples/format-aliases/_config.js index f9f9d685f72..2dc28220619 100644 --- a/test/cli/samples/format-aliases/_config.js +++ b/test/cli/samples/format-aliases/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports format aliases', command: 'rollup --config' -}; +}); diff --git a/test/cli/samples/generated-code-preset-override/_config.js b/test/cli/samples/generated-code-preset-override/_config.js index e4a45bceb0b..cdcd9c5bd14 100644 --- a/test/cli/samples/generated-code-preset-override/_config.js +++ b/test/cli/samples/generated-code-preset-override/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'overrides the generatedCode option when using presets', command: 'rollup --config --generatedCode es5 --generatedCode.arrowFunctions' -}; +}); diff --git a/test/cli/samples/generated-code-unknown-preset/_config.js b/test/cli/samples/generated-code-unknown-preset/_config.js index 1a226f9a2b9..4b5dba0e6c3 100644 --- a/test/cli/samples/generated-code-unknown-preset/_config.js +++ b/test/cli/samples/generated-code-unknown-preset/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'overrides the generatedCode option when using presets', command: 'rollup main.js --format es --generatedCode unknown', error: () => true, @@ -11,4 +11,4 @@ module.exports = { 'https://rollupjs.org/configuration-options/#output-generatedcode' ); } -}; +}); diff --git a/test/cli/samples/import-esm-package/_config.js b/test/cli/samples/import-esm-package/_config.js index 23d127d1d67..1fa22b206b6 100644 --- a/test/cli/samples/import-esm-package/_config.js +++ b/test/cli/samples/import-esm-package/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to import ESM dependencies from transpiled config files', skipIfWindows: true, command: "rollup --config --configPlugin '{transform:c => c}'" -}; +}); diff --git a/test/cli/samples/indent-none/_config.js b/test/cli/samples/indent-none/_config.js index e37aead6bc1..f13384ef19b 100644 --- a/test/cli/samples/indent-none/_config.js +++ b/test/cli/samples/indent-none/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'disables indentation with --no-indent', command: 'rollup main.js --format umd --no-indent' -}; +}); diff --git a/test/cli/samples/interop/_config.js b/test/cli/samples/interop/_config.js index fc70bd51768..a63fda0fb2c 100644 --- a/test/cli/samples/interop/_config.js +++ b/test/cli/samples/interop/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not include the interop block', command: 'rollup -i main.js -f cjs --external test --interop default' -}; +}); diff --git a/test/cli/samples/log-side-effects/_config.js b/test/cli/samples/log-side-effects/_config.js index 766f465e99c..d312c4ea748 100644 --- a/test/cli/samples/log-side-effects/_config.js +++ b/test/cli/samples/log-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'logs side effects', command: 'rollup --config' -}; +}); diff --git a/test/cli/samples/merge-deprecations/_config.js b/test/cli/samples/merge-deprecations/_config.js index 6d0000bd4f5..167f1573200 100644 --- a/test/cli/samples/merge-deprecations/_config.js +++ b/test/cli/samples/merge-deprecations/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges deprecated with current options', command: 'rollup --config rollup.config.js' -}; +}); diff --git a/test/cli/samples/merge-treeshake-false/_config.js b/test/cli/samples/merge-treeshake-false/_config.js index 5ae50196368..ae63dbecb97 100644 --- a/test/cli/samples/merge-treeshake-false/_config.js +++ b/test/cli/samples/merge-treeshake-false/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'sets all tree-shaking to false if one option disables it', command: 'rollup main.js --format es --external external --treeshake.moduleSideEffects no-external --no-treeshake --no-treeshake.unknownGlobalSideEffects' -}; +}); diff --git a/test/cli/samples/merge-treeshake/_config.js b/test/cli/samples/merge-treeshake/_config.js index ace0199f7d2..500a822432d 100644 --- a/test/cli/samples/merge-treeshake/_config.js +++ b/test/cli/samples/merge-treeshake/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges treeshake options', command: 'rollup main.js --format es --external external --treeshake.moduleSideEffects no-external --treeshake --no-treeshake.unknownGlobalSideEffects' -}; +}); diff --git a/test/cli/samples/module-name/_config.js b/test/cli/samples/module-name/_config.js index 8b5f7e892ff..30f5ff5b252 100644 --- a/test/cli/samples/module-name/_config.js +++ b/test/cli/samples/module-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'generates UMD export with correct name', command: 'rollup main.js --format umd --name myBundle --indent' -}; +}); diff --git a/test/cli/samples/multiple-configs/_config.js b/test/cli/samples/multiple-configs/_config.js index d660cdb064b..ea0274fa471 100644 --- a/test/cli/samples/multiple-configs/_config.js +++ b/test/cli/samples/multiple-configs/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'generates output file when multiple configurations are specified and one build fails', command: 'rollup -c', @@ -8,4 +8,4 @@ module.exports = { assert.ok(/Unexpected Exception/.test(error.message)); return true; } -}; +}); diff --git a/test/cli/samples/multiple-targets-different-plugins/_config.js b/test/cli/samples/multiple-targets-different-plugins/_config.js index e9ded7da1c6..2fd8cf5b839 100644 --- a/test/cli/samples/multiple-targets-different-plugins/_config.js +++ b/test/cli/samples/multiple-targets-different-plugins/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'generates multiple output files, only one of which is minified', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/multiple-targets-shared-config/_config.js b/test/cli/samples/multiple-targets-shared-config/_config.js index 6d7125c8d54..c9ae22ba67f 100644 --- a/test/cli/samples/multiple-targets-shared-config/_config.js +++ b/test/cli/samples/multiple-targets-shared-config/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses shared config for each target', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/multiple-targets/_config.js b/test/cli/samples/multiple-targets/_config.js index 73d5d28f379..64dc50541d6 100644 --- a/test/cli/samples/multiple-targets/_config.js +++ b/test/cli/samples/multiple-targets/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'generates multiple output files when multiple targets are specified', command: 'rollup -c' -}; +}); diff --git a/test/cli/samples/no-color/_config.js b/test/cli/samples/no-color/_config.js index fc0f082b433..39afeabc663 100644 --- a/test/cli/samples/no-color/_config.js +++ b/test/cli/samples/no-color/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'respects the NO_COLOR environment variable', command: 'rollup -i main1.js -i main2.js -f es', env: { FORCE_COLOR: undefined, NO_COLOR: true }, @@ -15,4 +15,4 @@ module.exports = { "console.log('main2');\n" ); } -}; +}); diff --git a/test/cli/samples/no-conflict/_config.js b/test/cli/samples/no-conflict/_config.js index cc870f8a263..8afdd40dc89 100644 --- a/test/cli/samples/no-conflict/_config.js +++ b/test/cli/samples/no-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects noConflict option', command: 'rollup --config rollup.config.js' -}; +}); diff --git a/test/cli/samples/no-strict/_config.js b/test/cli/samples/no-strict/_config.js index 72d4a3242ee..5eabf69084b 100644 --- a/test/cli/samples/no-strict/_config.js +++ b/test/cli/samples/no-strict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'use no strict option', command: 'rollup -i main.js -f iife --no-strict --indent' -}; +}); diff --git a/test/cli/samples/no-treeshake/_config.js b/test/cli/samples/no-treeshake/_config.js index 9cd57bca6ff..bdb0e927ded 100644 --- a/test/cli/samples/no-treeshake/_config.js +++ b/test/cli/samples/no-treeshake/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'generates IIFE export with all code and overrides config', command: 'rollup -c --no-treeshake' -}; +}); diff --git a/test/cli/samples/node-config-auto-prefix/_config.js b/test/cli/samples/node-config-auto-prefix/_config.js index 084ade901da..39f707815b6 100644 --- a/test/cli/samples/node-config-auto-prefix/_config.js +++ b/test/cli/samples/node-config-auto-prefix/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses config file installed from npm, automatically adding a rollup-config- prefix', command: 'rollup --config node:foo', execute: true -}; +}); diff --git a/test/cli/samples/node-config-not-found/_config.js b/test/cli/samples/node-config-not-found/_config.js index f4ad14d9ed4..75a50f6bb67 100644 --- a/test/cli/samples/node-config-not-found/_config.js +++ b/test/cli/samples/node-config-not-found/_config.js @@ -1,10 +1,10 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws if a config in node_modules cannot be found', command: 'rollup --config node:baz', error: () => true, stderr(stderr) { assertIncludes(stderr, '[!] Could not resolve config file "node:baz"'); } -}; +}); diff --git a/test/cli/samples/node-config/_config.js b/test/cli/samples/node-config/_config.js index fdd13b0cc98..72f70540846 100644 --- a/test/cli/samples/node-config/_config.js +++ b/test/cli/samples/node-config/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses config file installed from npm', command: 'rollup --config node:bar', cwd: __dirname, execute: true -}; +}); diff --git a/test/cli/samples/paths-output-option/_config.js b/test/cli/samples/paths-output-option/_config.js index e0c7edd32a1..7c43df391d3 100644 --- a/test/cli/samples/paths-output-option/_config.js +++ b/test/cli/samples/paths-output-option/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows paths to be set as an output option', command: 'rollup --config rollup.config.js' -}; +}); diff --git a/test/cli/samples/plugin/absolute-esm/_config.js b/test/cli/samples/plugin/absolute-esm/_config.js index c72ec2c2329..37141c0536e 100644 --- a/test/cli/samples/plugin/absolute-esm/_config.js +++ b/test/cli/samples/plugin/absolute-esm/_config.js @@ -1,6 +1,6 @@ const { sep } = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'ESM CLI --plugin /absolute/path', command: `rollup main.js -p "${__dirname}${sep}my-esm-plugin.mjs={comment: 'Absolute ESM'}"` -}; +}); diff --git a/test/cli/samples/plugin/absolute/_config.js b/test/cli/samples/plugin/absolute/_config.js index 0884fd686c2..17e62026b24 100644 --- a/test/cli/samples/plugin/absolute/_config.js +++ b/test/cli/samples/plugin/absolute/_config.js @@ -1,6 +1,6 @@ const { sep } = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'CLI --plugin /absolute/path', command: `rollup main.js -p "${__dirname}${sep}my-plugin.js={VALUE: 'absolute', ZZZ: 1}"` -}; +}); diff --git a/test/cli/samples/plugin/advanced-esm/_config.js b/test/cli/samples/plugin/advanced-esm/_config.js index ee7545ea184..e01a4c16d2b 100644 --- a/test/cli/samples/plugin/advanced-esm/_config.js +++ b/test/cli/samples/plugin/advanced-esm/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'load an ESM-only rollup plugin from node_modules as well as CJS plugins', skipIfWindows: true, @@ -6,4 +6,4 @@ module.exports = { // Must copy the ESM plugin into the main node_modules in order to use and test it. command: `rm -rf ../../../../../node_modules/rollup-plugin-esm-test && cp -rp ../../../node_modules_rename_me/rollup-plugin-esm-test ../../../../../node_modules/ && rollup -c -p node-resolve,commonjs,esm-test -p "terser={mangle: false, output: {beautify: true, indent_level: 2}}"` -}; +}); diff --git a/test/cli/samples/plugin/advanced/_config.js b/test/cli/samples/plugin/advanced/_config.js index fa474579270..d9414aaae75 100644 --- a/test/cli/samples/plugin/advanced/_config.js +++ b/test/cli/samples/plugin/advanced/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'advanced CLI --plugin functionality with rollup config', command: `rollup -c -p node-resolve,commonjs -p "terser={output: {beautify: true, indent_level: 2}}"` -}; +}); diff --git a/test/cli/samples/plugin/basic/_config.js b/test/cli/samples/plugin/basic/_config.js index 4914b4a27a0..0000f9c15be 100644 --- a/test/cli/samples/plugin/basic/_config.js +++ b/test/cli/samples/plugin/basic/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'basic CLI --plugin functionality', command: `rollup main.js -f cjs --plugin @rollup/plugin-buble` -}; +}); diff --git a/test/cli/samples/plugin/cannot-load/_config.js b/test/cli/samples/plugin/cannot-load/_config.js index 041aec47c0b..9f85d1de527 100644 --- a/test/cli/samples/plugin/cannot-load/_config.js +++ b/test/cli/samples/plugin/cannot-load/_config.js @@ -1,10 +1,10 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'unknown CLI --plugin results in an error', skipIfWindows: true, command: `echo "console.log(123);" | rollup --plugin foobar`, error(error) { assertIncludes(error.message, '[!] Error: Cannot load plugin "foobar"'); } -}; +}); diff --git a/test/cli/samples/plugin/default-export/_config.js b/test/cli/samples/plugin/default-export/_config.js index 2a74334e40b..d3078d5e22b 100644 --- a/test/cli/samples/plugin/default-export/_config.js +++ b/test/cli/samples/plugin/default-export/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'CLI --plugin with default export', skipIfWindows: true, command: `echo 'console.log(VALUE);' | rollup -p "./my-plugin={VALUE: 'default', ZZZ: 1}"` -}; +}); diff --git a/test/cli/samples/plugin/export-not-found/_config.js b/test/cli/samples/plugin/export-not-found/_config.js index 54497d00bfb..8dfa0ec70af 100644 --- a/test/cli/samples/plugin/export-not-found/_config.js +++ b/test/cli/samples/plugin/export-not-found/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'Throws when the plugin export cannot be found', skipIfWindows: true, command: `echo 'console.log("ignored");' | rollup -p "./my-missing-plugin"`, @@ -14,4 +14,4 @@ module.exports = { )}". The plugin needs to export a function either as "default" or "myMissingPlugin" for Rollup to recognize it.` ); } -}; +}); diff --git a/test/cli/samples/plugin/invalid-argument/_config.js b/test/cli/samples/plugin/invalid-argument/_config.js index 438ffb0ee70..7ef2b12004f 100644 --- a/test/cli/samples/plugin/invalid-argument/_config.js +++ b/test/cli/samples/plugin/invalid-argument/_config.js @@ -1,10 +1,10 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'invalid CLI --plugin argument format', skipIfWindows: true, command: `echo "console.log(123);" | rollup --plugin 'foo bar'`, error(error) { assertIncludes(error.message, '[!] Error: Invalid --plugin argument format: "foo bar"'); } -}; +}); diff --git a/test/cli/samples/plugin/object/_config.js b/test/cli/samples/plugin/object/_config.js index f102a47afeb..a46d76b3b39 100644 --- a/test/cli/samples/plugin/object/_config.js +++ b/test/cli/samples/plugin/object/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'CLI --plugin object', skipIfWindows: true, command: `echo 'console.log(42);' | rollup -f cjs -p '{transform: c => c + String.fromCharCode(10) + c}'` -}; +}); diff --git a/test/cli/samples/plugin/relative-camelized/_config.js b/test/cli/samples/plugin/relative-camelized/_config.js index 6ee87968574..28047b247c6 100644 --- a/test/cli/samples/plugin/relative-camelized/_config.js +++ b/test/cli/samples/plugin/relative-camelized/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles plugins where the export name is the camelized file name', skipIfWindows: true, command: @@ -7,4 +7,4 @@ module.exports = { '-p "./plugins/rollup-plugin-my-super-plugin2.js" ' + '-p "./plugins/rollup-plugin-" ' + '-p "./plugins/@rollup/plugin-supreme"' -}; +}); diff --git a/test/cli/samples/plugin/relative-esm/_config.js b/test/cli/samples/plugin/relative-esm/_config.js index 3792a107f3e..c4bc44cc88e 100644 --- a/test/cli/samples/plugin/relative-esm/_config.js +++ b/test/cli/samples/plugin/relative-esm/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'ESM CLI --plugin ../relative/path', skipIfWindows: true, command: `echo 'console.log(1 ? 2 : 3);' | rollup -p "../absolute-esm/my-esm-plugin.mjs={comment: 'Relative ESM'}"` -}; +}); diff --git a/test/cli/samples/plugin/relative/_config.js b/test/cli/samples/plugin/relative/_config.js index 177951ac68e..ccc3dfd5bdb 100644 --- a/test/cli/samples/plugin/relative/_config.js +++ b/test/cli/samples/plugin/relative/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'CLI --plugin ../relative/path', skipIfWindows: true, command: `echo 'console.log(VALUE);' | rollup -p "../absolute/my-plugin={VALUE: 'relative', ZZZ: 1}"` -}; +}); diff --git a/test/cli/samples/property-read-side-effects/_config.js b/test/cli/samples/property-read-side-effects/_config.js index 9cb2ce5fd62..0be8c64d676 100644 --- a/test/cli/samples/property-read-side-effects/_config.js +++ b/test/cli/samples/property-read-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows disabling side-effects when accessing properties', command: 'rollup main.js --format es --no-treeshake.propertyReadSideEffects' -}; +}); diff --git a/test/cli/samples/propertyReadSideEffects-always/_config.js b/test/cli/samples/propertyReadSideEffects-always/_config.js index 1c76838ca53..8b9442a0d5c 100644 --- a/test/cli/samples/propertyReadSideEffects-always/_config.js +++ b/test/cli/samples/propertyReadSideEffects-always/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'verify property accesses are retained for getters with side effects', command: `rollup main.js --validate --treeshake.propertyReadSideEffects=always` -}; +}); diff --git a/test/cli/samples/silent-onwarn/_config.js b/test/cli/samples/silent-onwarn/_config.js index c13449930cf..d31fa5e613f 100644 --- a/test/cli/samples/silent-onwarn/_config.js +++ b/test/cli/samples/silent-onwarn/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'triggers onwarn with --silent', command: 'rollup -c --silent', stderr: stderr => { assert.equal(stderr, ''); return true; } -}; +}); diff --git a/test/cli/samples/silent/_config.js b/test/cli/samples/silent/_config.js index 010fa421e13..515b2dd7b0e 100644 --- a/test/cli/samples/silent/_config.js +++ b/test/cli/samples/silent/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not print warnings with --silent', command: 'rollup -i main.js -f cjs --silent', stderr: stderr => { assert.equal(stderr, ''); return true; } -}; +}); diff --git a/test/cli/samples/sourcemap-hidden/_config.js b/test/cli/samples/sourcemap-hidden/_config.js index 4e1020b2990..12a2a3499ac 100644 --- a/test/cli/samples/sourcemap-hidden/_config.js +++ b/test/cli/samples/sourcemap-hidden/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { readFileSync, unlinkSync } = require('node:fs'); -module.exports = { +module.exports = defineRollupTest({ description: 'omits sourcemap comments', command: 'rollup -i main.js -f es -m hidden -o output.js', test() { @@ -13,4 +13,4 @@ module.exports = { ); unlinkSync('output.js.map'); } -}; +}); diff --git a/test/cli/samples/sourcemap-newline/_config.js b/test/cli/samples/sourcemap-newline/_config.js index d98d7878b54..3c2f6459c9b 100644 --- a/test/cli/samples/sourcemap-newline/_config.js +++ b/test/cli/samples/sourcemap-newline/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'adds a newline after the sourceMappingURL comment (#756)', command: 'rollup -i main.js -f es -m inline', result: code => { assert.equal(code.slice(-1), '\n'); } -}; +}); diff --git a/test/cli/samples/stdin/commonjs/_config.js b/test/cli/samples/stdin/commonjs/_config.js index 5ce8ad4a188..21e68564a25 100644 --- a/test/cli/samples/stdin/commonjs/_config.js +++ b/test/cli/samples/stdin/commonjs/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses stdin to inline a require()', skipIfWindows: true, command: `echo 'console.log(require("./add.js")(2, 1));' | rollup --stdin=js -p commonjs -f cjs --exports=auto` -}; +}); diff --git a/test/cli/samples/stdin/config-file/_config.js b/test/cli/samples/stdin/config-file/_config.js index 09d1acef0bf..0f614efc1f8 100644 --- a/test/cli/samples/stdin/config-file/_config.js +++ b/test/cli/samples/stdin/config-file/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not replace input with stdin but allows referencing it when using a config file', skipIfWindows: true, command: `echo "import {PRINT as p} from './a'; import C from './b'; 0 && fail() || p(C); export {C as value, p as print}" | rollup -c` -}; +}); diff --git a/test/cli/samples/stdin/force-stdin-tty/_config.js b/test/cli/samples/stdin/force-stdin-tty/_config.js index 754e74be351..7a5785b595f 100644 --- a/test/cli/samples/stdin/force-stdin-tty/_config.js +++ b/test/cli/samples/stdin/force-stdin-tty/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows forcing stdin input on TTY interfaces via option', skipIfWindows: true, command: `echo "console.log('PASS');" | ./wrapper.js -f es --stdin` -}; +}); diff --git a/test/cli/samples/stdin/json/_config.js b/test/cli/samples/stdin/json/_config.js index e9443f0667f..45b3b41e652 100644 --- a/test/cli/samples/stdin/json/_config.js +++ b/test/cli/samples/stdin/json/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'pipe JSON over stdin to create a module', skipIfWindows: true, command: `echo '{"foo": 42, "bar": "ok"}' | rollup --stdin=json -p json` -}; +}); diff --git a/test/cli/samples/stdin/no-dash/_config.js b/test/cli/samples/stdin/no-dash/_config.js index bc97f7e7214..1ea321667fa 100644 --- a/test/cli/samples/stdin/no-dash/_config.js +++ b/test/cli/samples/stdin/no-dash/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses stdin input when piping into Rollup without an input', skipIfWindows: true, command: `echo "0 && fail() || console.log('PASS');" | rollup` -}; +}); diff --git a/test/cli/samples/stdin/no-stdin-config-file/_config.js b/test/cli/samples/stdin/no-stdin-config-file/_config.js index 069b2eca2ae..cc5e7292995 100644 --- a/test/cli/samples/stdin/no-stdin-config-file/_config.js +++ b/test/cli/samples/stdin/no-stdin-config-file/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows using "-" as a regular file name via flag', skipIfWindows: true, command: `echo "console.log('IGNORED');" | rollup -c --no-stdin` -}; +}); diff --git a/test/cli/samples/stdin/no-stdin-tty/_config.js b/test/cli/samples/stdin/no-stdin-tty/_config.js index c0ac30263b6..d89b31df15f 100644 --- a/test/cli/samples/stdin/no-stdin-tty/_config.js +++ b/test/cli/samples/stdin/no-stdin-tty/_config.js @@ -1,10 +1,10 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not use input as stdin on TTY interfaces', skipIfWindows: true, command: `echo "console.log('PASS');" | ./wrapper.js -f es`, error(error) { assertIncludes(error.message, 'You must supply options.input to rollup'); } -}; +}); diff --git a/test/cli/samples/stdin/self-import/_config.js b/test/cli/samples/stdin/self-import/_config.js index 0d03f53502f..69ca91769e1 100644 --- a/test/cli/samples/stdin/self-import/_config.js +++ b/test/cli/samples/stdin/self-import/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'stdin input of code that imports a copy of itself', skipIfWindows: true, command: `cat input.txt | rollup -f cjs --silent` -}; +}); diff --git a/test/cli/samples/stdin/stdin-error/_config.js b/test/cli/samples/stdin/stdin-error/_config.js index d5efb600b8e..a379ca72efb 100644 --- a/test/cli/samples/stdin/stdin-error/_config.js +++ b/test/cli/samples/stdin/stdin-error/_config.js @@ -1,9 +1,9 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles stdin errors', command: `node wrapper.js`, error(error) { assertIncludes(error.message, 'Could not load -: Stream is broken.'); } -}; +}); diff --git a/test/cli/samples/stdin/with-dash/_config.js b/test/cli/samples/stdin/with-dash/_config.js index 332119cd6ca..dac20b7aef4 100644 --- a/test/cli/samples/stdin/with-dash/_config.js +++ b/test/cli/samples/stdin/with-dash/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'stdin input with dash on CLI', skipIfWindows: true, command: `echo "0 && fail() || console.log('PASS');" | rollup -` -}; +}); diff --git a/test/cli/samples/stdout-code-splitting/_config.js b/test/cli/samples/stdout-code-splitting/_config.js index 6b257ffd63f..1d116d0fbb8 100644 --- a/test/cli/samples/stdout-code-splitting/_config.js +++ b/test/cli/samples/stdout-code-splitting/_config.js @@ -3,7 +3,7 @@ const assert = require('node:assert'); const COLOR = '\u001B[36m\u001B[1m'; const STANDARD = '\u001B[22m\u001B[39m'; -module.exports = { +module.exports = defineRollupTest({ description: 'bundles multiple files to stdout while adding file names', skipIfWindows: true, command: @@ -24,4 +24,4 @@ module.exports = { 'Hello' ); } -}; +}); diff --git a/test/cli/samples/stdout-only-inline-sourcemaps/_config.js b/test/cli/samples/stdout-only-inline-sourcemaps/_config.js index 4f1d38e41f1..591920f7b1c 100644 --- a/test/cli/samples/stdout-only-inline-sourcemaps/_config.js +++ b/test/cli/samples/stdout-only-inline-sourcemaps/_config.js @@ -1,10 +1,10 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'fails when using non-inline sourcemaps when bundling to stdout', command: 'rollup -i main.js -f es -m', error: () => true, stderr: stderr => { assertIncludes(stderr, '[!] Only inline sourcemaps are supported when bundling to stdout.\n'); } -}; +}); diff --git a/test/cli/samples/stdout-single-input/_config.js b/test/cli/samples/stdout-single-input/_config.js index f5a8e98af8b..69fcbc24e6c 100644 --- a/test/cli/samples/stdout-single-input/_config.js +++ b/test/cli/samples/stdout-single-input/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'bundles a single input to stdout without modifications', command: 'rollup -i main.js -f es -m inline' -}; +}); diff --git a/test/cli/samples/symlinked-config/_config.js b/test/cli/samples/symlinked-config/_config.js index ca76fa8746f..aeb39bb6387 100644 --- a/test/cli/samples/symlinked-config/_config.js +++ b/test/cli/samples/symlinked-config/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'loads a symlinked config file', command: 'rollup -c --bundleConfigAsCjs', execute: true -}; +}); diff --git a/test/cli/samples/symlinked-named-config/_config.js b/test/cli/samples/symlinked-named-config/_config.js index 31b3debd42f..de9ffa23d1a 100644 --- a/test/cli/samples/symlinked-named-config/_config.js +++ b/test/cli/samples/symlinked-named-config/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'loads a symlinked config file with the given name', command: 'rollup --config my.rollup.config.js --bundleConfigAsCjs', execute: true -}; +}); diff --git a/test/cli/samples/treeshake-preset-override/_config.js b/test/cli/samples/treeshake-preset-override/_config.js index dc8435858f8..7f4bca1187a 100644 --- a/test/cli/samples/treeshake-preset-override/_config.js +++ b/test/cli/samples/treeshake-preset-override/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'overrides the treeshake option when using presets', command: 'rollup --config --treeshake recommended --treeshake.unknownGlobalSideEffects --no-treeshake.moduleSideEffects' -}; +}); diff --git a/test/cli/samples/treeshake-unknown-preset/_config.js b/test/cli/samples/treeshake-unknown-preset/_config.js index 15bed7c194b..35bd3ecaf65 100644 --- a/test/cli/samples/treeshake-unknown-preset/_config.js +++ b/test/cli/samples/treeshake-unknown-preset/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'overrides the treeshake option when using presets', command: 'rollup main.js --format es --treeshake unknown', error: () => true, @@ -11,4 +11,4 @@ module.exports = { 'https://rollupjs.org/configuration-options/#treeshake' ); } -}; +}); diff --git a/test/cli/samples/unfulfilled-hook-actions-error/_config.js b/test/cli/samples/unfulfilled-hook-actions-error/_config.js index d496a31f9c3..f6adcf5ea83 100644 --- a/test/cli/samples/unfulfilled-hook-actions-error/_config.js +++ b/test/cli/samples/unfulfilled-hook-actions-error/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { assertIncludes, assertDoesNotInclude } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not show unfulfilled hook actions if there are errors', command: 'node build.mjs', after(error) { @@ -12,4 +12,4 @@ module.exports = { assertIncludes(stderr, 'Error: Error must be displayed.'); assertDoesNotInclude(stderr, 'Unfinished'); } -}; +}); diff --git a/test/cli/samples/unfulfilled-hook-actions-manual-exit/_config.js b/test/cli/samples/unfulfilled-hook-actions-manual-exit/_config.js index ff05e013e76..c804c39e419 100644 --- a/test/cli/samples/unfulfilled-hook-actions-manual-exit/_config.js +++ b/test/cli/samples/unfulfilled-hook-actions-manual-exit/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const { assertDoesNotInclude } = require('../../../utils'); const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not show unfulfilled hook actions when exiting manually with a non-zero exit code', command: 'rollup -c --silent', @@ -17,4 +17,4 @@ module.exports = { assertDoesNotInclude(stderr, 'Unfinished'); assertIncludes(stderr, 'Manual exit'); } -}; +}); diff --git a/test/cli/samples/unfulfilled-hook-actions/_config.js b/test/cli/samples/unfulfilled-hook-actions/_config.js index 175d8c4b97d..1aa7e6c76d3 100644 --- a/test/cli/samples/unfulfilled-hook-actions/_config.js +++ b/test/cli/samples/unfulfilled-hook-actions/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'show errors with non-zero exit code for unfulfilled async plugin actions on exit', command: 'rollup -c --silent', after(error) { @@ -26,4 +26,4 @@ module.exports = { assertIncludes(stderr, '(buggy-plugin) moduleParsed "./d.js"'); assertIncludes(stderr, '(buggy-plugin) shouldTransformCachedModule "./e.js"'); } -}; +}); diff --git a/test/cli/samples/validate/_config.js b/test/cli/samples/validate/_config.js index 5ac726397c6..ccf21b02005 100644 --- a/test/cli/samples/validate/_config.js +++ b/test/cli/samples/validate/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'use CLI --validate to test whether output is well formed', skipIfWindows: true, command: `rollup main.js --silent --outro 'console.log("end"); /*' -o _actual/out.js --validate`, @@ -15,4 +15,4 @@ out.js (3:20) 3: console.log("end"); /* ^` ) -}; +}); diff --git a/test/cli/samples/wait-for-bundle-input-object/_config.js b/test/cli/samples/wait-for-bundle-input-object/_config.js index 325aa98ce9e..c87e90a0f8e 100644 --- a/test/cli/samples/wait-for-bundle-input-object/_config.js +++ b/test/cli/samples/wait-for-bundle-input-object/_config.js @@ -5,7 +5,7 @@ const { atomicWriteFileSync } = require('../../../utils'); let second; let third; -module.exports = { +module.exports = defineRollupTest({ description: 'waits for multiple named bundle inputs', command: 'rollup -c --waitForBundleInput', before() { @@ -23,4 +23,4 @@ module.exports = { atomicWriteFileSync(third, "export default 'third'"); } } -}; +}); diff --git a/test/cli/samples/wait-for-bundle-input/_config.js b/test/cli/samples/wait-for-bundle-input/_config.js index 2fad94ad28c..c56823ed94d 100644 --- a/test/cli/samples/wait-for-bundle-input/_config.js +++ b/test/cli/samples/wait-for-bundle-input/_config.js @@ -4,7 +4,7 @@ const { atomicWriteFileSync } = require('../../../utils'); let mainFile; -module.exports = { +module.exports = defineRollupTest({ description: 'waits for bundle input', command: 'rollup -c --waitForBundleInput', before() { @@ -21,4 +21,4 @@ module.exports = { // We wait for a regular abort as we do not watch return false; } -}; +}); diff --git a/test/cli/samples/warn-broken-sourcemap/_config.js b/test/cli/samples/warn-broken-sourcemap/_config.js index 965e3a64e6c..36de59ce3f5 100644 --- a/test/cli/samples/warn-broken-sourcemap/_config.js +++ b/test/cli/samples/warn-broken-sourcemap/_config.js @@ -2,7 +2,7 @@ const { unlinkSync } = require('node:fs'); const path = require('node:path'); const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'displays warnings for broken sourcemaps', command: 'rollup -c', stderr: stderr => { @@ -15,4 +15,4 @@ module.exports = { 'Plugins that transform code (such as "test-plugin1") should generate accompanying sourcemaps.\n' ); } -}; +}); diff --git a/test/cli/samples/warn-broken-sourcemaps/_config.js b/test/cli/samples/warn-broken-sourcemaps/_config.js index 859bffafe9c..fa77899e6c4 100644 --- a/test/cli/samples/warn-broken-sourcemaps/_config.js +++ b/test/cli/samples/warn-broken-sourcemaps/_config.js @@ -2,7 +2,7 @@ const { unlinkSync } = require('node:fs'); const path = require('node:path'); const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'displays warnings for broken sourcemaps', command: 'rollup -c', stderr: stderr => { @@ -15,4 +15,4 @@ module.exports = { 'Plugins that transform code (such as "test-plugin1", "test-plugin2" and "test-plugin3") should generate accompanying sourcemaps' ); } -}; +}); diff --git a/test/cli/samples/warn-circular-multiple/_config.js b/test/cli/samples/warn-circular-multiple/_config.js index 49bf737b7f6..738d42abf8e 100644 --- a/test/cli/samples/warn-circular-multiple/_config.js +++ b/test/cli/samples/warn-circular-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns for multiple circular dependencies', command: 'rollup -c', stderr: stderr => @@ -13,4 +13,4 @@ module.exports = { '...and 3 more\n' + '' ) -}; +}); diff --git a/test/cli/samples/warn-circular/_config.js b/test/cli/samples/warn-circular/_config.js index 20038499a4a..e6c0f1d3134 100644 --- a/test/cli/samples/warn-circular/_config.js +++ b/test/cli/samples/warn-circular/_config.js @@ -1,9 +1,9 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns for circular dependencies', command: 'rollup -c', stderr(stderr) { assertIncludes(stderr, '(!) Circular dependency\nmain.js -> dep.js -> main.js\n'); } -}; +}); diff --git a/test/cli/samples/warn-eval-multiple/_config.js b/test/cli/samples/warn-eval-multiple/_config.js index 69e38b11a95..19d4b3ede64 100644 --- a/test/cli/samples/warn-eval-multiple/_config.js +++ b/test/cli/samples/warn-eval-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns when eval is used multiple times', command: 'rollup -c', stderr: stderr => @@ -25,4 +25,4 @@ module.exports = { '\n' + '...and 3 other files' ) -}; +}); diff --git a/test/cli/samples/warn-eval/_config.js b/test/cli/samples/warn-eval/_config.js index 7020fb46363..11731ed57cb 100644 --- a/test/cli/samples/warn-eval/_config.js +++ b/test/cli/samples/warn-eval/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns when eval is used', command: 'rollup -c', stderr: stderr => @@ -12,4 +12,4 @@ module.exports = { "1: eval('foo');\n" + ' ^' ) -}; +}); diff --git a/test/cli/samples/warn-import-export/_config.js b/test/cli/samples/warn-import-export/_config.js index cf33deb78f0..3b7ce9db6e1 100644 --- a/test/cli/samples/warn-import-export/_config.js +++ b/test/cli/samples/warn-import-export/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns about import and export related issues', command: 'rollup -c', stderr: stderr => { @@ -51,4 +51,4 @@ module.exports = { 'otherUnresolvedExternal (imported by "dep.js")\n' ); } -}; +}); diff --git a/test/cli/samples/warn-missing-global-multiple/_config.js b/test/cli/samples/warn-missing-global-multiple/_config.js index 8bbc59db71d..0651d1b9dec 100644 --- a/test/cli/samples/warn-missing-global-multiple/_config.js +++ b/test/cli/samples/warn-missing-global-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns when there are multiple missing globals', command: 'rollup -c', stderr: stderr => @@ -13,4 +13,4 @@ module.exports = { 'external2 (guessing "foo2")\n' + 'external3 (guessing "foo3")' ) -}; +}); diff --git a/test/cli/samples/warn-missing-global/_config.js b/test/cli/samples/warn-missing-global/_config.js index e503a5203f4..9a810684ce5 100644 --- a/test/cli/samples/warn-missing-global/_config.js +++ b/test/cli/samples/warn-missing-global/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns when there is a missing global variable name', command: 'rollup -c', stderr: stderr => @@ -11,4 +11,4 @@ module.exports = { 'Use "output.globals" to specify browser global variable names corresponding to external modules:\n' + 'external (guessing "foo")' ) -}; +}); diff --git a/test/cli/samples/warn-mixed-exports-multiple/_config.js b/test/cli/samples/warn-mixed-exports-multiple/_config.js index 7a46e3d649f..54f0039d3bd 100644 --- a/test/cli/samples/warn-mixed-exports-multiple/_config.js +++ b/test/cli/samples/warn-mixed-exports-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns when mixed exports are used', command: 'rollup -c', stderr: stderr => { @@ -17,4 +17,4 @@ module.exports = { 'Consumers of your bundle will have to use chunk.default to access their default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.\n' ); } -}; +}); diff --git a/test/cli/samples/warn-multiple/_config.js b/test/cli/samples/warn-multiple/_config.js index 3e54afe0c85..a222e84b60c 100644 --- a/test/cli/samples/warn-multiple/_config.js +++ b/test/cli/samples/warn-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'aggregates warnings of different types', command: 'rollup -c', stderr: stderr => { @@ -41,4 +41,4 @@ module.exports = { "3: import url from 'url';\n" ); } -}; +}); diff --git a/test/cli/samples/warn-plugin-loc/_config.js b/test/cli/samples/warn-plugin-loc/_config.js index 8b8f52bb4e9..4dd243aedb3 100644 --- a/test/cli/samples/warn-plugin-loc/_config.js +++ b/test/cli/samples/warn-plugin-loc/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly adds locations to plugin warnings', command: 'rollup -c', stderr: stderr => { @@ -14,4 +14,4 @@ module.exports = { 'file-id3: (3:4)\n' ); } -}; +}); diff --git a/test/cli/samples/warn-plugin/_config.js b/test/cli/samples/warn-plugin/_config.js index c02c8d5b693..4638b1c35b9 100644 --- a/test/cli/samples/warn-plugin/_config.js +++ b/test/cli/samples/warn-plugin/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'displays warnings from plugins', command: 'rollup -c', stderr: stderr => @@ -15,4 +15,4 @@ module.exports = { 'other.js: (1:2)\n' + 'custom frame' ) -}; +}); diff --git a/test/cli/samples/warn-this/_config.js b/test/cli/samples/warn-this/_config.js index b97772132ea..777c725cf4b 100644 --- a/test/cli/samples/warn-this/_config.js +++ b/test/cli/samples/warn-this/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns "this" is used on the top level', command: 'rollup -c', stderr: stderr => @@ -12,4 +12,4 @@ module.exports = { '1: console.log(this);\n' + ' ^' ) -}; +}); diff --git a/test/cli/samples/warn-unknown-options/_config.js b/test/cli/samples/warn-unknown-options/_config.js index 5b68f78dcce..a830b3183a9 100644 --- a/test/cli/samples/warn-unknown-options/_config.js +++ b/test/cli/samples/warn-unknown-options/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns about unknown CLI options', command: 'rollup --config rollup.config.js --format es --configAnswer 42 --unknownOption' -}; +}); diff --git a/test/cli/samples/watch/bundle-error/_config.js b/test/cli/samples/watch/bundle-error/_config.js index c00b2e0161b..5fa2ef620d9 100644 --- a/test/cli/samples/watch/bundle-error/_config.js +++ b/test/cli/samples/watch/bundle-error/_config.js @@ -4,7 +4,7 @@ const { atomicWriteFileSync } = require('../../../../utils'); let mainFile; -module.exports = { +module.exports = defineRollupTest({ description: 'recovers from errors during bundling', command: 'rollup -cw --bundleConfigAsCjs', before() { @@ -24,4 +24,4 @@ module.exports = { return true; } } -}; +}); diff --git a/test/cli/samples/watch/clearScreen/_config.js b/test/cli/samples/watch/clearScreen/_config.js index 5716ff3da78..4dd319baf93 100644 --- a/test/cli/samples/watch/clearScreen/_config.js +++ b/test/cli/samples/watch/clearScreen/_config.js @@ -3,7 +3,7 @@ const assert = require('node:assert'); const CLEAR_SCREEN = '\u001Bc'; const UNDERLINE = '\u001B[4m'; -module.exports = { +module.exports = defineRollupTest({ description: 'clears the screen before bundling', command: 'node wrapper.js -cw', env: { FORCE_COLOR: '1', TERM: 'xterm' }, @@ -15,4 +15,4 @@ module.exports = { stderr(stderr) { assert.strictEqual(stderr.slice(0, 12), `${CLEAR_SCREEN}${UNDERLINE}rollup`); } -}; +}); diff --git a/test/cli/samples/watch/close-error/_config.js b/test/cli/samples/watch/close-error/_config.js index 02dbfdd4b9e..1ccedbfd460 100644 --- a/test/cli/samples/watch/close-error/_config.js +++ b/test/cli/samples/watch/close-error/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'displays errors when closing the watcher', command: 'rollup -cw', abortOnStderr(data) { @@ -6,4 +6,4 @@ module.exports = { return true; } } -}; +}); diff --git a/test/cli/samples/watch/close-on-generate-error/_config.js b/test/cli/samples/watch/close-on-generate-error/_config.js index c39fb2fe398..1a1075181d1 100644 --- a/test/cli/samples/watch/close-on-generate-error/_config.js +++ b/test/cli/samples/watch/close-on-generate-error/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'closes the bundle on generate errors', command: 'rollup -cw', abortOnStderr(data) { @@ -16,4 +16,4 @@ module.exports = { assertIncludes(stderr, 'Bundle closed'); return false; } -}; +}); diff --git a/test/cli/samples/watch/close-stdin/_config.js b/test/cli/samples/watch/close-stdin/_config.js index cd460e29b4c..2af5dbb7e53 100644 --- a/test/cli/samples/watch/close-stdin/_config.js +++ b/test/cli/samples/watch/close-stdin/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'closes the watcher when stdin closes', retry: true, command: 'node wrapper.js main.js --watch --format es --file _actual/out.js' -}; +}); diff --git a/test/cli/samples/watch/no-clearScreen-command/_config.js b/test/cli/samples/watch/no-clearScreen-command/_config.js index 7c266e1233d..ed6eba8741f 100644 --- a/test/cli/samples/watch/no-clearScreen-command/_config.js +++ b/test/cli/samples/watch/no-clearScreen-command/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const UNDERLINE = '\u001B[4m'; -module.exports = { +module.exports = defineRollupTest({ description: 'allows disabling clearing the screen from the command line', command: 'node wrapper.js main.js --format es --file _actual.js --watch --no-watch.clearScreen', env: { FORCE_COLOR: '1', TERM: 'xterm' }, @@ -14,4 +14,4 @@ module.exports = { stderr(stderr) { assert.strictEqual(stderr.slice(0, 10), `${UNDERLINE}rollup`); } -}; +}); diff --git a/test/cli/samples/watch/no-clearScreen/_config.js b/test/cli/samples/watch/no-clearScreen/_config.js index b4fe3acc3e3..6f149fa8d76 100644 --- a/test/cli/samples/watch/no-clearScreen/_config.js +++ b/test/cli/samples/watch/no-clearScreen/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const UNDERLINE = '\u001B[4m'; -module.exports = { +module.exports = defineRollupTest({ description: 'allows disabling clearing the screen', command: 'node wrapper.js -cw', env: { FORCE_COLOR: '1', TERM: 'xterm' }, @@ -14,4 +14,4 @@ module.exports = { stderr(stderr) { assert.strictEqual(stderr.slice(0, 10), `${UNDERLINE}rollup`); } -}; +}); diff --git a/test/cli/samples/watch/no-config-file/_config.js b/test/cli/samples/watch/no-config-file/_config.js index c671e90a607..738c7431540 100644 --- a/test/cli/samples/watch/no-config-file/_config.js +++ b/test/cli/samples/watch/no-config-file/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'watches without a config file', command: 'rollup main.js --watch --format es --file _actual/main.js', abortOnStderr(data) { @@ -6,4 +6,4 @@ module.exports = { return true; } } -}; +}); diff --git a/test/cli/samples/watch/no-watch-by-default/_config.js b/test/cli/samples/watch/no-watch-by-default/_config.js index b43ee5fbb19..62655fc2f26 100644 --- a/test/cli/samples/watch/no-watch-by-default/_config.js +++ b/test/cli/samples/watch/no-watch-by-default/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not watch if --watch is missing', command: 'node wrapper.js -c --no-watch.clearScreen', stderr: stderr => assertIncludes(stderr, 'main.js → _actual.js...\ncreated _actual.js in'), @@ -9,4 +9,4 @@ module.exports = { throw new Error('Watch initiated'); } } -}; +}); diff --git a/test/cli/samples/watch/no-watched-config/_config.js b/test/cli/samples/watch/no-watched-config/_config.js index a1bc0153478..70aaacada41 100644 --- a/test/cli/samples/watch/no-watched-config/_config.js +++ b/test/cli/samples/watch/no-watched-config/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws if no config is watched', command: 'rollup -cw', error: () => true, @@ -10,4 +10,4 @@ module.exports = { '[!] RollupError: Invalid value for option "watch" - there must be at least one config where "watch" is not set to "false".' ); } -}; +}); diff --git a/test/cli/samples/watch/node-config-file/_config.js b/test/cli/samples/watch/node-config-file/_config.js index 1cbfcf60c82..c46133e5587 100644 --- a/test/cli/samples/watch/node-config-file/_config.js +++ b/test/cli/samples/watch/node-config-file/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'watches using a node_modules config files', command: 'rollup --watch --config node:custom', abortOnStderr(data) { @@ -6,4 +6,4 @@ module.exports = { return true; } } -}; +}); diff --git a/test/cli/samples/watch/watch-config-early-update/_config.js b/test/cli/samples/watch/watch-config-early-update/_config.js index f308be20524..24baa817139 100644 --- a/test/cli/samples/watch/watch-config-early-update/_config.js +++ b/test/cli/samples/watch/watch-config-early-update/_config.js @@ -5,7 +5,7 @@ const { wait, writeAndSync, writeAndRetry } = require('../../../../utils'); const configFile = path.join(__dirname, 'rollup.config.mjs'); let stopUpdate; -module.exports = { +module.exports = defineRollupTest({ description: 'immediately reloads the config file if a change happens while it is parsed', command: 'rollup -cw', before() { @@ -70,4 +70,4 @@ module.exports = { return true; } } -}; +}); diff --git a/test/cli/samples/watch/watch-config-error/_config.js b/test/cli/samples/watch/watch-config-error/_config.js index f825b8df8b9..20c85e245ec 100644 --- a/test/cli/samples/watch/watch-config-error/_config.js +++ b/test/cli/samples/watch/watch-config-error/_config.js @@ -4,7 +4,7 @@ const { atomicWriteFileSync } = require('../../../../utils'); let configFile; -module.exports = { +module.exports = defineRollupTest({ description: 'keeps watching the config file in case the config is changed to an invalid state', command: 'rollup -cw', before() { @@ -52,4 +52,4 @@ module.exports = { return true; } } -}; +}); diff --git a/test/cli/samples/watch/watch-config-initial-error/_config.js b/test/cli/samples/watch/watch-config-initial-error/_config.js index a11326beaed..c798a95b319 100644 --- a/test/cli/samples/watch/watch-config-initial-error/_config.js +++ b/test/cli/samples/watch/watch-config-initial-error/_config.js @@ -4,7 +4,7 @@ const { atomicWriteFileSync } = require('../../../../utils'); let configFile; -module.exports = { +module.exports = defineRollupTest({ description: 'keeps watching the config file in case the initial file contains an error', command: 'rollup -cw', before() { @@ -34,4 +34,4 @@ module.exports = { return true; } } -}; +}); diff --git a/test/cli/samples/watch/watch-config-no-update/_config.js b/test/cli/samples/watch/watch-config-no-update/_config.js index ad478a90223..5946c0c1310 100644 --- a/test/cli/samples/watch/watch-config-no-update/_config.js +++ b/test/cli/samples/watch/watch-config-no-update/_config.js @@ -12,7 +12,7 @@ const configContent = '\t}\n' + '};'; -module.exports = { +module.exports = defineRollupTest({ description: 'does not rebuild if the config file is updated without change', command: 'rollup -cw', before() { @@ -38,4 +38,4 @@ module.exports = { throw new Error(`stderr output does not match: ${JSON.stringify(stderr)}`); } } -}; +}); diff --git a/test/cli/samples/watch/watch-event-hooks-error/_config.js b/test/cli/samples/watch/watch-event-hooks-error/_config.js index 06797470b83..cfd33d0dd77 100644 --- a/test/cli/samples/watch/watch-event-hooks-error/_config.js +++ b/test/cli/samples/watch/watch-event-hooks-error/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'onError event hook shell commands write to stderr', command: 'node wrapper.js -cw --watch.onError "echo error"', abortOnStderr(data) { @@ -15,4 +15,4 @@ module.exports = { error` ); } -}; +}); diff --git a/test/cli/samples/watch/watch-event-hooks/_config.js b/test/cli/samples/watch/watch-event-hooks/_config.js index b74f3ccd28b..8f5d17d02cb 100644 --- a/test/cli/samples/watch/watch-event-hooks/_config.js +++ b/test/cli/samples/watch/watch-event-hooks/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'event hook shell commands write to stderr', retry: true, command: @@ -34,4 +34,4 @@ bundleEnd` end` ); } -}; +}); diff --git a/test/file-hashes/index.js b/test/file-hashes/index.js index c57435dc939..8dbe2d11709 100644 --- a/test/file-hashes/index.js +++ b/test/file-hashes/index.js @@ -1,4 +1,7 @@ const path = require('node:path'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const rollup = require('../../dist/rollup'); const { runTestSuiteWithSamples } = require('../utils.js'); diff --git a/test/file-hashes/samples/augment-chunk-hash/_config.js b/test/file-hashes/samples/augment-chunk-hash/_config.js index b801e17ddd5..0b0c5165737 100644 --- a/test/file-hashes/samples/augment-chunk-hash/_config.js +++ b/test/file-hashes/samples/augment-chunk-hash/_config.js @@ -1,7 +1,7 @@ const augment1 = '/*foo*/'; const augment2 = '/*bar*/'; -module.exports = { +module.exports = defineRollupTest({ description: 'augmentChunkHash updates hashes across all modules when returning something', options1: { input: 'main', @@ -47,4 +47,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/file-hashes/samples/banner/_config.js b/test/file-hashes/samples/banner/_config.js index 805b2096a6f..63a0c11f6ea 100644 --- a/test/file-hashes/samples/banner/_config.js +++ b/test/file-hashes/samples/banner/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the banner differs', options1: { input: 'main', @@ -12,4 +12,4 @@ module.exports = { banner: 'console.log(2);' } } -}; +}); diff --git a/test/file-hashes/samples/chunk-name/_config.js b/test/file-hashes/samples/chunk-name/_config.js index 5e4473d7d48..fd4206a95b2 100644 --- a/test/file-hashes/samples/chunk-name/_config.js +++ b/test/file-hashes/samples/chunk-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the name pattern differs', options1: { input: { @@ -18,4 +18,4 @@ module.exports = { entryFileNames: '[name]-[hash].js' } } -}; +}); diff --git a/test/file-hashes/samples/content/_config.js b/test/file-hashes/samples/content/_config.js index dd2047a083e..d7708439a53 100644 --- a/test/file-hashes/samples/content/_config.js +++ b/test/file-hashes/samples/content/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the content differs', options1: { input: { main: 'main1', dep: 'dep1' } @@ -6,4 +6,4 @@ module.exports = { options2: { input: { main: 'main2', dep: 'dep2' } } -}; +}); diff --git a/test/file-hashes/samples/dependency-content/_config.js b/test/file-hashes/samples/dependency-content/_config.js index bfc9ca3485d..82e692bf429 100644 --- a/test/file-hashes/samples/dependency-content/_config.js +++ b/test/file-hashes/samples/dependency-content/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the content of dependencies differs', options1: { input: { main: 'main1', dep: 'dep1' } @@ -6,4 +6,4 @@ module.exports = { options2: { input: { main: 'main2', dep: 'dep2' } } -}; +}); diff --git a/test/file-hashes/samples/export-order-2/_config.js b/test/file-hashes/samples/export-order-2/_config.js index 3840ab69b9c..871d99f77be 100644 --- a/test/file-hashes/samples/export-order-2/_config.js +++ b/test/file-hashes/samples/export-order-2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if different variables are exported under the same name', options1: { input: ['main1', 'dep'] @@ -6,4 +6,4 @@ module.exports = { options2: { input: ['main2', 'dep'] } -}; +}); diff --git a/test/file-hashes/samples/export-order/_config.js b/test/file-hashes/samples/export-order/_config.js index 342bef8136a..5c558313f29 100644 --- a/test/file-hashes/samples/export-order/_config.js +++ b/test/file-hashes/samples/export-order/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if different variables are exported under the same name', options1: { input: ['main1'] @@ -6,4 +6,4 @@ module.exports = { options2: { input: ['main2'] } -}; +}); diff --git a/test/file-hashes/samples/exports/_config.js b/test/file-hashes/samples/exports/_config.js index 10b8e4c6c99..3bd8c6c3463 100644 --- a/test/file-hashes/samples/exports/_config.js +++ b/test/file-hashes/samples/exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the generated exports differ', options1: { input: ['main1', 'other'] @@ -6,4 +6,4 @@ module.exports = { options2: { input: ['main2', 'other'] } -}; +}); diff --git a/test/file-hashes/samples/external-dependency-names/_config.js b/test/file-hashes/samples/external-dependency-names/_config.js index e3a80e8db9d..2fbc7bd04f3 100644 --- a/test/file-hashes/samples/external-dependency-names/_config.js +++ b/test/file-hashes/samples/external-dependency-names/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the names of external dependencies differ', options1: { input: { mainA: 'main1a', mainB: 'main1b' }, @@ -8,4 +8,4 @@ module.exports = { input: { mainA: 'main2a', mainB: 'main2b' }, external: ['external', 'external2'] } -}; +}); diff --git a/test/file-hashes/samples/footer/_config.js b/test/file-hashes/samples/footer/_config.js index 49b41fc6d05..0c014a13a36 100644 --- a/test/file-hashes/samples/footer/_config.js +++ b/test/file-hashes/samples/footer/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the footer differs', options1: { input: 'main', @@ -12,4 +12,4 @@ module.exports = { footer: 'console.log(2);' } } -}; +}); diff --git a/test/file-hashes/samples/format/_config.js b/test/file-hashes/samples/format/_config.js index 1ea5521d2bd..394222f4d5c 100644 --- a/test/file-hashes/samples/format/_config.js +++ b/test/file-hashes/samples/format/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the format differs', options1: { input: 'main', @@ -12,4 +12,4 @@ module.exports = { format: 'cjs' } } -}; +}); diff --git a/test/file-hashes/samples/internal-exports/_config.js b/test/file-hashes/samples/internal-exports/_config.js index c77a5d4686c..2ba1d023e00 100644 --- a/test/file-hashes/samples/internal-exports/_config.js +++ b/test/file-hashes/samples/internal-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if generated internal exports differ', options1: { input: ['main1', 'other'] @@ -6,4 +6,4 @@ module.exports = { options2: { input: ['main2', 'other'] } -}; +}); diff --git a/test/file-hashes/samples/intro/_config.js b/test/file-hashes/samples/intro/_config.js index 04eb80772c6..9ca52299214 100644 --- a/test/file-hashes/samples/intro/_config.js +++ b/test/file-hashes/samples/intro/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the intro differs', options1: { input: 'main', @@ -12,4 +12,4 @@ module.exports = { intro: 'console.log(2);' } } -}; +}); diff --git a/test/file-hashes/samples/name-pattern/_config.js b/test/file-hashes/samples/name-pattern/_config.js index e0127aa0aab..7327321bb40 100644 --- a/test/file-hashes/samples/name-pattern/_config.js +++ b/test/file-hashes/samples/name-pattern/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the name pattern differs', options1: { input: 'main', @@ -12,4 +12,4 @@ module.exports = { chunkFileNames: '[name]-[hash]' } } -}; +}); diff --git a/test/file-hashes/samples/outro/_config.js b/test/file-hashes/samples/outro/_config.js index 5248af72f0e..f39b65af30e 100644 --- a/test/file-hashes/samples/outro/_config.js +++ b/test/file-hashes/samples/outro/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates different hashes if the outro differs', options1: { input: 'main', @@ -12,4 +12,4 @@ module.exports = { outro: 'console.log(2);' } } -}; +}); diff --git a/test/file-hashes/samples/render-chunk-changes/_config.js b/test/file-hashes/samples/render-chunk-changes/_config.js index c4d17be937f..754bb293c5e 100644 --- a/test/file-hashes/samples/render-chunk-changes/_config.js +++ b/test/file-hashes/samples/render-chunk-changes/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'reflects changes in renderChunk', options1: { input: 'main', @@ -24,4 +24,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/index.js b/test/form/index.js index 8170f9de3df..1761eb74b56 100644 --- a/test/form/index.js +++ b/test/form/index.js @@ -1,6 +1,9 @@ const assert = require('node:assert'); const { existsSync, readFileSync } = require('node:fs'); const { basename, resolve } = require('node:path'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const { rollup } = require('../../dist/rollup'); const { normaliseOutput, runTestSuiteWithSamples } = require('../utils.js'); diff --git a/test/form/samples/absolute-path-resolver/_config.js b/test/form/samples/absolute-path-resolver/_config.js index 3dc468e94a8..25b24f1a54f 100644 --- a/test/form/samples/absolute-path-resolver/_config.js +++ b/test/form/samples/absolute-path-resolver/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'normalizes absolute ids', options: { plugins: [ @@ -13,4 +13,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/acorn-external-plugins/_config.js b/test/form/samples/acorn-external-plugins/_config.js index 48682b384b0..e7e829029f1 100644 --- a/test/form/samples/acorn-external-plugins/_config.js +++ b/test/form/samples/acorn-external-plugins/_config.js @@ -1,8 +1,8 @@ const jsx = require('acorn-jsx'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports official acorn plugins that may rely on a shared acorn instance', options: { acornInjectPlugins: [jsx()] } -}; +}); diff --git a/test/form/samples/addon-functions/_config.js b/test/form/samples/addon-functions/_config.js index 7a945ec98d5..8884d8a6feb 100644 --- a/test/form/samples/addon-functions/_config.js +++ b/test/form/samples/addon-functions/_config.js @@ -31,7 +31,7 @@ const assertChunkData = chunk => '}' ); -module.exports = { +module.exports = defineRollupTest({ description: 'provides module information when adding addons', options: { output: { @@ -93,4 +93,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/amd-id-auto/_config.js b/test/form/samples/amd-id-auto/_config.js index c08fbc50402..082b6131948 100644 --- a/test/form/samples/amd-id-auto/_config.js +++ b/test/form/samples/amd-id-auto/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to use amd.autoId', options: { output: { amd: { autoId: true } } } -}; +}); diff --git a/test/form/samples/amd-id/_config.js b/test/form/samples/amd-id/_config.js index 2fb7c876ffa..187adad03f1 100644 --- a/test/form/samples/amd-id/_config.js +++ b/test/form/samples/amd-id/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to declare an AMD id', options: { output: { amd: { id: 'my-id' } } } -}; +}); diff --git a/test/form/samples/amd-keep-extension/_config.js b/test/form/samples/amd-keep-extension/_config.js index f7ada5d8e9b..20fe1c5c752 100644 --- a/test/form/samples/amd-keep-extension/_config.js +++ b/test/form/samples/amd-keep-extension/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keep extension for AMD modules', options: { external: ['./relative', 'abso/lute', './relative.js', 'abso/lute.js'], output: { amd: { forceJsExtensionForImports: true }, interop: 'default' } } -}; +}); diff --git a/test/form/samples/argument-deoptimization/no-default-deoptimization/_config.js b/test/form/samples/argument-deoptimization/no-default-deoptimization/_config.js index eb89006356d..2f3a78538d3 100644 --- a/test/form/samples/argument-deoptimization/no-default-deoptimization/_config.js +++ b/test/form/samples/argument-deoptimization/no-default-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not deoptimize call arguments by default' -}; +}); diff --git a/test/form/samples/argument-deoptimization/no-global-call-deoptimization/_config.js b/test/form/samples/argument-deoptimization/no-global-call-deoptimization/_config.js index acce6a78838..deb451145be 100644 --- a/test/form/samples/argument-deoptimization/no-global-call-deoptimization/_config.js +++ b/test/form/samples/argument-deoptimization/no-global-call-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not deoptimize call arguments of calls to globals by default' -}; +}); diff --git a/test/form/samples/argument-deoptimization/return-function-deoptimization/_config.js b/test/form/samples/argument-deoptimization/return-function-deoptimization/_config.js index a62f2917068..e97bcd37102 100644 --- a/test/form/samples/argument-deoptimization/return-function-deoptimization/_config.js +++ b/test/form/samples/argument-deoptimization/return-function-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not deoptimize call arguments of returned functions by default' -}; +}); diff --git a/test/form/samples/array-element-tracking/array-elements/_config.js b/test/form/samples/array-element-tracking/array-elements/_config.js index 46d8f9b2d3d..4940e9c0b6a 100644 --- a/test/form/samples/array-element-tracking/array-elements/_config.js +++ b/test/form/samples/array-element-tracking/array-elements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks elements of arrays' -}; +}); diff --git a/test/form/samples/array-element-tracking/array-mutation/_config.js b/test/form/samples/array-element-tracking/array-mutation/_config.js index 58a8183eebf..7e4b91617b7 100644 --- a/test/form/samples/array-element-tracking/array-mutation/_config.js +++ b/test/form/samples/array-element-tracking/array-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of array elements' -}; +}); diff --git a/test/form/samples/array-element-tracking/array-spread/_config.js b/test/form/samples/array-element-tracking/array-spread/_config.js index 57b80f7746f..e5738bbdb72 100644 --- a/test/form/samples/array-element-tracking/array-spread/_config.js +++ b/test/form/samples/array-element-tracking/array-spread/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks elements of arrays with spread elements' -}; +}); diff --git a/test/form/samples/array-element-tracking/spread-element-deoptimization/_config.js b/test/form/samples/array-element-tracking/spread-element-deoptimization/_config.js index b1ce2636a6d..f47330df7c9 100644 --- a/test/form/samples/array-element-tracking/spread-element-deoptimization/_config.js +++ b/test/form/samples/array-element-tracking/spread-element-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes array spread elements' -}; +}); diff --git a/test/form/samples/arrow-function-call-parameters/_config.js b/test/form/samples/arrow-function-call-parameters/_config.js index 3ffe2078d48..345139a8424 100644 --- a/test/form/samples/arrow-function-call-parameters/_config.js +++ b/test/form/samples/arrow-function-call-parameters/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'take actual parameters into account when determining side-effects of calls to arrow functions' -}; +}); diff --git a/test/form/samples/arrow-function-return-values/_config.js b/test/form/samples/arrow-function-return-values/_config.js index ec78acb1bad..4b460ec2cd3 100644 --- a/test/form/samples/arrow-function-return-values/_config.js +++ b/test/form/samples/arrow-function-return-values/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'forwards return values of arrow functions' -}; +}); diff --git a/test/form/samples/assignment-to-array-buffer-view/_config.js b/test/form/samples/assignment-to-array-buffer-view/_config.js index 0984b6ee615..679ac3d7cf5 100644 --- a/test/form/samples/assignment-to-array-buffer-view/_config.js +++ b/test/form/samples/assignment-to-array-buffer-view/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'assignment to views of buffers should be kept', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/assignment-to-exports-class-declaration/_config.js b/test/form/samples/assignment-to-exports-class-declaration/_config.js index f4e1cb7acbd..a27f25c06bc 100644 --- a/test/form/samples/assignment-to-exports-class-declaration/_config.js +++ b/test/form/samples/assignment-to-exports-class-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not rewrite class expression IDs', options: { output: { name: 'myModule' } } -}; +}); diff --git a/test/form/samples/assignment-to-exports/_config.js b/test/form/samples/assignment-to-exports/_config.js index 015759bc6cc..6645300b3d2 100644 --- a/test/form/samples/assignment-to-exports/_config.js +++ b/test/form/samples/assignment-to-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'declares updated variable in ES output (#755)', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/assignment-to-global/_config.js b/test/form/samples/assignment-to-global/_config.js index c619f9549db..42e3bc5a127 100644 --- a/test/form/samples/assignment-to-global/_config.js +++ b/test/form/samples/assignment-to-global/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Assignments to global variables should be effects (#1587)' -}; +}); diff --git a/test/form/samples/async-function-effects/_config.js b/test/form/samples/async-function-effects/_config.js index dbb1913efe0..c08994c80e4 100644 --- a/test/form/samples/async-function-effects/_config.js +++ b/test/form/samples/async-function-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks effects when awaiting thenables' -}; +}); diff --git a/test/form/samples/async-function-unused/_config.js b/test/form/samples/async-function-unused/_config.js index 7a2ae9d0a21..1a58b514b2b 100644 --- a/test/form/samples/async-function-unused/_config.js +++ b/test/form/samples/async-function-unused/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treeshakes async functions (#492)' -}; +}); diff --git a/test/form/samples/automatic-semicolon-insertion-var/_config.js b/test/form/samples/automatic-semicolon-insertion-var/_config.js index f27e98a2fa0..67e616a9398 100644 --- a/test/form/samples/automatic-semicolon-insertion-var/_config.js +++ b/test/form/samples/automatic-semicolon-insertion-var/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Adds trailing semicolons for modules' -}; +}); diff --git a/test/form/samples/avoid-unnecessary-conditional-deopt/_config.js b/test/form/samples/avoid-unnecessary-conditional-deopt/_config.js index 2c7ad61c32a..a6f640732e4 100644 --- a/test/form/samples/avoid-unnecessary-conditional-deopt/_config.js +++ b/test/form/samples/avoid-unnecessary-conditional-deopt/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids unnecessary deoptimizations of conditional expressions' -}; +}); diff --git a/test/form/samples/banner-and-footer/_config.js b/test/form/samples/banner-and-footer/_config.js index ab91877aba2..544e64e192b 100644 --- a/test/form/samples/banner-and-footer/_config.js +++ b/test/form/samples/banner-and-footer/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds a banner/footer', options: { output: { @@ -26,4 +26,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/base64-deshadow/_config.js b/test/form/samples/base64-deshadow/_config.js index fec209a69a8..03c080c67cd 100644 --- a/test/form/samples/base64-deshadow/_config.js +++ b/test/form/samples/base64-deshadow/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'base64 deshadowing indices' -}; +}); diff --git a/test/form/samples/big-int/_config.js b/test/form/samples/big-int/_config.js index 2c32390904e..c6f4ffc6390 100644 --- a/test/form/samples/big-int/_config.js +++ b/test/form/samples/big-int/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports bigint via acorn plugin' -}; +}); diff --git a/test/form/samples/binary-expressions/_config.js b/test/form/samples/binary-expressions/_config.js index 1c861eec011..6c4ce271668 100644 --- a/test/form/samples/binary-expressions/_config.js +++ b/test/form/samples/binary-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles binary expression side-effects' -}; +}); diff --git a/test/form/samples/block-comments/_config.js b/test/form/samples/block-comments/_config.js index f18362ceace..73361adf2ad 100644 --- a/test/form/samples/block-comments/_config.js +++ b/test/form/samples/block-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'block comments are printed correctly' -}; +}); diff --git a/test/form/samples/body-less-for-loops/_config.js b/test/form/samples/body-less-for-loops/_config.js index a748fa03e69..56fc1879016 100644 --- a/test/form/samples/body-less-for-loops/_config.js +++ b/test/form/samples/body-less-for-loops/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports body-less for loops' -}; +}); diff --git a/test/form/samples/break-control-flow/break-statement-labels-in-loops/_config.js b/test/form/samples/break-control-flow/break-statement-labels-in-loops/_config.js index 08ea0622523..6f76737e2df 100644 --- a/test/form/samples/break-control-flow/break-statement-labels-in-loops/_config.js +++ b/test/form/samples/break-control-flow/break-statement-labels-in-loops/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles breaking to loops inside labeled statements' -}; +}); diff --git a/test/form/samples/break-control-flow/break-statement-labels-switch/_config.js b/test/form/samples/break-control-flow/break-statement-labels-switch/_config.js index ffce5a641d6..e158043ffe5 100644 --- a/test/form/samples/break-control-flow/break-statement-labels-switch/_config.js +++ b/test/form/samples/break-control-flow/break-statement-labels-switch/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports labels when breaking control flow from a switch statement' -}; +}); diff --git a/test/form/samples/break-control-flow/break-statement-labels/_config.js b/test/form/samples/break-control-flow/break-statement-labels/_config.js index 44fe205431f..a136d15a8a2 100644 --- a/test/form/samples/break-control-flow/break-statement-labels/_config.js +++ b/test/form/samples/break-control-flow/break-statement-labels/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports labels when breaking control flow' -}; +}); diff --git a/test/form/samples/break-control-flow/break-statement-loops/_config.js b/test/form/samples/break-control-flow/break-statement-loops/_config.js index dab03d4632d..482aae827ed 100644 --- a/test/form/samples/break-control-flow/break-statement-loops/_config.js +++ b/test/form/samples/break-control-flow/break-statement-loops/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'breaks control flow when a break statement is encountered inside a loop' -}; +}); diff --git a/test/form/samples/break-control-flow/caught-errors/_config.js b/test/form/samples/break-control-flow/caught-errors/_config.js index 618e294de16..d35b98aeb2b 100644 --- a/test/form/samples/break-control-flow/caught-errors/_config.js +++ b/test/form/samples/break-control-flow/caught-errors/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'breaks control flow when an error is thrown inside a catch block', options: { treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/form/samples/break-control-flow/hoisted-declarations/_config.js b/test/form/samples/break-control-flow/hoisted-declarations/_config.js index 6fddb43932a..5a4a5972ba0 100644 --- a/test/form/samples/break-control-flow/hoisted-declarations/_config.js +++ b/test/form/samples/break-control-flow/hoisted-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes hoisted declarations when control flow is broken' -}; +}); diff --git a/test/form/samples/break-control-flow/if-statement-breaks/_config.js b/test/form/samples/break-control-flow/if-statement-breaks/_config.js index 642237e7aa8..6bd7813c0d4 100644 --- a/test/form/samples/break-control-flow/if-statement-breaks/_config.js +++ b/test/form/samples/break-control-flow/if-statement-breaks/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles conditionally broken execution' -}; +}); diff --git a/test/form/samples/break-control-flow/if-statement-errors/_config.js b/test/form/samples/break-control-flow/if-statement-errors/_config.js index 5b83386fecd..4c883cfb4f9 100644 --- a/test/form/samples/break-control-flow/if-statement-errors/_config.js +++ b/test/form/samples/break-control-flow/if-statement-errors/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles conditionally thrown errors' -}; +}); diff --git a/test/form/samples/break-control-flow/loop-errors/_config.js b/test/form/samples/break-control-flow/loop-errors/_config.js index bd5c24a0782..1b181768427 100644 --- a/test/form/samples/break-control-flow/loop-errors/_config.js +++ b/test/form/samples/break-control-flow/loop-errors/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not break flow from inside loops that may not have executed' -}; +}); diff --git a/test/form/samples/break-control-flow/return-statements/_config.js b/test/form/samples/break-control-flow/return-statements/_config.js index f5f2cb40612..a933ee11ae3 100644 --- a/test/form/samples/break-control-flow/return-statements/_config.js +++ b/test/form/samples/break-control-flow/return-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'breaks control flow when a return statement is encountered' -}; +}); diff --git a/test/form/samples/break-control-flow/switch-errors/_config.js b/test/form/samples/break-control-flow/switch-errors/_config.js index 441dcd44f44..6f4b03f39dd 100644 --- a/test/form/samples/break-control-flow/switch-errors/_config.js +++ b/test/form/samples/break-control-flow/switch-errors/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles errors in switch statements' -}; +}); diff --git a/test/form/samples/break-control-flow/thrown-errors/_config.js b/test/form/samples/break-control-flow/thrown-errors/_config.js index 6ce1e181f39..72707c35869 100644 --- a/test/form/samples/break-control-flow/thrown-errors/_config.js +++ b/test/form/samples/break-control-flow/thrown-errors/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'breaks control flow when an error is thrown' -}; +}); diff --git a/test/form/samples/builtin-prototypes/array-expression/_config.js b/test/form/samples/builtin-prototypes/array-expression/_config.js index c18d1c7f176..60b267b0118 100644 --- a/test/form/samples/builtin-prototypes/array-expression/_config.js +++ b/test/form/samples/builtin-prototypes/array-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Tree-shake known array prototype functions' -}; +}); diff --git a/test/form/samples/builtin-prototypes/check-tree-shake-on-regexp-if-it-is-used/_config.js b/test/form/samples/builtin-prototypes/check-tree-shake-on-regexp-if-it-is-used/_config.js index 6001c39d55d..cf7620e7c12 100644 --- a/test/form/samples/builtin-prototypes/check-tree-shake-on-regexp-if-it-is-used/_config.js +++ b/test/form/samples/builtin-prototypes/check-tree-shake-on-regexp-if-it-is-used/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'check tree-shake on RegExp if it is used' -}; +}); diff --git a/test/form/samples/builtin-prototypes/literal/_config.js b/test/form/samples/builtin-prototypes/literal/_config.js index e137067cf34..0c4c0bcb5c9 100644 --- a/test/form/samples/builtin-prototypes/literal/_config.js +++ b/test/form/samples/builtin-prototypes/literal/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Tree-shake known literal prototype functions' -}; +}); diff --git a/test/form/samples/builtin-prototypes/object-expression/_config.js b/test/form/samples/builtin-prototypes/object-expression/_config.js index dae66a24375..d162735008e 100644 --- a/test/form/samples/builtin-prototypes/object-expression/_config.js +++ b/test/form/samples/builtin-prototypes/object-expression/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Tree-shake known object prototype functions', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/builtin-prototypes/side-effect-free-array-expression/_config.js b/test/form/samples/builtin-prototypes/side-effect-free-array-expression/_config.js index 1b91707852b..d91b2b29099 100644 --- a/test/form/samples/builtin-prototypes/side-effect-free-array-expression/_config.js +++ b/test/form/samples/builtin-prototypes/side-effect-free-array-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Tree-shakes side-effect-free array functions if only their return value is unused' -}; +}); diff --git a/test/form/samples/builtin-prototypes/template-literal/_config.js b/test/form/samples/builtin-prototypes/template-literal/_config.js index 5884ca08844..a8925db2195 100644 --- a/test/form/samples/builtin-prototypes/template-literal/_config.js +++ b/test/form/samples/builtin-prototypes/template-literal/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Tree-shake known string template literal prototype functions' -}; +}); diff --git a/test/form/samples/catch-parameter-shadowing/_config.js b/test/form/samples/catch-parameter-shadowing/_config.js index 9de0f865dcd..28cc5f4824d 100644 --- a/test/form/samples/catch-parameter-shadowing/_config.js +++ b/test/form/samples/catch-parameter-shadowing/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'the parameter of a catch block should correctly shadow an import (#1391)', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/chained-assignments/_config.js b/test/form/samples/chained-assignments/_config.js index ddbf4e78e64..d8661446143 100644 --- a/test/form/samples/chained-assignments/_config.js +++ b/test/form/samples/chained-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treeshakes chained assignments' -}; +}); diff --git a/test/form/samples/circular-member-expression/_config.js b/test/form/samples/circular-member-expression/_config.js index 119556fc1d2..8f953ebad08 100644 --- a/test/form/samples/circular-member-expression/_config.js +++ b/test/form/samples/circular-member-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'circular member expression' -}; +}); diff --git a/test/form/samples/class-constructor-side-effect/_config.js b/test/form/samples/class-constructor-side-effect/_config.js index 5c8a4a09e2c..1ea4bc2b9a5 100644 --- a/test/form/samples/class-constructor-side-effect/_config.js +++ b/test/form/samples/class-constructor-side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves side-effects in a class constructor (#1233)' -}; +}); diff --git a/test/form/samples/class-fields/_config.js b/test/form/samples/class-fields/_config.js index cacf9cc3917..829f1e2161d 100644 --- a/test/form/samples/class-fields/_config.js +++ b/test/form/samples/class-fields/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports class fields' -}; +}); diff --git a/test/form/samples/class-method-access/_config.js b/test/form/samples/class-method-access/_config.js index d44dede48ae..20c66a5b7be 100644 --- a/test/form/samples/class-method-access/_config.js +++ b/test/form/samples/class-method-access/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks side-effects when accessing class methods' -}; +}); diff --git a/test/form/samples/class-static-initialization-block/_config.js b/test/form/samples/class-static-initialization-block/_config.js index 97b51e58a07..75677c5825c 100644 --- a/test/form/samples/class-static-initialization-block/_config.js +++ b/test/form/samples/class-static-initialization-block/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports class static initialization blocks' -}; +}); diff --git a/test/form/samples/class-without-new/_config.js b/test/form/samples/class-without-new/_config.js index db77abbdd9e..3abc4ecaf35 100644 --- a/test/form/samples/class-without-new/_config.js +++ b/test/form/samples/class-without-new/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'instantiating a class without "new" is a side-effect' -}; +}); diff --git a/test/form/samples/comment-before-import/_config.js b/test/form/samples/comment-before-import/_config.js index 823ac6379a3..2638c8b47fd 100644 --- a/test/form/samples/comment-before-import/_config.js +++ b/test/form/samples/comment-before-import/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves comments before imports' -}; +}); diff --git a/test/form/samples/comment-start-inside-comment/_config.js b/test/form/samples/comment-start-inside-comment/_config.js index 29086152e27..ea795842cde 100644 --- a/test/form/samples/comment-start-inside-comment/_config.js +++ b/test/form/samples/comment-start-inside-comment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly remove coments above import statements' -}; +}); diff --git a/test/form/samples/compact-empty-external/_config.js b/test/form/samples/compact-empty-external/_config.js index d27624aaa2a..7a1148b6493 100644 --- a/test/form/samples/compact-empty-external/_config.js +++ b/test/form/samples/compact-empty-external/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles empty external imports in compact mode', options: { external: ['external'], @@ -6,4 +6,4 @@ module.exports = { compact: true } } -}; +}); diff --git a/test/form/samples/compact-multiple-imports/_config.js b/test/form/samples/compact-multiple-imports/_config.js index 83042b1631c..1c3c482df88 100644 --- a/test/form/samples/compact-multiple-imports/_config.js +++ b/test/form/samples/compact-multiple-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles empty external imports in compact mode', options: { external(id) { @@ -12,4 +12,4 @@ module.exports = { compact: true } } -}; +}); diff --git a/test/form/samples/compact-named-export/_config.js b/test/form/samples/compact-named-export/_config.js index 2b3a4cf92f8..2bff578ed53 100644 --- a/test/form/samples/compact-named-export/_config.js +++ b/test/form/samples/compact-named-export/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly handles named export live bindings in compact mode', options: { output: { @@ -6,4 +6,4 @@ module.exports = { compact: true } } -}; +}); diff --git a/test/form/samples/compact/_config.js b/test/form/samples/compact/_config.js index 084e647223d..635b3d6e16c 100644 --- a/test/form/samples/compact/_config.js +++ b/test/form/samples/compact/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports compact output with compact: true', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { @@ -12,4 +12,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/computed-member-expression-assignments/_config.js b/test/form/samples/computed-member-expression-assignments/_config.js index 28124ab2672..6016bd19538 100644 --- a/test/form/samples/computed-member-expression-assignments/_config.js +++ b/test/form/samples/computed-member-expression-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detect side-effects in assignments involving computed members' -}; +}); diff --git a/test/form/samples/computed-properties/_config.js b/test/form/samples/computed-properties/_config.js index f71657f27d2..d9a490fcfde 100644 --- a/test/form/samples/computed-properties/_config.js +++ b/test/form/samples/computed-properties/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'computed property keys include declarations of referenced identifiers', options: { output: { name: 'computedProperties' } } -}; +}); diff --git a/test/form/samples/conditional-expression-deopzimize-while-included/_config.js b/test/form/samples/conditional-expression-deopzimize-while-included/_config.js index 343a9689d60..1fd8e5d3fe0 100644 --- a/test/form/samples/conditional-expression-deopzimize-while-included/_config.js +++ b/test/form/samples/conditional-expression-deopzimize-while-included/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deoptimizations of logical expression while they are inlcuded (#3324)' -}; +}); diff --git a/test/form/samples/conditional-expression-paths/_config.js b/test/form/samples/conditional-expression-paths/_config.js index aadb52f877d..771fcdd4294 100644 --- a/test/form/samples/conditional-expression-paths/_config.js +++ b/test/form/samples/conditional-expression-paths/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'only retain branches with side-effects' -}; +}); diff --git a/test/form/samples/conditional-expression/_config.js b/test/form/samples/conditional-expression/_config.js index aadb52f877d..771fcdd4294 100644 --- a/test/form/samples/conditional-expression/_config.js +++ b/test/form/samples/conditional-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'only retain branches with side-effects' -}; +}); diff --git a/test/form/samples/conditional-put-parens-around-sequence/_config.js b/test/form/samples/conditional-put-parens-around-sequence/_config.js index a040c92d6de..7af20bb54c6 100644 --- a/test/form/samples/conditional-put-parens-around-sequence/_config.js +++ b/test/form/samples/conditional-put-parens-around-sequence/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'put parens around sequences if conditional simplified (#1311)' -}; +}); diff --git a/test/form/samples/configure-file-url/_config.js b/test/form/samples/configure-file-url/_config.js index 10db41d3835..779eb96e95f 100644 --- a/test/form/samples/configure-file-url/_config.js +++ b/test/form/samples/configure-file-url/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to configure file urls', options: { plugins: [ @@ -41,4 +41,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/conflicting-imports/_config.js b/test/form/samples/conflicting-imports/_config.js index 3c157f5752f..ecbf4da4b4f 100644 --- a/test/form/samples/conflicting-imports/_config.js +++ b/test/form/samples/conflicting-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'ensures bundle imports are deconflicted (#659)', options: { external: ['foo', 'bar'], @@ -9,4 +9,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/curried-function/_config.js b/test/form/samples/curried-function/_config.js index 8b932f491dd..6b66eac6a7e 100644 --- a/test/form/samples/curried-function/_config.js +++ b/test/form/samples/curried-function/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly handles a curried function' -}; +}); diff --git a/test/form/samples/custom-context/_config.js b/test/form/samples/custom-context/_config.js index 84f2dbd814e..721c615e5c4 100644 --- a/test/form/samples/custom-context/_config.js +++ b/test/form/samples/custom-context/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows custom context', options: { context: `lolwut` } -}; +}); diff --git a/test/form/samples/custom-dynamic-import-no-interop/_config.js b/test/form/samples/custom-dynamic-import-no-interop/_config.js index e381fb736ea..e475f2f16fe 100644 --- a/test/form/samples/custom-dynamic-import-no-interop/_config.js +++ b/test/form/samples/custom-dynamic-import-no-interop/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not add any interop when using a custom dynamic import handler', options: { external: 'external', @@ -11,4 +11,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/custom-module-context-function/_config.js b/test/form/samples/custom-module-context-function/_config.js index c10efdfacbe..02cc33a7f3d 100644 --- a/test/form/samples/custom-module-context-function/_config.js +++ b/test/form/samples/custom-module-context-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows custom module-specific context with a function option', expectedWarnings: ['THIS_IS_UNDEFINED'], options: { @@ -11,4 +11,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/custom-module-context/_config.js b/test/form/samples/custom-module-context/_config.js index 8b5dd23cbfb..edbf42050aa 100644 --- a/test/form/samples/custom-module-context/_config.js +++ b/test/form/samples/custom-module-context/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows custom module-specific context', expectedWarnings: ['THIS_IS_UNDEFINED'], options: { @@ -6,4 +6,4 @@ module.exports = { 'main.js': 'lolwut' } } -}; +}); diff --git a/test/form/samples/declarations-with-side-effects/_config.js b/test/form/samples/declarations-with-side-effects/_config.js index ac63c345d62..5faf89e46ea 100644 --- a/test/form/samples/declarations-with-side-effects/_config.js +++ b/test/form/samples/declarations-with-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains side-effects in declarations will tree-shaking the declared variable' -}; +}); diff --git a/test/form/samples/deconflict-format-specific-exports/_config.js b/test/form/samples/deconflict-format-specific-exports/_config.js index 3618b693baf..c6c49098b8c 100644 --- a/test/form/samples/deconflict-format-specific-exports/_config.js +++ b/test/form/samples/deconflict-format-specific-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'only deconflict "exports" for formats where it is necessary', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/deconflict-format-specific-globals/_config.js b/test/form/samples/deconflict-format-specific-globals/_config.js index 8b57b4a0a45..d2a7a5555d2 100644 --- a/test/form/samples/deconflict-format-specific-globals/_config.js +++ b/test/form/samples/deconflict-format-specific-globals/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts format specific globals', options: { external: 'external', @@ -9,4 +9,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/form/samples/deconflict-module-priority/_config.js b/test/form/samples/deconflict-module-priority/_config.js index 5ea1e7a90a8..e4c4470111d 100644 --- a/test/form/samples/deconflict-module-priority/_config.js +++ b/test/form/samples/deconflict-module-priority/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'prioritizes entry modules over dependencies when deconflicting' -}; +}); diff --git a/test/form/samples/deconflict-nested-tree-shaking/_config.js b/test/form/samples/deconflict-nested-tree-shaking/_config.js index f423de7c702..31edbb36b23 100644 --- a/test/form/samples/deconflict-nested-tree-shaking/_config.js +++ b/test/form/samples/deconflict-nested-tree-shaking/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not consider nested tree-shaken variables when deconflicting' -}; +}); diff --git a/test/form/samples/deconflict-tree-shaken-globals/_config.js b/test/form/samples/deconflict-tree-shaken-globals/_config.js index 233206fcd76..04f22a5df46 100644 --- a/test/form/samples/deconflict-tree-shaken-globals/_config.js +++ b/test/form/samples/deconflict-tree-shaken-globals/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not deconflict due to tree-shaken global variables' -}; +}); diff --git a/test/form/samples/deconflict-tree-shaken/_config.js b/test/form/samples/deconflict-tree-shaken/_config.js index 96c6ef18178..532265067e0 100644 --- a/test/form/samples/deconflict-tree-shaken/_config.js +++ b/test/form/samples/deconflict-tree-shaken/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not consider tree-shaken variables when deconflicting' -}; +}); diff --git a/test/form/samples/dedupes-external-imports/_config.js b/test/form/samples/dedupes-external-imports/_config.js index 937ee5ed574..ad7663004e3 100644 --- a/test/form/samples/dedupes-external-imports/_config.js +++ b/test/form/samples/dedupes-external-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'dedupes external imports', options: { external: ['external'], @@ -7,4 +7,4 @@ module.exports = { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/deep-properties-access/_config.js b/test/form/samples/deep-properties-access/_config.js index e71a93b8870..956a670519a 100644 --- a/test/form/samples/deep-properties-access/_config.js +++ b/test/form/samples/deep-properties-access/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deeply nested property accesses' -}; +}); diff --git a/test/form/samples/deep-properties/_config.js b/test/form/samples/deep-properties/_config.js index e721c6711ce..e5cf11beed1 100644 --- a/test/form/samples/deep-properties/_config.js +++ b/test/form/samples/deep-properties/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deeply nested properties', options: { treeshake: { propertyReadSideEffects: false } } -}; +}); diff --git a/test/form/samples/deep-switch-declarations/_config.js b/test/form/samples/deep-switch-declarations/_config.js index 1487e3c6852..4aa1aeb6fc3 100644 --- a/test/form/samples/deep-switch-declarations/_config.js +++ b/test/form/samples/deep-switch-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles hoisted declarations in deeply nested switch statements' -}; +}); diff --git a/test/form/samples/default-export-anonymous-class-extends/_config.js b/test/form/samples/default-export-anonymous-class-extends/_config.js index 2ed4457e53c..65912ad3180 100644 --- a/test/form/samples/default-export-anonymous-class-extends/_config.js +++ b/test/form/samples/default-export-anonymous-class-extends/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles default exported classes extending a regular expression argument (#4783)' -}; +}); diff --git a/test/form/samples/default-export-class/_config.js b/test/form/samples/default-export-class/_config.js index 0d37406db4c..997d2a8d2ce 100644 --- a/test/form/samples/default-export-class/_config.js +++ b/test/form/samples/default-export-class/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'puts the export after the declaration for default exported classes in SystemJS', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/default-export-live-binding/_config.js b/test/form/samples/default-export-live-binding/_config.js index 47ad69ccce6..675f20d281d 100644 --- a/test/form/samples/default-export-live-binding/_config.js +++ b/test/form/samples/default-export-live-binding/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows live bindings for default exports', options: { output: { exports: 'named', name: 'bundle' } } -}; +}); diff --git a/test/form/samples/default-export-mode/_config.js b/test/form/samples/default-export-mode/_config.js index bc4638b956c..789aed8b7b2 100644 --- a/test/form/samples/default-export-mode/_config.js +++ b/test/form/samples/default-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows specifying the export mode to be "default"', options: { output: { @@ -6,4 +6,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/default-identifier-deshadowing/_config.js b/test/form/samples/default-identifier-deshadowing/_config.js index 0b3f4bc1169..faad3154a60 100644 --- a/test/form/samples/default-identifier-deshadowing/_config.js +++ b/test/form/samples/default-identifier-deshadowing/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Handles export default identifier reassignment deshadowing' -}; +}); diff --git a/test/form/samples/define-es-modules-false/_config.js b/test/form/samples/define-es-modules-false/_config.js index 1d0b8ca8fbb..6eb138f0005 100644 --- a/test/form/samples/define-es-modules-false/_config.js +++ b/test/form/samples/define-es-modules-false/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Not add __esModule property to exports with esModule: false', options: { output: { name: 'foo', esModule: false } } -}; +}); diff --git a/test/form/samples/define-replacement/_config.js b/test/form/samples/define-replacement/_config.js index f9a9a68462f..941836792fd 100644 --- a/test/form/samples/define-replacement/_config.js +++ b/test/form/samples/define-replacement/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'amd.define', options: { output: { amd: { define: 'enifed' } } } -}; +}); diff --git a/test/form/samples/deopt-regexp-type/_config.js b/test/form/samples/deopt-regexp-type/_config.js index 18ccd606be5..d3d6ccd4b01 100644 --- a/test/form/samples/deopt-regexp-type/_config.js +++ b/test/form/samples/deopt-regexp-type/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes typeof for regular expressions to better support es6-sim' -}; +}); diff --git a/test/form/samples/deopt-string-concatenation/_config.js b/test/form/samples/deopt-string-concatenation/_config.js index 36697ba2394..5e71d1ff22d 100644 --- a/test/form/samples/deopt-string-concatenation/_config.js +++ b/test/form/samples/deopt-string-concatenation/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimize concatenation when used as an expression statement to better support es5-shim' -}; +}); diff --git a/test/form/samples/deoptimize-superclass/_config.js b/test/form/samples/deoptimize-superclass/_config.js index 584b0fc8c1a..29b322d218f 100644 --- a/test/form/samples/deoptimize-superclass/_config.js +++ b/test/form/samples/deoptimize-superclass/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not deoptimize the entire superclass when reassigning a property' -}; +}); diff --git a/test/form/samples/deoptimize-var-in-hoisted-scopes/_config.js b/test/form/samples/deoptimize-var-in-hoisted-scopes/_config.js index f4724f855fb..166268bbd08 100644 --- a/test/form/samples/deoptimize-var-in-hoisted-scopes/_config.js +++ b/test/form/samples/deoptimize-var-in-hoisted-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes var variables in hoisted scopes' -}; +}); diff --git a/test/form/samples/deprecated/dynamic-import-inlining-array/_config.js b/test/form/samples/deprecated/dynamic-import-inlining-array/_config.js index 8b750ef3779..c9bc009082c 100644 --- a/test/form/samples/deprecated/dynamic-import-inlining-array/_config.js +++ b/test/form/samples/deprecated/dynamic-import-inlining-array/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports an array with a single entry when inlining dynamic imports', options: { strictDeprecations: false, @@ -6,4 +6,4 @@ module.exports = { input: ['main'] }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/deprecated/dynamic-import-inlining/_config.js b/test/form/samples/deprecated/dynamic-import-inlining/_config.js index 5534cc63a4d..24984035481 100644 --- a/test/form/samples/deprecated/dynamic-import-inlining/_config.js +++ b/test/form/samples/deprecated/dynamic-import-inlining/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'dynamic import inlining', options: { strictDeprecations: false, inlineDynamicImports: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/deprecated/inlined-treeshaken-dynamic-import/_config.js b/test/form/samples/deprecated/inlined-treeshaken-dynamic-import/_config.js index c985d42f87a..eb10394b1c6 100644 --- a/test/form/samples/deprecated/inlined-treeshaken-dynamic-import/_config.js +++ b/test/form/samples/deprecated/inlined-treeshaken-dynamic-import/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'completely removes tree-shaken dynamic imports ', options: { strictDeprecations: false, inlineDynamicImports: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/deprecated/namespace-tostring/entry-default/_config.js b/test/form/samples/deprecated/namespace-tostring/entry-default/_config.js index 75a69ab246d..c9620e9be59 100644 --- a/test/form/samples/deprecated/namespace-tostring/entry-default/_config.js +++ b/test/form/samples/deprecated/namespace-tostring/entry-default/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not add Symbol.toStringTag property to entry chunks with default export mode', options: { strictDeprecations: false, @@ -9,4 +9,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/deprecated/namespace-tostring/entry-named/_config.js b/test/form/samples/deprecated/namespace-tostring/entry-named/_config.js index dd684cbd4a7..f4fb3cca8b9 100644 --- a/test/form/samples/deprecated/namespace-tostring/entry-named/_config.js +++ b/test/form/samples/deprecated/namespace-tostring/entry-named/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to entry chunks with named exports', options: { strictDeprecations: false, @@ -9,4 +9,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/deprecated/namespace-tostring/external-namespaces/_config.js b/test/form/samples/deprecated/namespace-tostring/external-namespaces/_config.js index 96f894d4437..55805d20a58 100644 --- a/test/form/samples/deprecated/namespace-tostring/external-namespaces/_config.js +++ b/test/form/samples/deprecated/namespace-tostring/external-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to external namespaces', options: { strictDeprecations: false, @@ -31,4 +31,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/deprecated/namespace-tostring/inlined-namespace/_config.js b/test/form/samples/deprecated/namespace-tostring/inlined-namespace/_config.js index 82bfcfb95aa..89d932bb835 100644 --- a/test/form/samples/deprecated/namespace-tostring/inlined-namespace/_config.js +++ b/test/form/samples/deprecated/namespace-tostring/inlined-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to inlined namespaces', options: { strictDeprecations: false, @@ -7,4 +7,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/deprecated/nested-inlined-dynamic-import/_config.js b/test/form/samples/deprecated/nested-inlined-dynamic-import/_config.js index a6ac9c10407..3f83388e591 100644 --- a/test/form/samples/deprecated/nested-inlined-dynamic-import/_config.js +++ b/test/form/samples/deprecated/nested-inlined-dynamic-import/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts variables when nested dynamic imports are inlined', options: { strictDeprecations: false, inlineDynamicImports: true }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/deprecated/prefer-const/_config.js b/test/form/samples/deprecated/prefer-const/_config.js index e160c9f6e0c..391e231224f 100644 --- a/test/form/samples/deprecated/prefer-const/_config.js +++ b/test/form/samples/deprecated/prefer-const/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses const instead of var if specified (#653)', options: { strictDeprecations: false, @@ -10,4 +10,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/duplicated-var-declarations/_config.js b/test/form/samples/duplicated-var-declarations/_config.js index 4c3038c2012..2eca0f76aaf 100644 --- a/test/form/samples/duplicated-var-declarations/_config.js +++ b/test/form/samples/duplicated-var-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not remove duplicated var declarations (#716)' -}; +}); diff --git a/test/form/samples/dynamic-import-inlining-array/_config.js b/test/form/samples/dynamic-import-inlining-array/_config.js index 81ad9e51008..c4c5dc7f83f 100644 --- a/test/form/samples/dynamic-import-inlining-array/_config.js +++ b/test/form/samples/dynamic-import-inlining-array/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports an array with a single entry when inlining dynamic imports', options: { output: { inlineDynamicImports: true }, input: ['main'] } -}; +}); diff --git a/test/form/samples/dynamic-import-inlining/_config.js b/test/form/samples/dynamic-import-inlining/_config.js index 7e80cf62b7f..2caca2c37f4 100644 --- a/test/form/samples/dynamic-import-inlining/_config.js +++ b/test/form/samples/dynamic-import-inlining/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'dynamic import inlining', options: { output: { inlineDynamicImports: true } } -}; +}); diff --git a/test/form/samples/dynamic-import-this-arrow/_config.js b/test/form/samples/dynamic-import-this-arrow/_config.js index 2a4145afc99..5b620219e72 100644 --- a/test/form/samples/dynamic-import-this-arrow/_config.js +++ b/test/form/samples/dynamic-import-this-arrow/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct "this" in dynamic imports when using arrow functions', options: { external: ['input', 'output'], @@ -8,4 +8,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/form/samples/dynamic-import-this-function/_config.js b/test/form/samples/dynamic-import-this-function/_config.js index 53feb9f5913..da5af99be6b 100644 --- a/test/form/samples/dynamic-import-this-function/_config.js +++ b/test/form/samples/dynamic-import-this-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct "this" in dynamic imports when not using arrow functions', options: { external: ['input', 'output'], @@ -8,4 +8,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/form/samples/dynamic-import-unresolvable/_config.js b/test/form/samples/dynamic-import-unresolvable/_config.js index 09f630f35c4..39468b093a4 100644 --- a/test/form/samples/dynamic-import-unresolvable/_config.js +++ b/test/form/samples/dynamic-import-unresolvable/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Returns the raw AST nodes for unresolvable dynamic imports', options: { plugins: [ @@ -22,4 +22,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/dynamic-resolvable-if-statements/_config.js b/test/form/samples/dynamic-resolvable-if-statements/_config.js index d091bcf95d1..545ec2eb94c 100644 --- a/test/form/samples/dynamic-resolvable-if-statements/_config.js +++ b/test/form/samples/dynamic-resolvable-if-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows using variables to resolve conditionals' -}; +}); diff --git a/test/form/samples/early-bind-member-expressions/_config.js b/test/form/samples/early-bind-member-expressions/_config.js index bfd03baa8d6..d18a55d5154 100644 --- a/test/form/samples/early-bind-member-expressions/_config.js +++ b/test/form/samples/early-bind-member-expressions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly resolves namespace members when accessed early (#2895)', options: { external: 'external' } -}; +}); diff --git a/test/form/samples/effect-in-for-of-loop-in-functions/_config.js b/test/form/samples/effect-in-for-of-loop-in-functions/_config.js index 0e80a63f4a0..dbdb827ab1a 100644 --- a/test/form/samples/effect-in-for-of-loop-in-functions/_config.js +++ b/test/form/samples/effect-in-for-of-loop-in-functions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes effects in for-of loop (#870)' -}; +}); diff --git a/test/form/samples/effect-in-for-of-loop/_config.js b/test/form/samples/effect-in-for-of-loop/_config.js index 0e80a63f4a0..dbdb827ab1a 100644 --- a/test/form/samples/effect-in-for-of-loop/_config.js +++ b/test/form/samples/effect-in-for-of-loop/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes effects in for-of loop (#870)' -}; +}); diff --git a/test/form/samples/emit-asset-file/_config.js b/test/form/samples/emit-asset-file/_config.js index a5a62467143..58f9ed6b258 100644 --- a/test/form/samples/emit-asset-file/_config.js +++ b/test/form/samples/emit-asset-file/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const { readFileSync } = require('node:fs'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports emitting assets from plugin hooks', options: { plugins: { @@ -35,4 +35,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/emit-file-tree-shaken-access/_config.js b/test/form/samples/emit-file-tree-shaken-access/_config.js index d3ed68a0676..4fd983969a0 100644 --- a/test/form/samples/emit-file-tree-shaken-access/_config.js +++ b/test/form/samples/emit-file-tree-shaken-access/_config.js @@ -1,7 +1,7 @@ const { readFileSync } = require('node:fs'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not include format globals when tree-shaking an asset access', options: { plugins: { @@ -21,4 +21,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/emit-uint8array-no-buffer/_config.js b/test/form/samples/emit-uint8array-no-buffer/_config.js index 60408dfb305..eb273130134 100644 --- a/test/form/samples/emit-uint8array-no-buffer/_config.js +++ b/test/form/samples/emit-uint8array-no-buffer/_config.js @@ -1,6 +1,6 @@ const Buffer = global.Buffer; -module.exports = { +module.exports = defineRollupTest({ description: 'supports emitting assets as Uint8Arrays when Buffer is not available', before() { delete global.Buffer; @@ -25,4 +25,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/empty-block-statement/_config.js b/test/form/samples/empty-block-statement/_config.js index 283b0b6931b..10069f0b59d 100644 --- a/test/form/samples/empty-block-statement/_config.js +++ b/test/form/samples/empty-block-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty block statement' -}; +}); diff --git a/test/form/samples/empty-do-while-statement/_config.js b/test/form/samples/empty-do-while-statement/_config.js index 00672ede4ed..bf22304b23d 100644 --- a/test/form/samples/empty-do-while-statement/_config.js +++ b/test/form/samples/empty-do-while-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty do-while statement' -}; +}); diff --git a/test/form/samples/empty-for-in-statement/_config.js b/test/form/samples/empty-for-in-statement/_config.js index b95837c9a9f..734a8d1d12a 100644 --- a/test/form/samples/empty-for-in-statement/_config.js +++ b/test/form/samples/empty-for-in-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty for-in statement' -}; +}); diff --git a/test/form/samples/empty-for-statement/_config.js b/test/form/samples/empty-for-statement/_config.js index f448ddf8e8b..e77b4719365 100644 --- a/test/form/samples/empty-for-statement/_config.js +++ b/test/form/samples/empty-for-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty for statement' -}; +}); diff --git a/test/form/samples/empty-if-statement/_config.js b/test/form/samples/empty-if-statement/_config.js index abea88980c5..63ee443dfbe 100644 --- a/test/form/samples/empty-if-statement/_config.js +++ b/test/form/samples/empty-if-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty if statement' -}; +}); diff --git a/test/form/samples/empty-statement-consequent/_config.js b/test/form/samples/empty-statement-consequent/_config.js index dc10538fbfb..d9f5bcf5305 100644 --- a/test/form/samples/empty-statement-consequent/_config.js +++ b/test/form/samples/empty-statement-consequent/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves empty statements used as the consequent of conditionals' -}; +}); diff --git a/test/form/samples/empty-statement/_config.js b/test/form/samples/empty-statement/_config.js index 76e4fa332b4..f416707d1d8 100644 --- a/test/form/samples/empty-statement/_config.js +++ b/test/form/samples/empty-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty statement' -}; +}); diff --git a/test/form/samples/empty-switch-statement/_config.js b/test/form/samples/empty-switch-statement/_config.js index 29c051733d4..168f1b00ae8 100644 --- a/test/form/samples/empty-switch-statement/_config.js +++ b/test/form/samples/empty-switch-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty switch statement' -}; +}); diff --git a/test/form/samples/empty-try-catch-statement/_config.js b/test/form/samples/empty-try-catch-statement/_config.js index 70bf6529913..3c0bfbef66b 100644 --- a/test/form/samples/empty-try-catch-statement/_config.js +++ b/test/form/samples/empty-try-catch-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty try-catch-finally statement' -}; +}); diff --git a/test/form/samples/empty-while-statement/_config.js b/test/form/samples/empty-while-statement/_config.js index 8db2e7f8646..29bb30347c0 100644 --- a/test/form/samples/empty-while-statement/_config.js +++ b/test/form/samples/empty-while-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes an empty while statement' -}; +}); diff --git a/test/form/samples/enforce-addon-order/_config.js b/test/form/samples/enforce-addon-order/_config.js index 0814c90772b..86da8b11650 100644 --- a/test/form/samples/enforce-addon-order/_config.js +++ b/test/form/samples/enforce-addon-order/_config.js @@ -24,9 +24,9 @@ function addPlugin(order) { plugins.push(plugin, stringPlugin); } -module.exports = { +module.exports = defineRollupTest({ description: 'allows to enforce addon order', options: { plugins } -}; +}); diff --git a/test/form/samples/entry-with-unused-synthetic-exports/_config.js b/test/form/samples/entry-with-unused-synthetic-exports/_config.js index 00f9a60009b..2762dd5e904 100644 --- a/test/form/samples/entry-with-unused-synthetic-exports/_config.js +++ b/test/form/samples/entry-with-unused-synthetic-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not include unused synthetic namespace object in entry points', options: { plugins: { @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/erroneous-nested-member-expression/_config.js b/test/form/samples/erroneous-nested-member-expression/_config.js index 684fe7cc0b8..c8fa9d0c2fe 100644 --- a/test/form/samples/erroneous-nested-member-expression/_config.js +++ b/test/form/samples/erroneous-nested-member-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'erroneous nested member expression does not mess up naming' -}; +}); diff --git a/test/form/samples/exclude-unnecessary-modifications/_config.js b/test/form/samples/exclude-unnecessary-modifications/_config.js index 2b3de2b830a..eacb6b6d6d2 100644 --- a/test/form/samples/exclude-unnecessary-modifications/_config.js +++ b/test/form/samples/exclude-unnecessary-modifications/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'statements that modify definitions within unused functions are excluded' -}; +}); diff --git a/test/form/samples/exponentiation-operator/_config.js b/test/form/samples/exponentiation-operator/_config.js index 34bf4b764f9..5c0f1968056 100644 --- a/test/form/samples/exponentiation-operator/_config.js +++ b/test/form/samples/exponentiation-operator/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'folds exponentiation operator when considering dead code' -}; +}); diff --git a/test/form/samples/export-all-before-named/_config.js b/test/form/samples/export-all-before-named/_config.js index b84d76b6669..2e7fb5f059d 100644 --- a/test/form/samples/export-all-before-named/_config.js +++ b/test/form/samples/export-all-before-named/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external `export *` must not interfere with internal exports', options: { output: { @@ -7,4 +7,4 @@ module.exports = { }, external: ['external'] } -}; +}); diff --git a/test/form/samples/export-all-from-internal/_config.js b/test/form/samples/export-all-from-internal/_config.js index da1154dcb29..af418a7041a 100644 --- a/test/form/samples/export-all-from-internal/_config.js +++ b/test/form/samples/export-all-from-internal/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'should be able to export * from the bundle', options: { output: { name: 'exposedInternals' } } -}; +}); diff --git a/test/form/samples/export-all-multiple/_config.js b/test/form/samples/export-all-multiple/_config.js index e66c29bacbc..b824a07d71d 100644 --- a/test/form/samples/export-all-multiple/_config.js +++ b/test/form/samples/export-all-multiple/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles multiple export * declarations (#1252)', options: { external: ['foo', 'bar', 'baz'], @@ -7,4 +7,4 @@ module.exports = { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/export-default-2/_config.js b/test/form/samples/export-default-2/_config.js index 76310657af8..f2c8c1f468c 100644 --- a/test/form/samples/export-default-2/_config.js +++ b/test/form/samples/export-default-2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exporting a default export', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/export-default-3/_config.js b/test/form/samples/export-default-3/_config.js index 76310657af8..f2c8c1f468c 100644 --- a/test/form/samples/export-default-3/_config.js +++ b/test/form/samples/export-default-3/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exporting a default export', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/export-default-4/_config.js b/test/form/samples/export-default-4/_config.js index a3d71b3ae40..94f3ea94108 100644 --- a/test/form/samples/export-default-4/_config.js +++ b/test/form/samples/export-default-4/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'single default export in deep namespace', options: { output: { name: 'my.global.namespace' } } -}; +}); diff --git a/test/form/samples/export-default-anonymous-declarations/_config.js b/test/form/samples/export-default-anonymous-declarations/_config.js index 954cb9097f7..2939cea4bdf 100644 --- a/test/form/samples/export-default-anonymous-declarations/_config.js +++ b/test/form/samples/export-default-anonymous-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'export default [Declaration] with spaces and comments' -}; +}); diff --git a/test/form/samples/export-default-global/_config.js b/test/form/samples/export-default-global/_config.js index aa46da8cf0b..f2ff86f2de4 100644 --- a/test/form/samples/export-default-global/_config.js +++ b/test/form/samples/export-default-global/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles default exporting global variables', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/export-default-import/_config.js b/test/form/samples/export-default-import/_config.js index db487edf7b3..39f40ed04f3 100644 --- a/test/form/samples/export-default-import/_config.js +++ b/test/form/samples/export-default-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly exports a default import, even in ES mode (#513)', options: { external: ['x'], @@ -8,4 +8,4 @@ module.exports = { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/export-default/_config.js b/test/form/samples/export-default/_config.js index dd454c4c39f..519d4665906 100644 --- a/test/form/samples/export-default/_config.js +++ b/test/form/samples/export-default/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'single (default) exports', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/export-globals/_config.js b/test/form/samples/export-globals/_config.js index 2c6a4f4f9a0..6bc3bf2993a 100644 --- a/test/form/samples/export-globals/_config.js +++ b/test/form/samples/export-globals/_config.js @@ -1,11 +1,11 @@ // Changed due to https://github.com/acornjs/acorn/issues/806 // Consider reverting this change should this become an acorn option -module.exports = { +module.exports = defineRollupTest({ description: 'Supports reexports of globals with namespace access', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/export-internal-namespace-as/_config.js b/test/form/samples/export-internal-namespace-as/_config.js index 71792b71529..acde278b158 100644 --- a/test/form/samples/export-internal-namespace-as/_config.js +++ b/test/form/samples/export-internal-namespace-as/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports exporting and resolving internal namespaces as names' -}; +}); diff --git a/test/form/samples/export-live-bindings/_config.js b/test/form/samples/export-live-bindings/_config.js index 5e9f7bd8115..7629ec97daa 100644 --- a/test/form/samples/export-live-bindings/_config.js +++ b/test/form/samples/export-live-bindings/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'exported live bindings', options: { output: { name: 'iife' } } -}; +}); diff --git a/test/form/samples/export-multiple-vars/_config.js b/test/form/samples/export-multiple-vars/_config.js index 6e8403586ac..c00b96f6dfb 100644 --- a/test/form/samples/export-multiple-vars/_config.js +++ b/test/form/samples/export-multiple-vars/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'splits up multiple vars in a single export declaration' -}; +}); diff --git a/test/form/samples/export-namespace-as/_config.js b/test/form/samples/export-namespace-as/_config.js index 81eb160f2ee..98f5a232fe0 100644 --- a/test/form/samples/export-namespace-as/_config.js +++ b/test/form/samples/export-namespace-as/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports exporting namespaces as names in entry points', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/exported-class-declaration-conflict/_config.js b/test/form/samples/exported-class-declaration-conflict/_config.js index 3c601ee8f95..5906ed0e73f 100644 --- a/test/form/samples/exported-class-declaration-conflict/_config.js +++ b/test/form/samples/exported-class-declaration-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles exporting class declarations with name conflicts in SystemJS', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/exports-at-end-if-possible/_config.js b/test/form/samples/exports-at-end-if-possible/_config.js index 7399d554c73..152315e0c6c 100644 --- a/test/form/samples/exports-at-end-if-possible/_config.js +++ b/test/form/samples/exports-at-end-if-possible/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'exports variables at end, if possible', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/extend-exports/_config.js b/test/form/samples/extend-exports/_config.js index b2f3aac6c76..8faac2b9644 100644 --- a/test/form/samples/extend-exports/_config.js +++ b/test/form/samples/extend-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'extends module correctly', options: { output: { @@ -6,4 +6,4 @@ module.exports = { name: 'foo' } } -}; +}); diff --git a/test/form/samples/extend-namespaced-exports/_config.js b/test/form/samples/extend-namespaced-exports/_config.js index eece0816e6b..80f1f9d69d7 100644 --- a/test/form/samples/extend-namespaced-exports/_config.js +++ b/test/form/samples/extend-namespaced-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'extends namespaced module name', options: { output: { @@ -6,4 +6,4 @@ module.exports = { name: 'foo.bar.baz' } } -}; +}); diff --git a/test/form/samples/external-deshadowing/_config.js b/test/form/samples/external-deshadowing/_config.js index d46d28e9e6c..324033b0352 100644 --- a/test/form/samples/external-deshadowing/_config.js +++ b/test/form/samples/external-deshadowing/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Externals aliases with deshadowing', options: { external: ['a', 'b'], @@ -7,4 +7,4 @@ module.exports = { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/external-empty-import-no-global-b/_config.js b/test/form/samples/external-empty-import-no-global-b/_config.js index 531386bd5b6..28b1e1ae5e5 100644 --- a/test/form/samples/external-empty-import-no-global-b/_config.js +++ b/test/form/samples/external-empty-import-no-global-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not expect a global to be provided for empty imports (#1217)', options: { external: ['babel-polyfill', 'other'], @@ -10,4 +10,4 @@ module.exports = { globals: { other: 'other' } } } -}; +}); diff --git a/test/form/samples/external-empty-import-no-global/_config.js b/test/form/samples/external-empty-import-no-global/_config.js index 8895d91054e..9972312ec90 100644 --- a/test/form/samples/external-empty-import-no-global/_config.js +++ b/test/form/samples/external-empty-import-no-global/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not expect a global to be provided for empty imports (#1217)', options: { external: ['babel-polyfill'], @@ -9,4 +9,4 @@ module.exports = { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/external-export-tracing/_config.js b/test/form/samples/external-export-tracing/_config.js index f4140c4ed86..181c0fec652 100644 --- a/test/form/samples/external-export-tracing/_config.js +++ b/test/form/samples/external-export-tracing/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Support external namespace reexport', options: { external: ['external'], @@ -7,4 +7,4 @@ module.exports = { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/external-import-alias-shadow/_config.js b/test/form/samples/external-import-alias-shadow/_config.js index acc8ed78eb7..16f2491f91d 100644 --- a/test/form/samples/external-import-alias-shadow/_config.js +++ b/test/form/samples/external-import-alias-shadow/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles external aliased named imports that shadow another name', options: { external: ['acorn'], @@ -6,4 +6,4 @@ module.exports = { globals: { acorn: 'acorn' } } } -}; +}); diff --git a/test/form/samples/external-import-order/_config.js b/test/form/samples/external-import-order/_config.js index d35e42d0265..b3141e6357e 100644 --- a/test/form/samples/external-import-order/_config.js +++ b/test/form/samples/external-import-order/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Retain the execution order of external imports', options: { external(id) { return id.startsWith('external'); } } -}; +}); diff --git a/test/form/samples/external-imports-custom-names-function/_config.js b/test/form/samples/external-imports-custom-names-function/_config.js index 188a8841c56..82f1e3f0273 100644 --- a/test/form/samples/external-imports-custom-names-function/_config.js +++ b/test/form/samples/external-imports-custom-names-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows globals to be specified as a function', options: { external: ['a-b-c'], @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/external-imports-custom-names/_config.js b/test/form/samples/external-imports-custom-names/_config.js index f614da0d314..248f740e31a 100644 --- a/test/form/samples/external-imports-custom-names/_config.js +++ b/test/form/samples/external-imports-custom-names/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows global names to be specified for IIFE/UMD exports', options: { external: ['jquery'], output: { globals: { jquery: 'jQuery' } } } -}; +}); diff --git a/test/form/samples/external-imports/_config.js b/test/form/samples/external-imports/_config.js index 46cde903266..2fe95aadc13 100644 --- a/test/form/samples/external-imports/_config.js +++ b/test/form/samples/external-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'prefixes global names with `global.` when creating UMD bundle (#57)', expectedWarnings: ['UNUSED_EXTERNAL_IMPORT'], options: { @@ -12,4 +12,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/external-namespace-and-named/_config.js b/test/form/samples/external-namespace-and-named/_config.js index 836a753798a..d4a97409ed1 100644 --- a/test/form/samples/external-namespace-and-named/_config.js +++ b/test/form/samples/external-namespace-and-named/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Correctly handles external namespace tracing with both namespace and named exports', options: { external: ['foo'], @@ -6,4 +6,4 @@ module.exports = { globals: { foo: 'foo' } } } -}; +}); diff --git a/test/form/samples/external-namespace-reexport/_config.js b/test/form/samples/external-namespace-reexport/_config.js index 7e15b263f44..2bf17a8d48e 100644 --- a/test/form/samples/external-namespace-reexport/_config.js +++ b/test/form/samples/external-namespace-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Support external namespace reexport', options: { external: ['highcharts'], @@ -7,4 +7,4 @@ module.exports = { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/for-in-scopes/_config.js b/test/form/samples/for-in-scopes/_config.js index 96ccae80614..0e208e5ef7a 100644 --- a/test/form/samples/for-in-scopes/_config.js +++ b/test/form/samples/for-in-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly associate or shadow variables in and around for-in-loops' -}; +}); diff --git a/test/form/samples/for-loop-assignment/_config.js b/test/form/samples/for-loop-assignment/_config.js index 120cbe0c1b7..e3d33db576e 100644 --- a/test/form/samples/for-loop-assignment/_config.js +++ b/test/form/samples/for-loop-assignment/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes assignments with computed indexes in for loops', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/for-loop-body-var-declaration/_config.js b/test/form/samples/for-loop-body-var-declaration/_config.js index 9a0504cf967..678798da278 100644 --- a/test/form/samples/for-loop-body-var-declaration/_config.js +++ b/test/form/samples/for-loop-body-var-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'use a newline for line wraps removing a necessary semicolon (#1275)' -}; +}); diff --git a/test/form/samples/for-loop-with-empty-head/_config.js b/test/form/samples/for-loop-with-empty-head/_config.js index 3fc4a6756e5..d5f2f64d113 100644 --- a/test/form/samples/for-loop-with-empty-head/_config.js +++ b/test/form/samples/for-loop-with-empty-head/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles for loop with empty head' -}; +}); diff --git a/test/form/samples/for-of-scopes/_config.js b/test/form/samples/for-of-scopes/_config.js index 4d8d348e4a4..d62a6f28f57 100644 --- a/test/form/samples/for-of-scopes/_config.js +++ b/test/form/samples/for-of-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly associate or shadow variables in and around for-of-loops' -}; +}); diff --git a/test/form/samples/for-scopes/_config.js b/test/form/samples/for-scopes/_config.js index 552d2e34790..de93621f9c9 100644 --- a/test/form/samples/for-scopes/_config.js +++ b/test/form/samples/for-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly associate or shadow variables in and around for-loops' -}; +}); diff --git a/test/form/samples/freeze/_config.js b/test/form/samples/freeze/_config.js index f21ca943d82..4b750232c6d 100644 --- a/test/form/samples/freeze/_config.js +++ b/test/form/samples/freeze/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports opt-ing out of usage of Object.freeze', options: { output: { name: 'myBundle', freeze: false } } -}; +}); diff --git a/test/form/samples/function-body-return-values/_config.js b/test/form/samples/function-body-return-values/_config.js index 4fd56e83a8a..ffd7bf40fdb 100644 --- a/test/form/samples/function-body-return-values/_config.js +++ b/test/form/samples/function-body-return-values/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly extract return values from function bodies' -}; +}); diff --git a/test/form/samples/function-call-parameters/_config.js b/test/form/samples/function-call-parameters/_config.js index bbbe71969f8..0018dcaa5da 100644 --- a/test/form/samples/function-call-parameters/_config.js +++ b/test/form/samples/function-call-parameters/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'take actual parameters into account when determining side-effects of calls to functions' -}; +}); diff --git a/test/form/samples/function-iterable-prototype/_config.js b/test/form/samples/function-iterable-prototype/_config.js index a4bea7d5c41..5e60497e737 100644 --- a/test/form/samples/function-iterable-prototype/_config.js +++ b/test/form/samples/function-iterable-prototype/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Removes unused functions where the prototype is iterable', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/function-mutation/_config.js b/test/form/samples/function-mutation/_config.js index daf7066a19e..4911b805d2d 100644 --- a/test/form/samples/function-mutation/_config.js +++ b/test/form/samples/function-mutation/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'function-mutations do not have effects', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/function-scopes/_config.js b/test/form/samples/function-scopes/_config.js index 5b8670f6496..db79e63f5fd 100644 --- a/test/form/samples/function-scopes/_config.js +++ b/test/form/samples/function-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly associate or shadow variables in and around functions' -}; +}); diff --git a/test/form/samples/generated-code-compact/arrow-functions-false/_config.js b/test/form/samples/generated-code-compact/arrow-functions-false/_config.js index 59b4aa1015e..11f7d936035 100644 --- a/test/form/samples/generated-code-compact/arrow-functions-false/_config.js +++ b/test/form/samples/generated-code-compact/arrow-functions-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not use arrow functions', options: { external: [ @@ -31,4 +31,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/generated-code-compact/arrow-functions-true/_config.js b/test/form/samples/generated-code-compact/arrow-functions-true/_config.js index 23d7c2f799c..22fdc661345 100644 --- a/test/form/samples/generated-code-compact/arrow-functions-true/_config.js +++ b/test/form/samples/generated-code-compact/arrow-functions-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses arrow functions', options: { external: [ @@ -31,4 +31,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/generated-code-compact/const-bindings-false/_config.js b/test/form/samples/generated-code-compact/const-bindings-false/_config.js index 2fb5b8ce3f2..7c0d08061a4 100644 --- a/test/form/samples/generated-code-compact/const-bindings-false/_config.js +++ b/test/form/samples/generated-code-compact/const-bindings-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not use block bindings', expectedWarnings: ['SHIMMED_EXPORT'], options: { @@ -22,4 +22,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code-compact/const-bindings-true/_config.js b/test/form/samples/generated-code-compact/const-bindings-true/_config.js index 28048b41d2b..9265f9f753b 100644 --- a/test/form/samples/generated-code-compact/const-bindings-true/_config.js +++ b/test/form/samples/generated-code-compact/const-bindings-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses block bindings', expectedWarnings: ['SHIMMED_EXPORT'], options: { @@ -22,4 +22,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code-compact/object-shorthand-false/_config.js b/test/form/samples/generated-code-compact/object-shorthand-false/_config.js index c5c515a1007..c9a001f24b1 100644 --- a/test/form/samples/generated-code-compact/object-shorthand-false/_config.js +++ b/test/form/samples/generated-code-compact/object-shorthand-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not use object shorthand syntax', options: { output: { @@ -9,4 +9,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/generated-code-compact/object-shorthand-true/_config.js b/test/form/samples/generated-code-compact/object-shorthand-true/_config.js index 3b83da66685..8174a734e2d 100644 --- a/test/form/samples/generated-code-compact/object-shorthand-true/_config.js +++ b/test/form/samples/generated-code-compact/object-shorthand-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses object shorthand syntax', options: { output: { @@ -9,4 +9,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-false-no-external-live-bindings/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-false-no-external-live-bindings/_config.js index f31104e00eb..8fb76684d27 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-false-no-external-live-bindings/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-false-no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props when external live-bindings are off', options: { external: ['external'], @@ -11,4 +11,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js index 0fff50bba3a..75346a26594 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props', options: { external: ['external', 'external2', 'externalDefaultOnly'], @@ -20,4 +20,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-true-no-external-live-bindings/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-true-no-external-live-bindings/_config.js index dda576dc7c1..a7f9903f2dd 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-true-no-external-live-bindings/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-true-no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props when external live-bindings are off', options: { external: ['external'], @@ -11,4 +11,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js index 5687b9a5fa4..f01cb5e2587 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props', options: { external: ['external', 'external2', 'externalDefaultOnly'], @@ -20,4 +20,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code-presets/es2015/_config.js b/test/form/samples/generated-code-presets/es2015/_config.js index d7c50dc505d..2077a015402 100644 --- a/test/form/samples/generated-code-presets/es2015/_config.js +++ b/test/form/samples/generated-code-presets/es2015/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles generatedCode preset "es2015"', options: { output: { @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code-presets/es5/_config.js b/test/form/samples/generated-code-presets/es5/_config.js index 68a18eeb17f..59503e74832 100644 --- a/test/form/samples/generated-code-presets/es5/_config.js +++ b/test/form/samples/generated-code-presets/es5/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles generatedCode preset "es5"', options: { output: { @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code-presets/preset-with-override/_config.js b/test/form/samples/generated-code-presets/preset-with-override/_config.js index e1e1da04319..ed00d1d7ec1 100644 --- a/test/form/samples/generated-code-presets/preset-with-override/_config.js +++ b/test/form/samples/generated-code-presets/preset-with-override/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles generatedCode preset "es2015"', options: { output: { @@ -22,4 +22,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code/arrow-functions-false/_config.js b/test/form/samples/generated-code/arrow-functions-false/_config.js index 3cf005ea0c0..14790217621 100644 --- a/test/form/samples/generated-code/arrow-functions-false/_config.js +++ b/test/form/samples/generated-code/arrow-functions-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not use arrow functions', options: { external: [ @@ -30,4 +30,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/generated-code/arrow-functions-true/_config.js b/test/form/samples/generated-code/arrow-functions-true/_config.js index 8ac55b955bd..bd3bd911279 100644 --- a/test/form/samples/generated-code/arrow-functions-true/_config.js +++ b/test/form/samples/generated-code/arrow-functions-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses arrow functions', options: { external: [ @@ -30,4 +30,4 @@ module.exports = { } }, expectedWarnings: ['DEPRECATED_FEATURE'] -}; +}); diff --git a/test/form/samples/generated-code/const-bindings-false/_config.js b/test/form/samples/generated-code/const-bindings-false/_config.js index 2cb64b60a47..83f80bbec49 100644 --- a/test/form/samples/generated-code/const-bindings-false/_config.js +++ b/test/form/samples/generated-code/const-bindings-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not use block bindings', expectedWarnings: ['SHIMMED_EXPORT'], options: { @@ -21,4 +21,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code/const-bindings-true/_config.js b/test/form/samples/generated-code/const-bindings-true/_config.js index e02a884ab9e..2c4742583ad 100644 --- a/test/form/samples/generated-code/const-bindings-true/_config.js +++ b/test/form/samples/generated-code/const-bindings-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses block bindings', expectedWarnings: ['SHIMMED_EXPORT'], options: { @@ -21,4 +21,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code/object-shorthand-false/_config.js b/test/form/samples/generated-code/object-shorthand-false/_config.js index 3213ea6f5d1..2433cd854f3 100644 --- a/test/form/samples/generated-code/object-shorthand-false/_config.js +++ b/test/form/samples/generated-code/object-shorthand-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not use object shorthand syntax', options: { output: { @@ -8,4 +8,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/generated-code/object-shorthand-true/_config.js b/test/form/samples/generated-code/object-shorthand-true/_config.js index b453e6ff0e2..9c3b5120b2f 100644 --- a/test/form/samples/generated-code/object-shorthand-true/_config.js +++ b/test/form/samples/generated-code/object-shorthand-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses object shorthand syntax', options: { output: { @@ -8,4 +8,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/generated-code/reserved-names-as-props-false-no-external-live-bindings/_config.js b/test/form/samples/generated-code/reserved-names-as-props-false-no-external-live-bindings/_config.js index 18dbe14d544..8fa516c69a4 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-false-no-external-live-bindings/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-false-no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props when external live-bindings are off', options: { external: ['external'], @@ -10,4 +10,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/generated-code/reserved-names-as-props-false/_config.js b/test/form/samples/generated-code/reserved-names-as-props-false/_config.js index 6f5456496a2..b3b555d8de5 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-false/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props', options: { external: ['external', 'external2', 'externalDefaultOnly'], @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/generated-code/reserved-names-as-props-true-no-external-live-bindings/_config.js b/test/form/samples/generated-code/reserved-names-as-props-true-no-external-live-bindings/_config.js index 60cf1f3f1f3..9ec41583287 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-true-no-external-live-bindings/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-true-no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props when external live-bindings are off', options: { external: ['external'], @@ -10,4 +10,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/generated-code/reserved-names-as-props-true/_config.js b/test/form/samples/generated-code/reserved-names-as-props-true/_config.js index c53af0ef6e6..a016b187f5a 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-true/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'escapes reserved names used as props', options: { external: ['external', 'external2', 'externalDefaultOnly'], @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/getter-return-values/_config.js b/test/form/samples/getter-return-values/_config.js index 0c6bc6a1647..809dd3d97b3 100644 --- a/test/form/samples/getter-return-values/_config.js +++ b/test/form/samples/getter-return-values/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'forwards return values of getters' -}; +}); diff --git a/test/form/samples/globals-function/_config.js b/test/form/samples/globals-function/_config.js index 8c1bcef98a3..2218245df7e 100644 --- a/test/form/samples/globals-function/_config.js +++ b/test/form/samples/globals-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Externals aliases with deshadowing', options: { external: ['a', 'b'], @@ -7,4 +7,4 @@ module.exports = { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/globals-removes-access-to-pure-function-members/_config.js b/test/form/samples/globals-removes-access-to-pure-function-members/_config.js index af2c4421073..134787712d4 100644 --- a/test/form/samples/globals-removes-access-to-pure-function-members/_config.js +++ b/test/form/samples/globals-removes-access-to-pure-function-members/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'accessing members of pure functions and their prototypes is not a side-effect' -}; +}); diff --git a/test/form/samples/guessed-global-names/_config.js b/test/form/samples/guessed-global-names/_config.js index 218577109db..e89a0ff090f 100644 --- a/test/form/samples/guessed-global-names/_config.js +++ b/test/form/samples/guessed-global-names/_config.js @@ -1,6 +1,6 @@ const { resolve } = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'guesses global names if necessary', expectedWarnings: ['MISSING_GLOBAL_NAME'], options: { @@ -12,4 +12,4 @@ module.exports = { resolve(__dirname, 'relative.js') ] } -}; +}); diff --git a/test/form/samples/handles-async-await/_config.js b/test/form/samples/handles-async-await/_config.js index 9c17f942ab8..ac44c37ae13 100644 --- a/test/form/samples/handles-async-await/_config.js +++ b/test/form/samples/handles-async-await/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly handles exporting async functions' -}; +}); diff --git a/test/form/samples/handles-empty-imports-iife/_config.js b/test/form/samples/handles-empty-imports-iife/_config.js index d20eb8d00a8..3c19f3cadad 100644 --- a/test/form/samples/handles-empty-imports-iife/_config.js +++ b/test/form/samples/handles-empty-imports-iife/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles empty imports when generating IIFE output', expectedWarnings: ['MISSING_NODE_BUILTINS', 'UNRESOLVED_IMPORT'], options: { @@ -11,4 +11,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/handles-empty-imports-umd/_config.js b/test/form/samples/handles-empty-imports-umd/_config.js index 7caa9a477ac..4ea87a66b72 100644 --- a/test/form/samples/handles-empty-imports-umd/_config.js +++ b/test/form/samples/handles-empty-imports-umd/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles empty imports when generating IIFE output', expectedWarnings: ['MISSING_NODE_BUILTINS', 'UNRESOLVED_IMPORT'], options: { @@ -11,4 +11,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/hashbang/_config.js b/test/form/samples/hashbang/_config.js index f19d68bd304..3bbf86a1bdb 100644 --- a/test/form/samples/hashbang/_config.js +++ b/test/form/samples/hashbang/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports input files with leading hashbang comment' -}; +}); diff --git a/test/form/samples/hoisted-unused-conditional/_config.js b/test/form/samples/hoisted-unused-conditional/_config.js index ebb7fcbcec3..f51dcc48d23 100644 --- a/test/form/samples/hoisted-unused-conditional/_config.js +++ b/test/form/samples/hoisted-unused-conditional/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Properly renders conditionals in hoisted variables in dead branches' -}; +}); diff --git a/test/form/samples/hoisted-variable-case-stmt/_config.js b/test/form/samples/hoisted-variable-case-stmt/_config.js index f4ec792209e..0d62218c41e 100644 --- a/test/form/samples/hoisted-variable-case-stmt/_config.js +++ b/test/form/samples/hoisted-variable-case-stmt/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Properly handles a variable hoisted from within a fallthrough switch case' -}; +}); diff --git a/test/form/samples/hoisted-variable-if-stmt/_config.js b/test/form/samples/hoisted-variable-if-stmt/_config.js index c6e376a856b..220e05ab9c3 100644 --- a/test/form/samples/hoisted-variable-if-stmt/_config.js +++ b/test/form/samples/hoisted-variable-if-stmt/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Properly renders branches which refer to hoisted variables from other lexical scopes' -}; +}); diff --git a/test/form/samples/hoisted-vars-in-dead-branches/_config.js b/test/form/samples/hoisted-vars-in-dead-branches/_config.js index b27559e4d8e..28298ee7a8c 100644 --- a/test/form/samples/hoisted-vars-in-dead-branches/_config.js +++ b/test/form/samples/hoisted-vars-in-dead-branches/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'renders hoisted variables in dead branches' -}; +}); diff --git a/test/form/samples/ignore-property-access-side-effects/_config.js b/test/form/samples/ignore-property-access-side-effects/_config.js index 2db50db018f..5fa71af82ec 100644 --- a/test/form/samples/ignore-property-access-side-effects/_config.js +++ b/test/form/samples/ignore-property-access-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'ignore side-effects when accessing properties if treeshake.propertyReadSideEffects is false', expectedWarnings: ['EMPTY_BUNDLE'], @@ -7,4 +7,4 @@ module.exports = { propertyReadSideEffects: false } } -}; +}); diff --git a/test/form/samples/ignore-unknown-global-side-effects/_config.js b/test/form/samples/ignore-unknown-global-side-effects/_config.js index 08ae295d520..ed28343d5db 100644 --- a/test/form/samples/ignore-unknown-global-side-effects/_config.js +++ b/test/form/samples/ignore-unknown-global-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'ignore side-effects when accessing unknown globals if treeshake.unknownGlobalSideEffects is false', expectedWarnings: ['EMPTY_BUNDLE'], @@ -7,4 +7,4 @@ module.exports = { unknownGlobalSideEffects: false } } -}; +}); diff --git a/test/form/samples/implicit-undefined-assignments/_config.js b/test/form/samples/implicit-undefined-assignments/_config.js index 5422058eb2d..4d5ee8cfe86 100644 --- a/test/form/samples/implicit-undefined-assignments/_config.js +++ b/test/form/samples/implicit-undefined-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Make sure implicit undefined assignments in declarations are not ignored' -}; +}); diff --git a/test/form/samples/import-assertions/assertion-shapes/_config.js b/test/form/samples/import-assertions/assertion-shapes/_config.js index 3686c79e002..fc2dadcf720 100644 --- a/test/form/samples/import-assertions/assertion-shapes/_config.js +++ b/test/form/samples/import-assertions/assertion-shapes/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles special shapes of assertions', expectedWarnings: 'UNRESOLVED_IMPORT', options: { external: () => true } -}; +}); diff --git a/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js b/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js index d46209bfcea..dcea363517f 100644 --- a/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js +++ b/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keep import assertions for dynamic imports', expectedWarnings: 'UNRESOLVED_IMPORT', options: { @@ -24,4 +24,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/import-assertions/keeps-static-assertions/_config.js b/test/form/samples/import-assertions/keeps-static-assertions/_config.js index 7940684a958..e2b6e2fadca 100644 --- a/test/form/samples/import-assertions/keeps-static-assertions/_config.js +++ b/test/form/samples/import-assertions/keeps-static-assertions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps any import assertions on input', expectedWarnings: 'UNRESOLVED_IMPORT', options: { @@ -8,4 +8,4 @@ module.exports = { }, output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js b/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js index efbc46143d0..705f5372c06 100644 --- a/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js +++ b/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows plugins to read and write import assertions in resolveDynamicImport', options: { plugins: [ @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js b/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js index 77c68a879e1..8e1d0d22f21 100644 --- a/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js +++ b/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows plugins to read and write import assertions in resolveId', options: { output: { name: 'bundle' }, @@ -14,4 +14,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js b/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js index 74a50e2c816..7b9eafb91b9 100644 --- a/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js +++ b/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keep import assertions for dynamic imports', expectedWarnings: 'UNRESOLVED_IMPORT', options: { @@ -25,4 +25,4 @@ module.exports = { ], output: { externalImportAssertions: false } } -}; +}); diff --git a/test/form/samples/import-assertions/removes-static-assertions/_config.js b/test/form/samples/import-assertions/removes-static-assertions/_config.js index 30299daf04e..df695082f97 100644 --- a/test/form/samples/import-assertions/removes-static-assertions/_config.js +++ b/test/form/samples/import-assertions/removes-static-assertions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps any import assertions on input', expectedWarnings: 'UNRESOLVED_IMPORT', options: { @@ -8,4 +8,4 @@ module.exports = { }, output: { name: 'bundle', externalImportAssertions: false } } -}; +}); diff --git a/test/form/samples/import-expression/_config.js b/test/form/samples/import-expression/_config.js index b8e2cfab5eb..3fffea31156 100644 --- a/test/form/samples/import-expression/_config.js +++ b/test/form/samples/import-expression/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly transforms variables in imported expressions', options: { external: 'external', @@ -6,4 +6,4 @@ module.exports = { globals: { external: 'external' } } } -}; +}); diff --git a/test/form/samples/import-external-namespace-and-default/_config.js b/test/form/samples/import-external-namespace-and-default/_config.js index b6823ebd061..10b6cf1370a 100644 --- a/test/form/samples/import-external-namespace-and-default/_config.js +++ b/test/form/samples/import-external-namespace-and-default/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'disinguishes between external default and namespace (#637)', options: { external: ['foo'], @@ -6,4 +6,4 @@ module.exports = { globals: { foo: 'foo' } } } -}; +}); diff --git a/test/form/samples/import-meta-resolve/_config.js b/test/form/samples/import-meta-resolve/_config.js index aba00ef3ded..9305bb6d0b0 100644 --- a/test/form/samples/import-meta-resolve/_config.js +++ b/test/form/samples/import-meta-resolve/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports import.meta.resolve' -}; +}); diff --git a/test/form/samples/import-meta-url/_config.js b/test/form/samples/import-meta-url/_config.js index 7acc8dce0e5..6134e26f892 100644 --- a/test/form/samples/import-meta-url/_config.js +++ b/test/form/samples/import-meta-url/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports import.meta.url' -}; +}); diff --git a/test/form/samples/import-meta/_config.js b/test/form/samples/import-meta/_config.js index 0475fdfdf7c..4f5c26781be 100644 --- a/test/form/samples/import-meta/_config.js +++ b/test/form/samples/import-meta/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports directly accessing import.meta' -}; +}); diff --git a/test/form/samples/import-named-exported-global-with-alias/_config.js b/test/form/samples/import-named-exported-global-with-alias/_config.js index 3ed95b58d27..4600b518eae 100644 --- a/test/form/samples/import-named-exported-global-with-alias/_config.js +++ b/test/form/samples/import-named-exported-global-with-alias/_config.js @@ -1,8 +1,8 @@ // Changed due to https://github.com/acornjs/acorn/issues/806 // Consider reverting this change should this become an acorn option -module.exports = { +module.exports = defineRollupTest({ description: 'allow globals to be exported and imported', expectedWarnings: ['EMPTY_BUNDLE'], options: { output: { name: 'doc' } } -}; +}); diff --git a/test/form/samples/import-namespace-systemjs/_config.js b/test/form/samples/import-namespace-systemjs/_config.js index 1708f21cd7a..cad27ebbcf1 100644 --- a/test/form/samples/import-namespace-systemjs/_config.js +++ b/test/form/samples/import-namespace-systemjs/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports namespace (systemjs only)', options: { external: ['dependency'], @@ -6,4 +6,4 @@ module.exports = { format: 'system' } } -}; +}); diff --git a/test/form/samples/import-namespace/_config.js b/test/form/samples/import-namespace/_config.js index 2cd57f110ff..282c01cc774 100644 --- a/test/form/samples/import-namespace/_config.js +++ b/test/form/samples/import-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports external namespaces', options: { external: ['foo', 'bar'], @@ -6,4 +6,4 @@ module.exports = { globals: { foo: 'foo', bar: 'bar' } } } -}; +}); diff --git a/test/form/samples/import-specifier-deshadowing/_config.js b/test/form/samples/import-specifier-deshadowing/_config.js index 26457a50db3..8e97e465ed0 100644 --- a/test/form/samples/import-specifier-deshadowing/_config.js +++ b/test/form/samples/import-specifier-deshadowing/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deshadows aliased import bindings', options: { external: ['react-sticky'], @@ -7,4 +7,4 @@ module.exports = { name: 'Sticky' } } -}; +}); diff --git a/test/form/samples/include-recursive-call-arguments/_config.js b/test/form/samples/include-recursive-call-arguments/_config.js index 5944997b49f..b6c0b74215e 100644 --- a/test/form/samples/include-recursive-call-arguments/_config.js +++ b/test/form/samples/include-recursive-call-arguments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles recursive declarations' -}; +}); diff --git a/test/form/samples/includes-all-namespace-declarations/_config.js b/test/form/samples/includes-all-namespace-declarations/_config.js index afd3cf26746..9bced2e495c 100644 --- a/test/form/samples/includes-all-namespace-declarations/_config.js +++ b/test/form/samples/includes-all-namespace-declarations/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes all declarations referenced by reified namespaces', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/indent-false/_config.js b/test/form/samples/indent-false/_config.js index 869d6498ed7..443d4ddb366 100644 --- a/test/form/samples/indent-false/_config.js +++ b/test/form/samples/indent-false/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not indent with indent: false', options: { output: { @@ -6,4 +6,4 @@ module.exports = { indent: false } } -}; +}); diff --git a/test/form/samples/indent-spaces/_config.js b/test/form/samples/indent-spaces/_config.js index b49bec76a0d..034cb694c6b 100644 --- a/test/form/samples/indent-spaces/_config.js +++ b/test/form/samples/indent-spaces/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'auto-indents with indent: true', options: { output: { @@ -6,4 +6,4 @@ module.exports = { indent: ' ' } } -}; +}); diff --git a/test/form/samples/indent-true-spaces/_config.js b/test/form/samples/indent-true-spaces/_config.js index c78911da9ec..0ef60423d5f 100644 --- a/test/form/samples/indent-true-spaces/_config.js +++ b/test/form/samples/indent-true-spaces/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'auto-indents with spaces and indent: true', options: { output: { @@ -6,4 +6,4 @@ module.exports = { indent: true } } -}; +}); diff --git a/test/form/samples/indent-true/_config.js b/test/form/samples/indent-true/_config.js index ad1ec81a073..32dd149bbce 100644 --- a/test/form/samples/indent-true/_config.js +++ b/test/form/samples/indent-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'auto-indents with indent: true', options: { output: { @@ -6,4 +6,4 @@ module.exports = { indent: true } } -}; +}); diff --git a/test/form/samples/inlined-treeshaken-dynamic-import/_config.js b/test/form/samples/inlined-treeshaken-dynamic-import/_config.js index 1703f4c9c1f..bb750e9d12a 100644 --- a/test/form/samples/inlined-treeshaken-dynamic-import/_config.js +++ b/test/form/samples/inlined-treeshaken-dynamic-import/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'completely removes tree-shaken dynamic imports ', options: { output: { inlineDynamicImports: true } } -}; +}); diff --git a/test/form/samples/internal-conflict-resolution/_config.js b/test/form/samples/internal-conflict-resolution/_config.js index 921d1748e30..8a652879095 100644 --- a/test/form/samples/internal-conflict-resolution/_config.js +++ b/test/form/samples/internal-conflict-resolution/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'internal name conflicts are resolved sanely' -}; +}); diff --git a/test/form/samples/interop-per-dependency-no-freeze/_config.js b/test/form/samples/interop-per-dependency-no-freeze/_config.js index b101cfe23b9..b8583d2304a 100644 --- a/test/form/samples/interop-per-dependency-no-freeze/_config.js +++ b/test/form/samples/interop-per-dependency-no-freeze/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects the freeze option', options: { external: id => id.startsWith('external'), @@ -13,4 +13,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/form/samples/interop-per-dependency-no-live-binding/_config.js b/test/form/samples/interop-per-dependency-no-live-binding/_config.js index 7f7e7c22824..3d377aad157 100644 --- a/test/form/samples/interop-per-dependency-no-live-binding/_config.js +++ b/test/form/samples/interop-per-dependency-no-live-binding/_config.js @@ -1,6 +1,6 @@ const checkedIds = new Set(); -module.exports = { +module.exports = defineRollupTest({ description: 'allows to configure the interop type per external dependency', options: { external: id => id.startsWith('external'), @@ -17,4 +17,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/form/samples/interop-per-dependency/_config.js b/test/form/samples/interop-per-dependency/_config.js index 55148ba9758..d42a1d95645 100644 --- a/test/form/samples/interop-per-dependency/_config.js +++ b/test/form/samples/interop-per-dependency/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to configure the interop type per external dependency', options: { external: id => id.startsWith('external'), @@ -15,4 +15,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/form/samples/interop-per-reexported-dependency/_config.js b/test/form/samples/interop-per-reexported-dependency/_config.js index 8d2772f7d6f..0fc17379fd2 100644 --- a/test/form/samples/interop-per-reexported-dependency/_config.js +++ b/test/form/samples/interop-per-reexported-dependency/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to configure the interop type per reexported external dependency', options: { external: id => id.startsWith('external'), @@ -12,4 +12,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/intro-and-outro/_config.js b/test/form/samples/intro-and-outro/_config.js index 6b525adedb8..7db771251e0 100644 --- a/test/form/samples/intro-and-outro/_config.js +++ b/test/form/samples/intro-and-outro/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds an intro/outro', options: { output: { @@ -39,4 +39,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/invalid-binary-expressions/_config.js b/test/form/samples/invalid-binary-expressions/_config.js index ba2a664d734..750becd6877 100644 --- a/test/form/samples/invalid-binary-expressions/_config.js +++ b/test/form/samples/invalid-binary-expressions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Does not fail when bundling code where the `in`-operator is used with invalid right sides' -}; +}); diff --git a/test/form/samples/json-parse-is-not-pure/_config.js b/test/form/samples/json-parse-is-not-pure/_config.js index b7636146475..5a57e77f632 100644 --- a/test/form/samples/json-parse-is-not-pure/_config.js +++ b/test/form/samples/json-parse-is-not-pure/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'JSON.parse is not pure as it can throw on invalid json strings', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/json-stringify-is-not-pure/_config.js b/test/form/samples/json-stringify-is-not-pure/_config.js index 1d840390ca2..424571d2e37 100644 --- a/test/form/samples/json-stringify-is-not-pure/_config.js +++ b/test/form/samples/json-stringify-is-not-pure/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'JSON.stringify is not pure as it can throw on circular structures', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/keep-property-access-side-effects/_config.js b/test/form/samples/keep-property-access-side-effects/_config.js index 0d6db906551..638bfe94d1d 100644 --- a/test/form/samples/keep-property-access-side-effects/_config.js +++ b/test/form/samples/keep-property-access-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keep side-effects when accessing properties if treeshake.propertyReadSideEffects is true', options: { @@ -6,4 +6,4 @@ module.exports = { propertyReadSideEffects: true } } -}; +}); diff --git a/test/form/samples/keep-tree-shaking-comments-no-asi/_config.js b/test/form/samples/keep-tree-shaking-comments-no-asi/_config.js index 74cf0990a83..6f0563f6f81 100644 --- a/test/form/samples/keep-tree-shaking-comments-no-asi/_config.js +++ b/test/form/samples/keep-tree-shaking-comments-no-asi/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'always keep leading comments when tree-shaking and no automatic semicolons are inserted' -}; +}); diff --git a/test/form/samples/known-globals/_config.js b/test/form/samples/known-globals/_config.js index 9811990bbd2..72c13a19786 100644 --- a/test/form/samples/known-globals/_config.js +++ b/test/form/samples/known-globals/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not consider it a side-effect if a known global variable is accessed' -}; +}); diff --git a/test/form/samples/labeled-break-statements/_config.js b/test/form/samples/labeled-break-statements/_config.js index 037b0db339c..19bfe578d50 100644 --- a/test/form/samples/labeled-break-statements/_config.js +++ b/test/form/samples/labeled-break-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keep break statements if their label is included' -}; +}); diff --git a/test/form/samples/labeled-continue-statements/_config.js b/test/form/samples/labeled-continue-statements/_config.js index 3aa496920c8..1944fde4a05 100644 --- a/test/form/samples/labeled-continue-statements/_config.js +++ b/test/form/samples/labeled-continue-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keep continue statements if their label is included' -}; +}); diff --git a/test/form/samples/large-var-cnt-deduping/_config.js b/test/form/samples/large-var-cnt-deduping/_config.js index b038b5af02e..16d2b46d07a 100644 --- a/test/form/samples/large-var-cnt-deduping/_config.js +++ b/test/form/samples/large-var-cnt-deduping/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'large variable count deduping' -}; +}); diff --git a/test/form/samples/lazy-assignment-deoptimization/_config.js b/test/form/samples/lazy-assignment-deoptimization/_config.js index 3d2fbfd1923..ab7c52b155f 100644 --- a/test/form/samples/lazy-assignment-deoptimization/_config.js +++ b/test/form/samples/lazy-assignment-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'only deoptimizes assigned variables when the assignment is included' -}; +}); diff --git a/test/form/samples/literals-from-class-statics/_config.js b/test/form/samples/literals-from-class-statics/_config.js index 0847b183aac..e3667def61f 100644 --- a/test/form/samples/literals-from-class-statics/_config.js +++ b/test/form/samples/literals-from-class-statics/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks literal values in class static fields' -}; +}); diff --git a/test/form/samples/literals-from-return-expressions/_config.js b/test/form/samples/literals-from-return-expressions/_config.js index 80621ca80a3..65cc8ecf1f9 100644 --- a/test/form/samples/literals-from-return-expressions/_config.js +++ b/test/form/samples/literals-from-return-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks literal values across return expressions' -}; +}); diff --git a/test/form/samples/logical-expression/deopzimize-while-included/_config.js b/test/form/samples/logical-expression/deopzimize-while-included/_config.js index 343a9689d60..1fd8e5d3fe0 100644 --- a/test/form/samples/logical-expression/deopzimize-while-included/_config.js +++ b/test/form/samples/logical-expression/deopzimize-while-included/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deoptimizations of logical expression while they are inlcuded (#3324)' -}; +}); diff --git a/test/form/samples/logical-expression/mutate-logical-expression/_config.js b/test/form/samples/logical-expression/mutate-logical-expression/_config.js index 718edcc7ca7..57f4fd864fd 100644 --- a/test/form/samples/logical-expression/mutate-logical-expression/_config.js +++ b/test/form/samples/logical-expression/mutate-logical-expression/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly handle the results of mutating logical expressions', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/logical-expression/simplify-non-boolean/_config.js b/test/form/samples/logical-expression/simplify-non-boolean/_config.js index d9e89aa08a1..9e370979211 100644 --- a/test/form/samples/logical-expression/simplify-non-boolean/_config.js +++ b/test/form/samples/logical-expression/simplify-non-boolean/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'simplifies logical expressions that resolve statically to non-boolean values' -}; +}); diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js index 122a84cce1c..aab8f51bce5 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not normalize external paths when set to false', options: { makeAbsoluteExternalsRelative: false, @@ -43,4 +43,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js index fb08d843874..0b77a9a4d36 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'only normalizes external paths that were originally relative when set to "ifRelativeSource"', options: { @@ -49,4 +49,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js index eb53962c0ac..e13641d2d05 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'normalizes both relative and absolute external paths when set to true', options: { makeAbsoluteExternalsRelative: true, @@ -50,4 +50,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/manual-pure-functions/_config.js b/test/form/samples/manual-pure-functions/_config.js index 5b689a5ef87..100bd23730f 100644 --- a/test/form/samples/manual-pure-functions/_config.js +++ b/test/form/samples/manual-pure-functions/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to manually declare functions as pure by name', options: { treeshake: { manualPureFunctions: ['foo', 'bar.a'] } } -}; +}); diff --git a/test/form/samples/merge-namespaces-non-live/_config.js b/test/form/samples/merge-namespaces-non-live/_config.js index d3fa13df21c..9fafea9ce67 100644 --- a/test/form/samples/merge-namespaces-non-live/_config.js +++ b/test/form/samples/merge-namespaces-non-live/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges namespaces without live-bindings', options: { external: ['external1', 'external2'], @@ -11,4 +11,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/merge-namespaces/_config.js b/test/form/samples/merge-namespaces/_config.js index c31641610b1..26130bb2db5 100644 --- a/test/form/samples/merge-namespaces/_config.js +++ b/test/form/samples/merge-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges namespaces with live-bindings', options: { external: ['external1', 'external2'], @@ -10,4 +10,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/minimal-this-mutation/_config.js b/test/form/samples/minimal-this-mutation/_config.js index d0cecf5de3d..d434e660dde 100644 --- a/test/form/samples/minimal-this-mutation/_config.js +++ b/test/form/samples/minimal-this-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'mutates "this" only if necessary on function calls' -}; +}); diff --git a/test/form/samples/mjs/_config.js b/test/form/samples/mjs/_config.js index 60c794c3f75..c62e6488a9c 100644 --- a/test/form/samples/mjs/_config.js +++ b/test/form/samples/mjs/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports loading mjs with precedence', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/modify-class-prototype/_config.js b/test/form/samples/modify-class-prototype/_config.js index dbb4ba7c10b..90e671db97f 100644 --- a/test/form/samples/modify-class-prototype/_config.js +++ b/test/form/samples/modify-class-prototype/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tree-shakes prototype modifications of classes' -}; +}); diff --git a/test/form/samples/modify-export-semi/_config.js b/test/form/samples/modify-export-semi/_config.js index fdfad5c045b..7f64ac2c356 100644 --- a/test/form/samples/modify-export-semi/_config.js +++ b/test/form/samples/modify-export-semi/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'inserts semicolons correctly when modifying SystemJS exports', formats: ['system'] -}; +}); diff --git a/test/form/samples/module-name-scoped-package/_config.js b/test/form/samples/module-name-scoped-package/_config.js index 626820672e1..eefa0b281f4 100644 --- a/test/form/samples/module-name-scoped-package/_config.js +++ b/test/form/samples/module-name-scoped-package/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows module name with dashes to be added to the global object', options: { output: { @@ -6,4 +6,4 @@ module.exports = { name: '@scoped/npm-package' } } -}; +}); diff --git a/test/form/samples/module-name-wat/_config.js b/test/form/samples/module-name-wat/_config.js index 9ad3bdab211..d07ecf82ef6 100644 --- a/test/form/samples/module-name-wat/_config.js +++ b/test/form/samples/module-name-wat/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly dereferences properties on the global object regardless of nesting', options: { output: { name: 'foo.@scoped/npm-package.bar.why-would-you-do-this' } } -}; +}); diff --git a/test/form/samples/module-name-with-dashes/_config.js b/test/form/samples/module-name-with-dashes/_config.js index 81896a88172..37d5cf1266a 100644 --- a/test/form/samples/module-name-with-dashes/_config.js +++ b/test/form/samples/module-name-with-dashes/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows module name with dashes to be added to the global object', options: { output: { @@ -6,4 +6,4 @@ module.exports = { name: 'module-name-with-dashes' } } -}; +}); diff --git a/test/form/samples/module-no-treeshake/_config.js b/test/form/samples/module-no-treeshake/_config.js index cc6f3fede85..5ed69f37159 100644 --- a/test/form/samples/module-no-treeshake/_config.js +++ b/test/form/samples/module-no-treeshake/_config.js @@ -2,7 +2,7 @@ function getCode(id) { return `const unused = 'unused in ${id}';`; } -module.exports = { +module.exports = defineRollupTest({ description: 'allows disabling tree-shaking for modules', options: { plugins: { @@ -38,4 +38,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/multi-expression-calls/_config.js b/test/form/samples/multi-expression-calls/_config.js index 5ba44790f77..6795de4e18b 100644 --- a/test/form/samples/multi-expression-calls/_config.js +++ b/test/form/samples/multi-expression-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles side-effect-free multi-expressions' -}; +}); diff --git a/test/form/samples/multiple-exports/_config.js b/test/form/samples/multiple-exports/_config.js index fb5a9c63a72..369f73548c0 100644 --- a/test/form/samples/multiple-exports/_config.js +++ b/test/form/samples/multiple-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'multiple named exports', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/mutations-in-imports/_config.js b/test/form/samples/mutations-in-imports/_config.js index bfb50011d5e..e87f40de584 100644 --- a/test/form/samples/mutations-in-imports/_config.js +++ b/test/form/samples/mutations-in-imports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track mutations of imports' -}; +}); diff --git a/test/form/samples/namespace-conflict/_config.js b/test/form/samples/namespace-conflict/_config.js index e0e9e8cf881..f9ca027d8bf 100644 --- a/test/form/samples/namespace-conflict/_config.js +++ b/test/form/samples/namespace-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'replaces conflicting namespace properties with undefined', expectedWarnings: ['NAMESPACE_CONFLICT', 'MISSING_EXPORT'] -}; +}); diff --git a/test/form/samples/namespace-import-reexport-2/_config.js b/test/form/samples/namespace-import-reexport-2/_config.js index a8be2ee28c8..80559ff12be 100644 --- a/test/form/samples/namespace-import-reexport-2/_config.js +++ b/test/form/samples/namespace-import-reexport-2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly associate or shadow variables in and around functions', options: { external: ['external1', 'external2'], @@ -7,4 +7,4 @@ module.exports = { name: 'iife' } } -}; +}); diff --git a/test/form/samples/namespace-import-reexport/_config.js b/test/form/samples/namespace-import-reexport/_config.js index 3530557b978..57e5b514ccb 100644 --- a/test/form/samples/namespace-import-reexport/_config.js +++ b/test/form/samples/namespace-import-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly associate or shadow variables in and around functions', options: { external: ['external-package'], @@ -7,4 +7,4 @@ module.exports = { name: 'iife' } } -}; +}); diff --git a/test/form/samples/namespace-missing-export-effects/_config.js b/test/form/samples/namespace-missing-export-effects/_config.js index 87a35ab8485..0a0160a4ddc 100644 --- a/test/form/samples/namespace-missing-export-effects/_config.js +++ b/test/form/samples/namespace-missing-export-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles interacting with missing namespace members', expectedWarnings: ['MISSING_EXPORT'] -}; +}); diff --git a/test/form/samples/namespace-object-import/_config.js b/test/form/samples/namespace-object-import/_config.js index 010ac0d5f9d..7648e545319 100644 --- a/test/form/samples/namespace-object-import/_config.js +++ b/test/form/samples/namespace-object-import/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly encodes reserved names if namespace import is used', options: { input: ['main.js'] } -}; +}); diff --git a/test/form/samples/namespace-optimization-b/_config.js b/test/form/samples/namespace-optimization-b/_config.js index fb36203de4a..625773b0010 100644 --- a/test/form/samples/namespace-optimization-b/_config.js +++ b/test/form/samples/namespace-optimization-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'it does static lookup optimization of internal namespaces, coping with multiple namespaces in one function' -}; +}); diff --git a/test/form/samples/namespace-optimization-computed-string/_config.js b/test/form/samples/namespace-optimization-computed-string/_config.js index 1e58a85afb5..f79deb7ecae 100644 --- a/test/form/samples/namespace-optimization-computed-string/_config.js +++ b/test/form/samples/namespace-optimization-computed-string/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'it does dynamic lookup optimization of internal namespaces for string-literal keys' -}; +}); diff --git a/test/form/samples/namespace-optimization/_config.js b/test/form/samples/namespace-optimization/_config.js index ec882435252..61fbca905c9 100644 --- a/test/form/samples/namespace-optimization/_config.js +++ b/test/form/samples/namespace-optimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'it does static lookup optimization of internal namespaces' -}; +}); diff --git a/test/form/samples/namespace-reexport-name/_config.js b/test/form/samples/namespace-reexport-name/_config.js index 107e5e04a0e..0ec76de4a3b 100644 --- a/test/form/samples/namespace-reexport-name/_config.js +++ b/test/form/samples/namespace-reexport-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct names when reexporting from namespace reexports (#4049)', options: { external: 'external', output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/namespace-self-import/_config.js b/test/form/samples/namespace-self-import/_config.js index cd21e5703f8..aa9678ae9f9 100644 --- a/test/form/samples/namespace-self-import/_config.js +++ b/test/form/samples/namespace-self-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'namespace early import hoisting', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { @@ -6,4 +6,4 @@ module.exports = { name: 'iife' } } -}; +}); diff --git a/test/form/samples/namespace-tostring/entry-default/_config.js b/test/form/samples/namespace-tostring/entry-default/_config.js index 210c3b4ee86..083f5a6de58 100644 --- a/test/form/samples/namespace-tostring/entry-default/_config.js +++ b/test/form/samples/namespace-tostring/entry-default/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not add Symbol.toStringTag property to entry chunks with default export mode', options: { output: { @@ -7,4 +7,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/namespace-tostring/entry-named/_config.js b/test/form/samples/namespace-tostring/entry-named/_config.js index 69452db2796..24c707b8325 100644 --- a/test/form/samples/namespace-tostring/entry-named/_config.js +++ b/test/form/samples/namespace-tostring/entry-named/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to entry chunks with named exports', options: { output: { @@ -7,4 +7,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/namespace-tostring/external-namespaces/_config.js b/test/form/samples/namespace-tostring/external-namespaces/_config.js index 64090cfc77f..0ffb031167f 100644 --- a/test/form/samples/namespace-tostring/external-namespaces/_config.js +++ b/test/form/samples/namespace-tostring/external-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to external namespaces', options: { external(id) { @@ -29,4 +29,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/namespace-tostring/inlined-namespace-static-resolution/_config.js b/test/form/samples/namespace-tostring/inlined-namespace-static-resolution/_config.js index afa80193c59..ade8e99767a 100644 --- a/test/form/samples/namespace-tostring/inlined-namespace-static-resolution/_config.js +++ b/test/form/samples/namespace-tostring/inlined-namespace-static-resolution/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'statically resolves Symbol.toStringTag for inlined namespaces', expectedWarnings: ['MISSING_EXPORT'], options: { @@ -6,4 +6,4 @@ module.exports = { generatedCode: { symbols: true } } } -}; +}); diff --git a/test/form/samples/namespace-tostring/inlined-namespace/_config.js b/test/form/samples/namespace-tostring/inlined-namespace/_config.js index 4e489178028..34c95be1857 100644 --- a/test/form/samples/namespace-tostring/inlined-namespace/_config.js +++ b/test/form/samples/namespace-tostring/inlined-namespace/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to inlined namespaces', options: { output: { generatedCode: { symbols: true } } } -}; +}); diff --git a/test/form/samples/namespaced-default-exports/_config.js b/test/form/samples/namespaced-default-exports/_config.js index 547e6ad2e2d..e03a07a0ea7 100644 --- a/test/form/samples/namespaced-default-exports/_config.js +++ b/test/form/samples/namespaced-default-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates namespaced module names', options: { output: { name: 'foo.bar.baz' } } -}; +}); diff --git a/test/form/samples/namespaced-named-exports/_config.js b/test/form/samples/namespaced-named-exports/_config.js index 547e6ad2e2d..e03a07a0ea7 100644 --- a/test/form/samples/namespaced-named-exports/_config.js +++ b/test/form/samples/namespaced-named-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates namespaced module names', options: { output: { name: 'foo.bar.baz' } } -}; +}); diff --git a/test/form/samples/namespaces-have-null-prototype/_config.js b/test/form/samples/namespaces-have-null-prototype/_config.js index faa0ac1b8e7..e81fda2113e 100644 --- a/test/form/samples/namespaces-have-null-prototype/_config.js +++ b/test/form/samples/namespaces-have-null-prototype/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates namespaces with null prototypes', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/nested-deoptimization/_config.js b/test/form/samples/nested-deoptimization/_config.js index 440f76d3543..402bcd58d78 100644 --- a/test/form/samples/nested-deoptimization/_config.js +++ b/test/form/samples/nested-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deoptimization of nested properties' -}; +}); diff --git a/test/form/samples/nested-inlined-dynamic-import/_config.js b/test/form/samples/nested-inlined-dynamic-import/_config.js index 11403c10e01..78a1a88a0ad 100644 --- a/test/form/samples/nested-inlined-dynamic-import/_config.js +++ b/test/form/samples/nested-inlined-dynamic-import/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts variables when nested dynamic imports are inlined', options: { output: { inlineDynamicImports: true } } -}; +}); diff --git a/test/form/samples/nested-member-access/_config.js b/test/form/samples/nested-member-access/_config.js index 7c37a494f01..6011af56071 100644 --- a/test/form/samples/nested-member-access/_config.js +++ b/test/form/samples/nested-member-access/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throw an error when accessing members of null or undefined' -}; +}); diff --git a/test/form/samples/nested-pure-comments/_config.js b/test/form/samples/nested-pure-comments/_config.js index 27977b096bd..0dd09a61853 100644 --- a/test/form/samples/nested-pure-comments/_config.js +++ b/test/form/samples/nested-pure-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly associates pure comments before sequence expressions etc.' -}; +}); diff --git a/test/form/samples/nested-this-expressions/_config.js b/test/form/samples/nested-this-expressions/_config.js index ec7aac395ed..b8bc5b64dc4 100644 --- a/test/form/samples/nested-this-expressions/_config.js +++ b/test/form/samples/nested-this-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly keep or ignore nested "this"-expressions' -}; +}); diff --git a/test/form/samples/nested-tree-shaking/_config.js b/test/form/samples/nested-tree-shaking/_config.js index 44335e294be..b40b8d56c20 100644 --- a/test/form/samples/nested-tree-shaking/_config.js +++ b/test/form/samples/nested-tree-shaking/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes unused nested statements' -}; +}); diff --git a/test/form/samples/new-target-meta-property/_config.js b/test/form/samples/new-target-meta-property/_config.js index 0b9edf38046..5b7327c2ae5 100644 --- a/test/form/samples/new-target-meta-property/_config.js +++ b/test/form/samples/new-target-meta-property/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports the new.target meta property' -}; +}); diff --git a/test/form/samples/no-external-live-bindings-compact/_config.js b/test/form/samples/no-external-live-bindings-compact/_config.js index 33a7445e319..05c5538a5e5 100644 --- a/test/form/samples/no-external-live-bindings-compact/_config.js +++ b/test/form/samples/no-external-live-bindings-compact/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Allows omitting the code that handles external live bindings in compact mode', options: { external: () => true, @@ -13,4 +13,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/form/samples/no-external-live-bindings/_config.js b/test/form/samples/no-external-live-bindings/_config.js index 30303d219e2..1141f985c61 100644 --- a/test/form/samples/no-external-live-bindings/_config.js +++ b/test/form/samples/no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Allows omitting the code that handles external live bindings', options: { external: () => true, @@ -12,4 +12,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/form/samples/no-imports-or-exports/_config.js b/test/form/samples/no-imports-or-exports/_config.js index 88d37593495..e77b35b3310 100644 --- a/test/form/samples/no-imports-or-exports/_config.js +++ b/test/form/samples/no-imports-or-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'single module, no imports or exports' -}; +}); diff --git a/test/form/samples/no-treeshake-conflict/_config.js b/test/form/samples/no-treeshake-conflict/_config.js index 76055873d17..aa79cf23fe0 100644 --- a/test/form/samples/no-treeshake-conflict/_config.js +++ b/test/form/samples/no-treeshake-conflict/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not introduce conflicting variables with treeshake: false', options: { output: { name: /* not shaken, but */ 'stirred' }, treeshake: false } -}; +}); diff --git a/test/form/samples/no-treeshake-default-export-conflict/_config.js b/test/form/samples/no-treeshake-default-export-conflict/_config.js index b312d610d77..c250014febc 100644 --- a/test/form/samples/no-treeshake-default-export-conflict/_config.js +++ b/test/form/samples/no-treeshake-default-export-conflict/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly deconflicts default exports when not tree-shaking', options: { treeshake: false } -}; +}); diff --git a/test/form/samples/no-treeshake-include-labels/_config.js b/test/form/samples/no-treeshake-include-labels/_config.js index fc8487608b1..b527972ac8c 100644 --- a/test/form/samples/no-treeshake-include-labels/_config.js +++ b/test/form/samples/no-treeshake-include-labels/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'always includes labels when tree-shaking is turned off (#3473)', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { treeshake: false } -}; +}); diff --git a/test/form/samples/no-treeshake-namespace-object/_config.js b/test/form/samples/no-treeshake-namespace-object/_config.js index dc6136f8ded..3aed395f1f7 100644 --- a/test/form/samples/no-treeshake-namespace-object/_config.js +++ b/test/form/samples/no-treeshake-namespace-object/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'generates namespace objects when not tree-shaking', options: { treeshake: false } -}; +}); diff --git a/test/form/samples/no-treeshake/_config.js b/test/form/samples/no-treeshake/_config.js index 76d525b3517..a70127d92b1 100644 --- a/test/form/samples/no-treeshake/_config.js +++ b/test/form/samples/no-treeshake/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'all code should be included if tree-shaking is disabled', options: { external: ['external'], @@ -8,4 +8,4 @@ module.exports = { name: /* not shaken, but */ 'stirred' } } -}; +}); diff --git a/test/form/samples/non-empty-block-statement/_config.js b/test/form/samples/non-empty-block-statement/_config.js index 92803d709a4..d750324f41d 100644 --- a/test/form/samples/non-empty-block-statement/_config.js +++ b/test/form/samples/non-empty-block-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not remove non an empty block statement' -}; +}); diff --git a/test/form/samples/ns-external-star-reexport/_config.js b/test/form/samples/ns-external-star-reexport/_config.js index 06cdf4d0268..8e295e99b0d 100644 --- a/test/form/samples/ns-external-star-reexport/_config.js +++ b/test/form/samples/ns-external-star-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports namespaces with external star reexports', options: { external: ['external1', 'external2'], @@ -21,4 +21,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/nullish-coalescing/_config.js b/test/form/samples/nullish-coalescing/_config.js index 0999be29d39..f1ec28b9ef8 100644 --- a/test/form/samples/nullish-coalescing/_config.js +++ b/test/form/samples/nullish-coalescing/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports tree-shaking with nullish-coalescing' -}; +}); diff --git a/test/form/samples/numeric_separators/_config.js b/test/form/samples/numeric_separators/_config.js index 1809c1b9e07..eb3e1a7d901 100644 --- a/test/form/samples/numeric_separators/_config.js +++ b/test/form/samples/numeric_separators/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports numeric separators' -}; +}); diff --git a/test/form/samples/object-define-property/_config.js b/test/form/samples/object-define-property/_config.js index 406267436f3..988533b919e 100644 --- a/test/form/samples/object-define-property/_config.js +++ b/test/form/samples/object-define-property/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows globals to have parameter mutation side effects' -}; +}); diff --git a/test/form/samples/object-destructuring-default-values/_config.js b/test/form/samples/object-destructuring-default-values/_config.js index c4ccc90db14..78df0505e50 100644 --- a/test/form/samples/object-destructuring-default-values/_config.js +++ b/test/form/samples/object-destructuring-default-values/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'object destructuring default values are preserved' -}; +}); diff --git a/test/form/samples/object-expression/computed-properties/_config.js b/test/form/samples/object-expression/computed-properties/_config.js index e306359eb2b..eb92db583ec 100644 --- a/test/form/samples/object-expression/computed-properties/_config.js +++ b/test/form/samples/object-expression/computed-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Associates non-string keys with string keys' -}; +}); diff --git a/test/form/samples/object-expression/method-side-effects/_config.js b/test/form/samples/object-expression/method-side-effects/_config.js index efbb2502435..b02e0fb3197 100644 --- a/test/form/samples/object-expression/method-side-effects/_config.js +++ b/test/form/samples/object-expression/method-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Track side-effects of method calls' -}; +}); diff --git a/test/form/samples/object-expression/nested-literal-assignment-without-access-side-effect/_config.js b/test/form/samples/object-expression/nested-literal-assignment-without-access-side-effect/_config.js index 176ab160d77..c9ab4fa50fa 100644 --- a/test/form/samples/object-expression/nested-literal-assignment-without-access-side-effect/_config.js +++ b/test/form/samples/object-expression/nested-literal-assignment-without-access-side-effect/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treats mutating nested properties as side effects', options: { treeshake: { propertyReadSideEffects: false } } -}; +}); diff --git a/test/form/samples/object-expression/nested-literal-value-without-access-side-effect/_config.js b/test/form/samples/object-expression/nested-literal-value-without-access-side-effect/_config.js index fdda6575331..dc22ed29c9c 100644 --- a/test/form/samples/object-expression/nested-literal-value-without-access-side-effect/_config.js +++ b/test/form/samples/object-expression/nested-literal-value-without-access-side-effect/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses an unknown value for nested properties', options: { treeshake: { propertyReadSideEffects: false } } -}; +}); diff --git a/test/form/samples/object-expression/proto-property/_config.js b/test/form/samples/object-expression/proto-property/_config.js index f70608e1109..56dba4fd77d 100644 --- a/test/form/samples/object-expression/proto-property/_config.js +++ b/test/form/samples/object-expression/proto-property/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Deoptimize when __proto__ is used' -}; +}); diff --git a/test/form/samples/object-expression/reassign-prop-without-proto/_config.js b/test/form/samples/object-expression/reassign-prop-without-proto/_config.js index a46300f406f..93cca1a2661 100644 --- a/test/form/samples/object-expression/reassign-prop-without-proto/_config.js +++ b/test/form/samples/object-expression/reassign-prop-without-proto/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly deoptimizes when there is no proto' -}; +}); diff --git a/test/form/samples/object-expression/return-expressions/_config.js b/test/form/samples/object-expression/return-expressions/_config.js index 8e3a8d7be88..38d0fd00116 100644 --- a/test/form/samples/object-expression/return-expressions/_config.js +++ b/test/form/samples/object-expression/return-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Track side-effects of method return values' -}; +}); diff --git a/test/form/samples/object-expression/unknown-getter-no-side-effect/_config.js b/test/form/samples/object-expression/unknown-getter-no-side-effect/_config.js index a5dcc719eaa..16da59a7b2c 100644 --- a/test/form/samples/object-expression/unknown-getter-no-side-effect/_config.js +++ b/test/form/samples/object-expression/unknown-getter-no-side-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes unknown getter access without side effect', options: { external: ['external'] } -}; +}); diff --git a/test/form/samples/object-expression/unknown-setter-no-side-effect/_config.js b/test/form/samples/object-expression/unknown-setter-no-side-effect/_config.js index 1d59c54d22e..9a3a6ab95b4 100644 --- a/test/form/samples/object-expression/unknown-setter-no-side-effect/_config.js +++ b/test/form/samples/object-expression/unknown-setter-no-side-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes unknown setter access without side effect', options: { external: ['external'] } -}; +}); diff --git a/test/form/samples/object-expression/unknown-setter-no-side-effect2/_config.js b/test/form/samples/object-expression/unknown-setter-no-side-effect2/_config.js index 1d59c54d22e..9a3a6ab95b4 100644 --- a/test/form/samples/object-expression/unknown-setter-no-side-effect2/_config.js +++ b/test/form/samples/object-expression/unknown-setter-no-side-effect2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes unknown setter access without side effect', options: { external: ['external'] } -}; +}); diff --git a/test/form/samples/object-freeze-effects/_config.js b/test/form/samples/object-freeze-effects/_config.js index 4808999695c..e046e18ba01 100644 --- a/test/form/samples/object-freeze-effects/_config.js +++ b/test/form/samples/object-freeze-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Only treats Object.freeze as a side effect if the argument is used' -}; +}); diff --git a/test/form/samples/object-literal-property-overwrites/_config.js b/test/form/samples/object-literal-property-overwrites/_config.js index 4c75daffbfe..8b26c3115e8 100644 --- a/test/form/samples/object-literal-property-overwrites/_config.js +++ b/test/form/samples/object-literal-property-overwrites/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detect side-effects in overwritten properties of object literals' -}; +}); diff --git a/test/form/samples/optional-chaining-namespace/_config.js b/test/form/samples/optional-chaining-namespace/_config.js index 439fa892fa4..546c71c5388 100644 --- a/test/form/samples/optional-chaining-namespace/_config.js +++ b/test/form/samples/optional-chaining-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports optional chaining with namespace objects', expectedWarnings: ['MISSING_EXPORT'] -}; +}); diff --git a/test/form/samples/optional-chaining/_config.js b/test/form/samples/optional-chaining/_config.js index bce6f6fb4b3..f421af441df 100644 --- a/test/form/samples/optional-chaining/_config.js +++ b/test/form/samples/optional-chaining/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports optional chaining' -}; +}); diff --git a/test/form/samples/output-named-library/_config.js b/test/form/samples/output-named-library/_config.js index bb37cc45848..4fdfcfb017a 100644 --- a/test/form/samples/output-named-library/_config.js +++ b/test/form/samples/output-named-library/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'names bundles correctly', options: { output: { name: 'libraryName' } } -}; +}); diff --git a/test/form/samples/override-external-namespace/_config.js b/test/form/samples/override-external-namespace/_config.js index 9fcd9fb2c12..7c11505367a 100644 --- a/test/form/samples/override-external-namespace/_config.js +++ b/test/form/samples/override-external-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows overriding imports of external namespace reexports', options: { external: 'external', @@ -7,4 +7,4 @@ module.exports = { globals: { external: 'external' } } } -}; +}); diff --git a/test/form/samples/paths-function/_config.js b/test/form/samples/paths-function/_config.js index 726db0d85e4..fc47dc38859 100644 --- a/test/form/samples/paths-function/_config.js +++ b/test/form/samples/paths-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external paths (#754)', options: { external: ['foo'], @@ -7,4 +7,4 @@ module.exports = { paths: id => `https://unpkg.com/${id}` } } -}; +}); diff --git a/test/form/samples/paths-relative/_config.js b/test/form/samples/paths-relative/_config.js index 766414f0cca..26fcaf3de1d 100644 --- a/test/form/samples/paths-relative/_config.js +++ b/test/form/samples/paths-relative/_config.js @@ -2,7 +2,7 @@ const { resolve } = require('node:path'); const resolved = resolve(__dirname, 'foo.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'external paths (#754)', options: { external: [resolved], @@ -11,4 +11,4 @@ module.exports = { paths: { [resolved]: '../foo' } } } -}; +}); diff --git a/test/form/samples/paths/_config.js b/test/form/samples/paths/_config.js index ef23638a0ef..a08a0877059 100644 --- a/test/form/samples/paths/_config.js +++ b/test/form/samples/paths/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external paths (#754)', options: { external: ['foo'], @@ -7,4 +7,4 @@ module.exports = { paths: { foo: 'https://unpkg.com/foo' } } } -}; +}); diff --git a/test/form/samples/pattern-assignments/_config.js b/test/form/samples/pattern-assignments/_config.js index a884052961f..51bd7dce67f 100644 --- a/test/form/samples/pattern-assignments/_config.js +++ b/test/form/samples/pattern-assignments/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Make sure side-effects are passed along destructuring assignments', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/pattern-member-expressions/_config.js b/test/form/samples/pattern-member-expressions/_config.js index aa93889f9e6..ef91758ffde 100644 --- a/test/form/samples/pattern-member-expressions/_config.js +++ b/test/form/samples/pattern-member-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles member expressions in patterns (#2750)' -}; +}); diff --git a/test/form/samples/per-output-plugins/_config.js b/test/form/samples/per-output-plugins/_config.js index 8045837e438..83d247bc7e5 100644 --- a/test/form/samples/per-output-plugins/_config.js +++ b/test/form/samples/per-output-plugins/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows specifying per-output plugins', options: { output: { @@ -17,4 +17,4 @@ module.exports = { ] } } -}; +}); diff --git a/test/form/samples/preserve-asm-js/_config.js b/test/form/samples/preserve-asm-js/_config.js index af8fa8dd5ca..3525cfd9545 100644 --- a/test/form/samples/preserve-asm-js/_config.js +++ b/test/form/samples/preserve-asm-js/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Preserves asm.js code (#3360)' -}; +}); diff --git a/test/form/samples/preserve-debugger/_config.js b/test/form/samples/preserve-debugger/_config.js index 3e658157910..6be9890c26a 100644 --- a/test/form/samples/preserve-debugger/_config.js +++ b/test/form/samples/preserve-debugger/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'debugger statements are preserved (#664)' -}; +}); diff --git a/test/form/samples/preserves-comments-after-imports/_config.js b/test/form/samples/preserves-comments-after-imports/_config.js index 7b4cc9f7a57..a081c873d4d 100644 --- a/test/form/samples/preserves-comments-after-imports/_config.js +++ b/test/form/samples/preserves-comments-after-imports/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves comments between imports and first statement', options: { output: { name: 'myBundle' } } -}; +}); // https://github.com/esperantojs/esperanto/issues/187 diff --git a/test/form/samples/probe-external-namespace/_config.js b/test/form/samples/probe-external-namespace/_config.js index d4034bec1c6..c81fb7b862d 100644 --- a/test/form/samples/probe-external-namespace/_config.js +++ b/test/form/samples/probe-external-namespace/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allow probing external namespaces without causing errors due to missing imports', options: { external: 'external' } -}; +}); diff --git a/test/form/samples/promises/_config.js b/test/form/samples/promises/_config.js index c4e9dee1854..87ceb59a7df 100644 --- a/test/form/samples/promises/_config.js +++ b/test/form/samples/promises/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not remove promise creations' -}; +}); diff --git a/test/form/samples/proper-this-context/_config.js b/test/form/samples/proper-this-context/_config.js index 65fe62b2171..eec3e67526a 100644 --- a/test/form/samples/proper-this-context/_config.js +++ b/test/form/samples/proper-this-context/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'make sure "this" respects the context for arrow functions', expectedWarnings: ['THIS_IS_UNDEFINED'] -}; +}); diff --git a/test/form/samples/property-setters-and-getters/access-when-called-effect/_config.js b/test/form/samples/property-setters-and-getters/access-when-called-effect/_config.js index ae85f1ce6c6..61f7c7eefd9 100644 --- a/test/form/samples/property-setters-and-getters/access-when-called-effect/_config.js +++ b/test/form/samples/property-setters-and-getters/access-when-called-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects access side-effects when calling a getter' -}; +}); diff --git a/test/form/samples/property-setters-and-getters/early-access-getter-return/_config.js b/test/form/samples/property-setters-and-getters/early-access-getter-return/_config.js index bbfa47e1932..8ecbe76ef2e 100644 --- a/test/form/samples/property-setters-and-getters/early-access-getter-return/_config.js +++ b/test/form/samples/property-setters-and-getters/early-access-getter-return/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles accessing the return expression of a getter before it has been bound' -}; +}); diff --git a/test/form/samples/property-setters-and-getters/early-access-getter-value/_config.js b/test/form/samples/property-setters-and-getters/early-access-getter-value/_config.js index e362145ba90..9b2b62d054d 100644 --- a/test/form/samples/property-setters-and-getters/early-access-getter-value/_config.js +++ b/test/form/samples/property-setters-and-getters/early-access-getter-value/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles accessing the value of a getter before it has been bound' -}; +}); diff --git a/test/form/samples/property-setters-and-getters/shadowed-setters/_config.js b/test/form/samples/property-setters-and-getters/shadowed-setters/_config.js index f220613b295..1dec75fa118 100644 --- a/test/form/samples/property-setters-and-getters/shadowed-setters/_config.js +++ b/test/form/samples/property-setters-and-getters/shadowed-setters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles setters shadowed by computed setters' -}; +}); diff --git a/test/form/samples/protect-cjs-globals/_config.js b/test/form/samples/protect-cjs-globals/_config.js index 5d2d5ac0718..78aba16a197 100644 --- a/test/form/samples/protect-cjs-globals/_config.js +++ b/test/form/samples/protect-cjs-globals/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'prevent conflicts with cjs module globals', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/proto-null/_config.js b/test/form/samples/proto-null/_config.js index cdbdcecf206..57787d9c8c3 100644 --- a/test/form/samples/proto-null/_config.js +++ b/test/form/samples/proto-null/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles getters and setters on __proto__ properties' -}; +}); diff --git a/test/form/samples/prototype-functions/_config.js b/test/form/samples/prototype-functions/_config.js index 620b36d549c..3782da1d2a2 100644 --- a/test/form/samples/prototype-functions/_config.js +++ b/test/form/samples/prototype-functions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly includes prototype functions' -}; +}); diff --git a/test/form/samples/prune-pure-unused-import-array/_config.js b/test/form/samples/prune-pure-unused-import-array/_config.js index 4d9035fa705..7850b90809d 100644 --- a/test/form/samples/prune-pure-unused-import-array/_config.js +++ b/test/form/samples/prune-pure-unused-import-array/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'prunes pure unused external imports ([#1352])', options: { external: ['external', 'other'], @@ -7,4 +7,4 @@ module.exports = { globals: { other: 'other' } } } -}; +}); diff --git a/test/form/samples/prune-pure-unused-import-function/_config.js b/test/form/samples/prune-pure-unused-import-function/_config.js index c682d7c9920..662cbceea70 100644 --- a/test/form/samples/prune-pure-unused-import-function/_config.js +++ b/test/form/samples/prune-pure-unused-import-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'prunes pure unused external imports ([#1352])', expectedWarnings: ['EMPTY_BUNDLE'], options: { @@ -8,4 +8,4 @@ module.exports = { globals: { other: 'other' } } } -}; +}); diff --git a/test/form/samples/prune-pure-unused-import/_config.js b/test/form/samples/prune-pure-unused-import/_config.js index a3236e50639..527766560d8 100644 --- a/test/form/samples/prune-pure-unused-import/_config.js +++ b/test/form/samples/prune-pure-unused-import/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'prunes pure unused external imports ([#1352])', expectedWarnings: ['EMPTY_BUNDLE'], options: { external: ['external', 'other'], treeshake: { moduleSideEffects: 'no-external' } } -}; +}); diff --git a/test/form/samples/pure-class-field/_config.js b/test/form/samples/pure-class-field/_config.js index d2fd9bd5e0a..4634f697d8c 100644 --- a/test/form/samples/pure-class-field/_config.js +++ b/test/form/samples/pure-class-field/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains pure annotations in class fields' -}; +}); diff --git a/test/form/samples/pure-comment-line-break/_config.js b/test/form/samples/pure-comment-line-break/_config.js index 3a1351bf2fd..00486ec690a 100644 --- a/test/form/samples/pure-comment-line-break/_config.js +++ b/test/form/samples/pure-comment-line-break/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adjust line-break handling when dealing with pure annotations' -}; +}); diff --git a/test/form/samples/pure-comment-scenarios-complex/_config.js b/test/form/samples/pure-comment-scenarios-complex/_config.js index d045ae566bc..33f8132e433 100644 --- a/test/form/samples/pure-comment-scenarios-complex/_config.js +++ b/test/form/samples/pure-comment-scenarios-complex/_config.js @@ -1,5 +1,5 @@ // tests compiled from https://github.com/mishoo/UglifyJS2/blob/bcebacbb9e7ddac7d9c0e4ca2c7e0faf0e0bca7c/test/compress/issue-1261.js -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles various advanced pure comment scenarios' -}; +}); diff --git a/test/form/samples/pure-comment-scenarios-simple/_config.js b/test/form/samples/pure-comment-scenarios-simple/_config.js index 71266b1bba0..f5de85627c6 100644 --- a/test/form/samples/pure-comment-scenarios-simple/_config.js +++ b/test/form/samples/pure-comment-scenarios-simple/_config.js @@ -1,5 +1,5 @@ // tests compiled from https://github.com/mishoo/UglifyJS2/blob/88c8f4e363e0d585b33ea29df560243d3dc74ce1/test/compress/pure_funcs.js -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles various pure comment scenarios' -}; +}); diff --git a/test/form/samples/pure-comments-disabled/_config.js b/test/form/samples/pure-comments-disabled/_config.js index bd647a41ced..981cc381439 100644 --- a/test/form/samples/pure-comments-disabled/_config.js +++ b/test/form/samples/pure-comments-disabled/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not rely on pure annotations if they are disabled', options: { treeshake: { annotations: false } } -}; +}); diff --git a/test/form/samples/pure-comments-multiple/_config.js b/test/form/samples/pure-comments-multiple/_config.js index 3c29e89762d..d08a436fa0c 100644 --- a/test/form/samples/pure-comments-multiple/_config.js +++ b/test/form/samples/pure-comments-multiple/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not associate multiple "pure" comments before a token with subsequent tokens' -}; +}); diff --git a/test/form/samples/quote-id/_config.js b/test/form/samples/quote-id/_config.js index eea91ce4747..47aa4ae037b 100644 --- a/test/form/samples/quote-id/_config.js +++ b/test/form/samples/quote-id/_config.js @@ -4,7 +4,7 @@ const external1 = "quoted'\r\n\u2028\u2029external1"; const external2 = path.join(__dirname, "quoted'\r\n\u2028\u2029external2"); const external3 = 'C:\\File\\Path.js'; -module.exports = { +module.exports = defineRollupTest({ description: 'handles escaping for external ids', options: { output: { @@ -35,4 +35,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/re-export-aliasing/_config.js b/test/form/samples/re-export-aliasing/_config.js index ae834c41d3e..9077257dc97 100644 --- a/test/form/samples/re-export-aliasing/_config.js +++ b/test/form/samples/re-export-aliasing/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external re-exports aliasing', options: { output: { @@ -7,4 +7,4 @@ module.exports = { }, external: ['d'] } -}; +}); diff --git a/test/form/samples/reassigned-exported-functions-and-classes/_config.js b/test/form/samples/reassigned-exported-functions-and-classes/_config.js index 3f84a3334e9..8f6d7a4a645 100644 --- a/test/form/samples/reassigned-exported-functions-and-classes/_config.js +++ b/test/form/samples/reassigned-exported-functions-and-classes/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'use legal names for exported functions and classed (#1943)', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/recursive-assignments/_config.js b/test/form/samples/recursive-assignments/_config.js index f14e7c21536..9e6cda7cac3 100644 --- a/test/form/samples/recursive-assignments/_config.js +++ b/test/form/samples/recursive-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not fail for pathological recursive algorithms and circular structures' -}; +}); diff --git a/test/form/samples/recursive-calls/_config.js b/test/form/samples/recursive-calls/_config.js index 7258d5addec..b3cafdfc7c5 100644 --- a/test/form/samples/recursive-calls/_config.js +++ b/test/form/samples/recursive-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not fail for recursive calls' -}; +}); diff --git a/test/form/samples/recursive-computed-members/_config.js b/test/form/samples/recursive-computed-members/_config.js index acd88490a08..15c2a152ac1 100644 --- a/test/form/samples/recursive-computed-members/_config.js +++ b/test/form/samples/recursive-computed-members/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handle recursive computed member access' -}; +}); diff --git a/test/form/samples/recursive-literal-values/_config.js b/test/form/samples/recursive-literal-values/_config.js index 490e29b384d..43618dff00b 100644 --- a/test/form/samples/recursive-literal-values/_config.js +++ b/test/form/samples/recursive-literal-values/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not fail for literal values from recursive return values' -}; +}); diff --git a/test/form/samples/recursive-multi-expressions/_config.js b/test/form/samples/recursive-multi-expressions/_config.js index 44fd55b6d27..00f0a1bcd41 100644 --- a/test/form/samples/recursive-multi-expressions/_config.js +++ b/test/form/samples/recursive-multi-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles recursive multi-expressions' -}; +}); diff --git a/test/form/samples/recursive-return-value-assignments/_config.js b/test/form/samples/recursive-return-value-assignments/_config.js index 66c2c686fe9..4b056241e38 100644 --- a/test/form/samples/recursive-return-value-assignments/_config.js +++ b/test/form/samples/recursive-return-value-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handle recursive reassignments of return values' -}; +}); diff --git a/test/form/samples/recursive-this-deoptimization/_config.js b/test/form/samples/recursive-this-deoptimization/_config.js index 832af26c7e5..9a1c308d9c3 100644 --- a/test/form/samples/recursive-this-deoptimization/_config.js +++ b/test/form/samples/recursive-this-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles recursive "this" deoptimizations (#4089)' -}; +}); diff --git a/test/form/samples/recursive-values/_config.js b/test/form/samples/recursive-values/_config.js index f14e7c21536..9e6cda7cac3 100644 --- a/test/form/samples/recursive-values/_config.js +++ b/test/form/samples/recursive-values/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not fail for pathological recursive algorithms and circular structures' -}; +}); diff --git a/test/form/samples/redeclarations/_config.js b/test/form/samples/redeclarations/_config.js index 17e93c970a1..83c5aab5d5c 100644 --- a/test/form/samples/redeclarations/_config.js +++ b/test/form/samples/redeclarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'make sure re-declarations via var and function are linked properly' -}; +}); diff --git a/test/form/samples/reexport-external-default-and-name/_config.js b/test/form/samples/reexport-external-default-and-name/_config.js index 6e8c12c648f..8903223ab2d 100644 --- a/test/form/samples/reexport-external-default-and-name/_config.js +++ b/test/form/samples/reexport-external-default-and-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'reexports a an external default as a name and imports another name from that dependency', expectedWarnings: ['MIXED_EXPORTS'], @@ -9,4 +9,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/reexport-external-default-and-namespace/_config.js b/test/form/samples/reexport-external-default-and-namespace/_config.js index 6af73286dd4..ac12d82bcf5 100644 --- a/test/form/samples/reexport-external-default-and-namespace/_config.js +++ b/test/form/samples/reexport-external-default-and-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'reexports a default external import as default export (when using named exports)', options: { output: { @@ -8,4 +8,4 @@ module.exports = { }, external: ['external'] } -}; +}); diff --git a/test/form/samples/reexport-external-default-as-name-and-name/_config.js b/test/form/samples/reexport-external-default-as-name-and-name/_config.js index 5ccfb6e52a1..6b0abd2ca96 100644 --- a/test/form/samples/reexport-external-default-as-name-and-name/_config.js +++ b/test/form/samples/reexport-external-default-as-name-and-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exports a named external export as default', expectedWarnings: ['MIXED_EXPORTS'], options: { @@ -8,4 +8,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/reexport-external-default/_config.js b/test/form/samples/reexport-external-default/_config.js index 17dee117ebb..a9eeeec8025 100644 --- a/test/form/samples/reexport-external-default/_config.js +++ b/test/form/samples/reexport-external-default/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'reexports an external default export', options: { external: ['external1', 'external2'], @@ -7,4 +7,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/reexport-external-name-as-default/_config.js b/test/form/samples/reexport-external-name-as-default/_config.js index 76bfd0844be..acb3d2a0edf 100644 --- a/test/form/samples/reexport-external-name-as-default/_config.js +++ b/test/form/samples/reexport-external-name-as-default/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exports a named external export as default', options: { external: ['external'], @@ -7,4 +7,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/reexport-external-name-as-default2/_config.js b/test/form/samples/reexport-external-name-as-default2/_config.js index ca3e78aa86f..5738122f73a 100644 --- a/test/form/samples/reexport-external-name-as-default2/_config.js +++ b/test/form/samples/reexport-external-name-as-default2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exports a named external export as default via another file', options: { external: ['external'], @@ -7,4 +7,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/reexport-external-name/_config.js b/test/form/samples/reexport-external-name/_config.js index e64e3c7b2c0..dce887e7886 100644 --- a/test/form/samples/reexport-external-name/_config.js +++ b/test/form/samples/reexport-external-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exports a named export from an external module', options: { external: ['external1', 'external2'], @@ -7,4 +7,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/reexport-external-namespace-as/_config.js b/test/form/samples/reexport-external-namespace-as/_config.js index e2705de62c3..6369e035f59 100644 --- a/test/form/samples/reexport-external-namespace-as/_config.js +++ b/test/form/samples/reexport-external-namespace-as/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'reexport external namespace as name', options: { external: 'external', @@ -7,4 +7,4 @@ module.exports = { globals: { external: 'external' } } } -}; +}); diff --git a/test/form/samples/reexport-external-namespace/_config.js b/test/form/samples/reexport-external-namespace/_config.js index 9ffdafe8b0f..2a21b5dc942 100644 --- a/test/form/samples/reexport-external-namespace/_config.js +++ b/test/form/samples/reexport-external-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exports * from external module (#791)', options: { external: ['external'], @@ -7,4 +7,4 @@ module.exports = { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/reexport-self/_config.js b/test/form/samples/reexport-self/_config.js index f979e6e90b0..08d18b37168 100644 --- a/test/form/samples/reexport-self/_config.js +++ b/test/form/samples/reexport-self/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles recursions when a module reexports its own namespace', expectedWarnings: ['CIRCULAR_DEPENDENCY'] -}; +}); diff --git a/test/form/samples/reexport-star-deshadow/_config.js b/test/form/samples/reexport-star-deshadow/_config.js index 29ceb658128..49f95ef3f0f 100644 --- a/test/form/samples/reexport-star-deshadow/_config.js +++ b/test/form/samples/reexport-star-deshadow/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Star reexports scope deshadowing', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/reexport-used-external-namespace-as/_config.js b/test/form/samples/reexport-used-external-namespace-as/_config.js index cd50e2c3816..838234690f2 100644 --- a/test/form/samples/reexport-used-external-namespace-as/_config.js +++ b/test/form/samples/reexport-used-external-namespace-as/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'reexport external namespace as name if the namespace is also used', options: { external: ['external1', 'external2'], @@ -10,4 +10,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/relative-external-ids/_config.js b/test/form/samples/relative-external-ids/_config.js index 706cb8a42d4..612fa43c9b1 100644 --- a/test/form/samples/relative-external-ids/_config.js +++ b/test/form/samples/relative-external-ids/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'relative external ids are absolutely resolved', options: { external(id) { @@ -44,4 +44,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/relative-external-with-global/_config.js b/test/form/samples/relative-external-with-global/_config.js index 01f81afad86..6d54c2cbadd 100644 --- a/test/form/samples/relative-external-with-global/_config.js +++ b/test/form/samples/relative-external-with-global/_config.js @@ -2,10 +2,10 @@ const { resolve } = require('node:path'); const throttle = resolve(__dirname, 'lib/throttle.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'applies globals to externalised relative imports', options: { external: [throttle], output: { globals: { [throttle]: 'Lib.throttle' } } } -}; +}); diff --git a/test/form/samples/remove-invalid-pure-comments/_config.js b/test/form/samples/remove-invalid-pure-comments/_config.js index f3066021ab3..639a44e7932 100644 --- a/test/form/samples/remove-invalid-pure-comments/_config.js +++ b/test/form/samples/remove-invalid-pure-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes invalidly placed pure annotations' -}; +}); diff --git a/test/form/samples/remove-tree-shaken-pure-comments/_config.js b/test/form/samples/remove-tree-shaken-pure-comments/_config.js index 39021abc906..0bd5b9fc69e 100644 --- a/test/form/samples/remove-tree-shaken-pure-comments/_config.js +++ b/test/form/samples/remove-tree-shaken-pure-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes pure comments of tree-shaken nodes' -}; +}); diff --git a/test/form/samples/remove-treeshaken-banners/_config.js b/test/form/samples/remove-treeshaken-banners/_config.js index 4010568ad64..5bec9823264 100644 --- a/test/form/samples/remove-treeshaken-banners/_config.js +++ b/test/form/samples/remove-treeshaken-banners/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Also remove banner comments when completely tree-shaking files' -}; +}); diff --git a/test/form/samples/removes-existing-sourcemap-comments/_config.js b/test/form/samples/removes-existing-sourcemap-comments/_config.js index e1b917ab239..e26213f4c15 100644 --- a/test/form/samples/removes-existing-sourcemap-comments/_config.js +++ b/test/form/samples/removes-existing-sourcemap-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes existing sourcemap comments' -}; +}); diff --git a/test/form/samples/removes-unused-babel-helpers/_config.js b/test/form/samples/removes-unused-babel-helpers/_config.js index c81966dc963..d5adad021bc 100644 --- a/test/form/samples/removes-unused-babel-helpers/_config.js +++ b/test/form/samples/removes-unused-babel-helpers/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Removes unused babel helpers from the build (#1595)', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/renamed-pattern-defaults/_config.js b/test/form/samples/renamed-pattern-defaults/_config.js index e9b8d2cf3ae..ce48515586c 100644 --- a/test/form/samples/renamed-pattern-defaults/_config.js +++ b/test/form/samples/renamed-pattern-defaults/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deconflicting of variables used as defaults in patterns (#2445)' -}; +}); diff --git a/test/form/samples/render-chunk-plugin-sourcemaps/_config.js b/test/form/samples/render-chunk-plugin-sourcemaps/_config.js index bcfbc1fc56a..8c956dcb2d4 100644 --- a/test/form/samples/render-chunk-plugin-sourcemaps/_config.js +++ b/test/form/samples/render-chunk-plugin-sourcemaps/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports returning undefined source maps from render chunk hooks, when source maps are enabled', expectedWarnings: ['SOURCEMAP_BROKEN'], @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/render-chunk-plugin/_config.js b/test/form/samples/render-chunk-plugin/_config.js index 651cd70612a..508b1cb637b 100644 --- a/test/form/samples/render-chunk-plugin/_config.js +++ b/test/form/samples/render-chunk-plugin/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows plugins to hook render chunk', options: { plugins: [ @@ -14,4 +14,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/render-declaration-semicolons/_config.js b/test/form/samples/render-declaration-semicolons/_config.js index 737c5f4a39d..f71fdcf4311 100644 --- a/test/form/samples/render-declaration-semicolons/_config.js +++ b/test/form/samples/render-declaration-semicolons/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly inserts semi-colons after declarations (#1993)', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/render-named-export-declarations/_config.js b/test/form/samples/render-named-export-declarations/_config.js index 91835f20a03..bc6c98bfe3a 100644 --- a/test/form/samples/render-named-export-declarations/_config.js +++ b/test/form/samples/render-named-export-declarations/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'renders named export declarations', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/render-removed-declarations/_config.js b/test/form/samples/render-removed-declarations/_config.js index 36bcb953f3d..fe253741757 100644 --- a/test/form/samples/render-removed-declarations/_config.js +++ b/test/form/samples/render-removed-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'renders tree-shaken variable declarations' -}; +}); diff --git a/test/form/samples/render-removed-statements/_config.js b/test/form/samples/render-removed-statements/_config.js index 5c3fac4b9ef..b9297d46fe6 100644 --- a/test/form/samples/render-removed-statements/_config.js +++ b/test/form/samples/render-removed-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'make sure removed statements do no leave unwanted white-space' -}; +}); diff --git a/test/form/samples/reserved-keywords-in-imports-exports/_config.js b/test/form/samples/reserved-keywords-in-imports-exports/_config.js index bfebfd0cf71..c0bb16e3e32 100644 --- a/test/form/samples/reserved-keywords-in-imports-exports/_config.js +++ b/test/form/samples/reserved-keywords-in-imports-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles reserved keywords in exports/imports', options: { input: ['main'], @@ -7,4 +7,4 @@ module.exports = { }, external: ['external'] } -}; +}); diff --git a/test/form/samples/resolution-order/_config.js b/test/form/samples/resolution-order/_config.js index 44ee6d650f3..74204bf23fc 100644 --- a/test/form/samples/resolution-order/_config.js +++ b/test/form/samples/resolution-order/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not depend on the resolution order of modules for tree-shaking (#2753)', options: { plugins: { @@ -9,4 +9,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/resolve-external-dynamic-imports/_config.js b/test/form/samples/resolve-external-dynamic-imports/_config.js index abc5a1fa758..8007d7d14d3 100644 --- a/test/form/samples/resolve-external-dynamic-imports/_config.js +++ b/test/form/samples/resolve-external-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not resolve external dynamic imports via plugins (#2481)', options: { output: { @@ -18,4 +18,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/resolve-import-meta-url-export/_config.js b/test/form/samples/resolve-import-meta-url-export/_config.js index ca2e7fb0fc6..02a203e55e4 100644 --- a/test/form/samples/resolve-import-meta-url-export/_config.js +++ b/test/form/samples/resolve-import-meta-url-export/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly exports resolved import.meta.url', options: { plugins: [ @@ -10,4 +10,4 @@ module.exports = { ], output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/resolve-import-meta-url/_config.js b/test/form/samples/resolve-import-meta-url/_config.js index 2680aed0622..1ef68ced151 100644 --- a/test/form/samples/resolve-import-meta-url/_config.js +++ b/test/form/samples/resolve-import-meta-url/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to configure import.meta.url', options: { plugins: [ @@ -24,4 +24,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/return-after-error/_config.js b/test/form/samples/return-after-error/_config.js index e45fd11d277..2d0660c9e96 100644 --- a/test/form/samples/return-after-error/_config.js +++ b/test/form/samples/return-after-error/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tree-shakes entities referenced in a return statement after an error' -}; +}); diff --git a/test/form/samples/return-statement/missing-space/_config.js b/test/form/samples/return-statement/missing-space/_config.js index ab1265aacfe..ada2659fe1e 100644 --- a/test/form/samples/return-statement/missing-space/_config.js +++ b/test/form/samples/return-statement/missing-space/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Inserts space when simplifying return statement without space' -}; +}); diff --git a/test/form/samples/return-value-access-in-conditional/_config.js b/test/form/samples/return-value-access-in-conditional/_config.js index e6a08be106d..9f637d1f7f2 100644 --- a/test/form/samples/return-value-access-in-conditional/_config.js +++ b/test/form/samples/return-value-access-in-conditional/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles accessing funciton return values in deoptimized conditionals' -}; +}); diff --git a/test/form/samples/runs-output-plugins-last/_config.js b/test/form/samples/runs-output-plugins-last/_config.js index 69c2baad70a..ffb7593a33c 100644 --- a/test/form/samples/runs-output-plugins-last/_config.js +++ b/test/form/samples/runs-output-plugins-last/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'runs output plugins last', options: { plugins: [ @@ -20,4 +20,4 @@ module.exports = { ] } } -}; +}); diff --git a/test/form/samples/self-calling-function-with-effects/_config.js b/test/form/samples/self-calling-function-with-effects/_config.js index d20f89b9526..144ec0b5057 100644 --- a/test/form/samples/self-calling-function-with-effects/_config.js +++ b/test/form/samples/self-calling-function-with-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'discards a self-calling function with side-effects' -}; +}); diff --git a/test/form/samples/self-calling-function/_config.js b/test/form/samples/self-calling-function/_config.js index 7629c502687..1e0c2443d2c 100644 --- a/test/form/samples/self-calling-function/_config.js +++ b/test/form/samples/self-calling-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'discards a self-calling function without side-effects', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/self-contained-bundle/_config.js b/test/form/samples/self-contained-bundle/_config.js index 29f06f02379..ca105e3c465 100644 --- a/test/form/samples/self-contained-bundle/_config.js +++ b/test/form/samples/self-contained-bundle/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'self-contained bundle' -}; +}); diff --git a/test/form/samples/self-deoptimization/_config.js b/test/form/samples/self-deoptimization/_config.js index d86ca391dc4..5231a107c4a 100644 --- a/test/form/samples/self-deoptimization/_config.js +++ b/test/form/samples/self-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles situations where a member expression is deoptimized while being deoptimized' -}; +}); diff --git a/test/form/samples/sequence-expression/_config.js b/test/form/samples/sequence-expression/_config.js index 0b822def3d8..8e61b6befe9 100644 --- a/test/form/samples/sequence-expression/_config.js +++ b/test/form/samples/sequence-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'only retain expressions with effects in sequence expressions (#1649)' -}; +}); diff --git a/test/form/samples/shorthand-properties/_config.js b/test/form/samples/shorthand-properties/_config.js index deb929d1baf..3da366d157b 100644 --- a/test/form/samples/shorthand-properties/_config.js +++ b/test/form/samples/shorthand-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'expands shorthand properties as necessary (#61)' -}; +}); diff --git a/test/form/samples/side-effect-b/_config.js b/test/form/samples/side-effect-b/_config.js index e4f8f851539..d8a462c1747 100644 --- a/test/form/samples/side-effect-b/_config.js +++ b/test/form/samples/side-effect-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'discards IIFE with no side-effects', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-c/_config.js b/test/form/samples/side-effect-c/_config.js index 714bb2229ec..1a74f333ca0 100644 --- a/test/form/samples/side-effect-c/_config.js +++ b/test/form/samples/side-effect-c/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'discards function with no side-effects', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-d/_config.js b/test/form/samples/side-effect-d/_config.js index 06becb0d14e..23d4ce4abc5 100644 --- a/test/form/samples/side-effect-d/_config.js +++ b/test/form/samples/side-effect-d/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'excludes functions that are known to be pure', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-default-reexport/_config.js b/test/form/samples/side-effect-default-reexport/_config.js index 65e80f04d56..a2e4b430c26 100644 --- a/test/form/samples/side-effect-default-reexport/_config.js +++ b/test/form/samples/side-effect-default-reexport/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Observes side-effects in side-effect-free modules that contain a used default export that just reexports from another module', options: { treeshake: { moduleSideEffects: false } } -}; +}); diff --git a/test/form/samples/side-effect-e/_config.js b/test/form/samples/side-effect-e/_config.js index b3dabc06992..990d28dfe77 100644 --- a/test/form/samples/side-effect-e/_config.js +++ b/test/form/samples/side-effect-e/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'accounts for local scopes when tested function purity', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-es5-classes/_config.js b/test/form/samples/side-effect-es5-classes/_config.js index 1be04e395eb..25d7c59128a 100644 --- a/test/form/samples/side-effect-es5-classes/_config.js +++ b/test/form/samples/side-effect-es5-classes/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'omits ES5 classes which are pure (e.g. they only assign to `this`)', expectedWarnings: ['THIS_IS_UNDEFINED'] -}; +}); diff --git a/test/form/samples/side-effect-f/_config.js b/test/form/samples/side-effect-f/_config.js index d2f7e3e35da..160f31686b7 100644 --- a/test/form/samples/side-effect-f/_config.js +++ b/test/form/samples/side-effect-f/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'disregards side-effects that are contained within a function', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-g/_config.js b/test/form/samples/side-effect-g/_config.js index 04e30755ac9..5942c6de2ce 100644 --- a/test/form/samples/side-effect-g/_config.js +++ b/test/form/samples/side-effect-g/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'excludes constructors that are known to be pure', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-h/_config.js b/test/form/samples/side-effect-h/_config.js index 7100614789f..115799f6b7a 100644 --- a/test/form/samples/side-effect-h/_config.js +++ b/test/form/samples/side-effect-h/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes throw statements', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-i/_config.js b/test/form/samples/side-effect-i/_config.js index ec18a4d3ecd..f42d77df5e9 100644 --- a/test/form/samples/side-effect-i/_config.js +++ b/test/form/samples/side-effect-i/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes top-level throw statements', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-j/_config.js b/test/form/samples/side-effect-j/_config.js index adc9ac05c35..f0fa7558b96 100644 --- a/test/form/samples/side-effect-j/_config.js +++ b/test/form/samples/side-effect-j/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes late function declarations with side-effects', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-k/_config.js b/test/form/samples/side-effect-k/_config.js index 716b5410714..5262ea3f234 100644 --- a/test/form/samples/side-effect-k/_config.js +++ b/test/form/samples/side-effect-k/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'use of arguments is treated as a side-effect', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-l/_config.js b/test/form/samples/side-effect-l/_config.js index ec762ed9126..91bf7b45fa5 100644 --- a/test/form/samples/side-effect-l/_config.js +++ b/test/form/samples/side-effect-l/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'discards function with no side-effects in imported module', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/side-effect-m/_config.js b/test/form/samples/side-effect-m/_config.js index c44f44e9455..3b01f885998 100644 --- a/test/form/samples/side-effect-m/_config.js +++ b/test/form/samples/side-effect-m/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects in circular function calls', expectedWarnings: ['CIRCULAR_DEPENDENCY'] -}; +}); diff --git a/test/form/samples/side-effect-n/_config.js b/test/form/samples/side-effect-n/_config.js index 9896c14d057..742ab13a983 100644 --- a/test/form/samples/side-effect-n/_config.js +++ b/test/form/samples/side-effect-n/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects in complex call expressions' -}; +}); diff --git a/test/form/samples/side-effect-o/_config.js b/test/form/samples/side-effect-o/_config.js index 9896c14d057..742ab13a983 100644 --- a/test/form/samples/side-effect-o/_config.js +++ b/test/form/samples/side-effect-o/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects in complex call expressions' -}; +}); diff --git a/test/form/samples/side-effect-p/_config.js b/test/form/samples/side-effect-p/_config.js index 7a8d84b4c1e..27fc82737bf 100644 --- a/test/form/samples/side-effect-p/_config.js +++ b/test/form/samples/side-effect-p/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects mutation of globals' -}; +}); diff --git a/test/form/samples/side-effect-q/_config.js b/test/form/samples/side-effect-q/_config.js index 542135c0d96..991cb23b15c 100644 --- a/test/form/samples/side-effect-q/_config.js +++ b/test/form/samples/side-effect-q/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'discards effects in conditional expressions with known test values', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/side-effect-r/_config.js b/test/form/samples/side-effect-r/_config.js index 160946bb6a1..f076f211f08 100644 --- a/test/form/samples/side-effect-r/_config.js +++ b/test/form/samples/side-effect-r/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'discards unused function expression assigned to a variable that calls itself and a global', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/side-effect-s/_config.js b/test/form/samples/side-effect-s/_config.js index 83665339a11..c0e5b04aead 100644 --- a/test/form/samples/side-effect-s/_config.js +++ b/test/form/samples/side-effect-s/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'discards unused function expression assigned to a variable that calls itself and has side effects', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/side-effect-t/_config.js b/test/form/samples/side-effect-t/_config.js index 11092704b09..23e5fea665f 100644 --- a/test/form/samples/side-effect-t/_config.js +++ b/test/form/samples/side-effect-t/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throw statement is a side effect', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effect-with-plusplus-expression/_config.js b/test/form/samples/side-effect-with-plusplus-expression/_config.js index a1d93a75228..5da9caabb09 100644 --- a/test/form/samples/side-effect-with-plusplus-expression/_config.js +++ b/test/form/samples/side-effect-with-plusplus-expression/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly drop side-effect free statements in presence of update expression (#1564)', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/side-effect/_config.js b/test/form/samples/side-effect/_config.js index 0431077dba2..f9535515b2c 100644 --- a/test/form/samples/side-effect/_config.js +++ b/test/form/samples/side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'side-effects to non-globals are not blindly included' -}; +}); diff --git a/test/form/samples/side-effects-await/_config.js b/test/form/samples/side-effects-await/_config.js index 4f4ad0a1e63..b6fd5de3070 100644 --- a/test/form/samples/side-effects-await/_config.js +++ b/test/form/samples/side-effects-await/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'await statements should never be dropped if a function has other side-effects (#1584)' -}; +}); diff --git a/test/form/samples/side-effects-break-statements/_config.js b/test/form/samples/side-effects-break-statements/_config.js index ba247f1280e..2fa772e660c 100644 --- a/test/form/samples/side-effects-break-statements/_config.js +++ b/test/form/samples/side-effects-break-statements/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'break statements should always by included but not always cause their parents to have effects', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effects-call-arguments/_config.js b/test/form/samples/side-effects-call-arguments/_config.js index d8ee57e3e6b..aa36a59a794 100644 --- a/test/form/samples/side-effects-call-arguments/_config.js +++ b/test/form/samples/side-effects-call-arguments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'side-effects in call arguments should be included' -}; +}); diff --git a/test/form/samples/side-effects-class-getters-setters/_config.js b/test/form/samples/side-effects-class-getters-setters/_config.js index 201e3e082f9..deca5c7097a 100644 --- a/test/form/samples/side-effects-class-getters-setters/_config.js +++ b/test/form/samples/side-effects-class-getters-setters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treat getters and setters on classes as function calls' -}; +}); diff --git a/test/form/samples/side-effects-computed-pattern-keys/_config.js b/test/form/samples/side-effects-computed-pattern-keys/_config.js index a2a2961f07f..616a71dec62 100644 --- a/test/form/samples/side-effects-computed-pattern-keys/_config.js +++ b/test/form/samples/side-effects-computed-pattern-keys/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'side-effects in with computed pattern keys should not be ignored' -}; +}); diff --git a/test/form/samples/side-effects-delete/_config.js b/test/form/samples/side-effects-delete/_config.js index a5afb4f8c79..82c50068b89 100644 --- a/test/form/samples/side-effects-delete/_config.js +++ b/test/form/samples/side-effects-delete/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'delete is only a side-effect for included variables', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effects-es6-class-declarations/_config.js b/test/form/samples/side-effects-es6-class-declarations/_config.js index 29ad84ec965..21e4278911e 100644 --- a/test/form/samples/side-effects-es6-class-declarations/_config.js +++ b/test/form/samples/side-effects-es6-class-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'determine side effects in ES6 class declarations' -}; +}); diff --git a/test/form/samples/side-effects-es6-class-expressions/_config.js b/test/form/samples/side-effects-es6-class-expressions/_config.js index 78ff5788610..e2169f0ca4e 100644 --- a/test/form/samples/side-effects-es6-class-expressions/_config.js +++ b/test/form/samples/side-effects-es6-class-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'determine side effects in ES6 class expressions' -}; +}); diff --git a/test/form/samples/side-effects-es6-super-classes/_config.js b/test/form/samples/side-effects-es6-super-classes/_config.js index 83e0fc4332b..9d1235b9b9b 100644 --- a/test/form/samples/side-effects-es6-super-classes/_config.js +++ b/test/form/samples/side-effects-es6-super-classes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'determine side effects in ES6 super classes' -}; +}); diff --git a/test/form/samples/side-effects-expressions-as-statements/_config.js b/test/form/samples/side-effects-expressions-as-statements/_config.js index cffa37c9628..1f1b8e1ddb3 100644 --- a/test/form/samples/side-effects-expressions-as-statements/_config.js +++ b/test/form/samples/side-effects-expressions-as-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'in order to keep certain getter calls, do not remove some expression statements' -}; +}); diff --git a/test/form/samples/side-effects-generators/_config.js b/test/form/samples/side-effects-generators/_config.js index cc50ee5553a..5485ce6a35d 100644 --- a/test/form/samples/side-effects-generators/_config.js +++ b/test/form/samples/side-effects-generators/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Properly detect side-effects in generator functions' -}; +}); diff --git a/test/form/samples/side-effects-getters-and-setters/_config.js b/test/form/samples/side-effects-getters-and-setters/_config.js index 2ac2ab26753..759a62e2c76 100644 --- a/test/form/samples/side-effects-getters-and-setters/_config.js +++ b/test/form/samples/side-effects-getters-and-setters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treat getters and setters as function calls' -}; +}); diff --git a/test/form/samples/side-effects-in-template-literals/_config.js b/test/form/samples/side-effects-in-template-literals/_config.js index 61c8d75330d..9e3c01e8a52 100644 --- a/test/form/samples/side-effects-in-template-literals/_config.js +++ b/test/form/samples/side-effects-in-template-literals/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects in template literals and tagged template expressions', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effects-internal-modules/_config.js b/test/form/samples/side-effects-internal-modules/_config.js index f4befd00100..e96ab3c6a54 100644 --- a/test/form/samples/side-effects-internal-modules/_config.js +++ b/test/form/samples/side-effects-internal-modules/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const VIRTUAL_ID = '\0virtual'; -module.exports = { +module.exports = defineRollupTest({ description: 'does not pass internal modules to moduleSideEffects', expectedWarnings: ['EMPTY_BUNDLE'], options: { @@ -25,4 +25,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/side-effects-logical-expressions/_config.js b/test/form/samples/side-effects-logical-expressions/_config.js index c836fb6ccb7..9c163f4d6d1 100644 --- a/test/form/samples/side-effects-logical-expressions/_config.js +++ b/test/form/samples/side-effects-logical-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'only evaluate the second part of a logical expression if necessary' -}; +}); diff --git a/test/form/samples/side-effects-object-literal-calls/_config.js b/test/form/samples/side-effects-object-literal-calls/_config.js index ffc52c259c1..a99e74ac134 100644 --- a/test/form/samples/side-effects-object-literal-calls/_config.js +++ b/test/form/samples/side-effects-object-literal-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects when mutating object literals' -}; +}); diff --git a/test/form/samples/side-effects-object-literal-mutation-misc/_config.js b/test/form/samples/side-effects-object-literal-mutation-misc/_config.js index d94d592cf65..971337e47a0 100644 --- a/test/form/samples/side-effects-object-literal-mutation-misc/_config.js +++ b/test/form/samples/side-effects-object-literal-mutation-misc/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects when setting and/or calling properties on object literals', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/side-effects-object-literal-mutation/_config.js b/test/form/samples/side-effects-object-literal-mutation/_config.js index ffc52c259c1..a99e74ac134 100644 --- a/test/form/samples/side-effects-object-literal-mutation/_config.js +++ b/test/form/samples/side-effects-object-literal-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects when mutating object literals' -}; +}); diff --git a/test/form/samples/side-effects-pattern-assignment/_config.js b/test/form/samples/side-effects-pattern-assignment/_config.js index da2ca598ba6..95f1b6626f8 100644 --- a/test/form/samples/side-effects-pattern-assignment/_config.js +++ b/test/form/samples/side-effects-pattern-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'side-effects when mutating destructured variables should not be ignored' -}; +}); diff --git a/test/form/samples/side-effects-pattern-defaults/_config.js b/test/form/samples/side-effects-pattern-defaults/_config.js index 004103a15d9..8ce4a5087f7 100644 --- a/test/form/samples/side-effects-pattern-defaults/_config.js +++ b/test/form/samples/side-effects-pattern-defaults/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'side-effects in pattern defaults should not be ignored' -}; +}); diff --git a/test/form/samples/side-effects-prototype-assignments/_config.js b/test/form/samples/side-effects-prototype-assignments/_config.js index b71c53dd0a2..3f286b20ebf 100644 --- a/test/form/samples/side-effects-prototype-assignments/_config.js +++ b/test/form/samples/side-effects-prototype-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'include side-effects with re-assigned prototypes (#953)' -}; +}); diff --git a/test/form/samples/side-effects-reassignment/_config.js b/test/form/samples/side-effects-reassignment/_config.js index c1a20cb442e..27daa446aba 100644 --- a/test/form/samples/side-effects-reassignment/_config.js +++ b/test/form/samples/side-effects-reassignment/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'when mutating/calling a reassigned variable, all assignments should be checked for side-effects' -}; +}); diff --git a/test/form/samples/side-effects-return-statements/_config.js b/test/form/samples/side-effects-return-statements/_config.js index 3d428613c13..303e708258a 100644 --- a/test/form/samples/side-effects-return-statements/_config.js +++ b/test/form/samples/side-effects-return-statements/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'return statements do not have side-effects but should be kept in certain cases (#1585)', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/side-effects-static-methods/_config.js b/test/form/samples/side-effects-static-methods/_config.js index 129d0e1d6de..9adb8d4fea7 100644 --- a/test/form/samples/side-effects-static-methods/_config.js +++ b/test/form/samples/side-effects-static-methods/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allow calls to pure static methods to be tree-shaken' -}; +}); diff --git a/test/form/samples/side-effects-switch-statements/_config.js b/test/form/samples/side-effects-switch-statements/_config.js index b35f375c5b6..abecdf650d2 100644 --- a/test/form/samples/side-effects-switch-statements/_config.js +++ b/test/form/samples/side-effects-switch-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'switch statements should be correctly tree-shaken' -}; +}); diff --git a/test/form/samples/side-effects-this/_config.js b/test/form/samples/side-effects-this/_config.js index 8b7bdfff6eb..433fe17a00e 100644 --- a/test/form/samples/side-effects-this/_config.js +++ b/test/form/samples/side-effects-this/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'When a constructor is called with the new keyword, changing its this has no side effects' -}; +}); diff --git a/test/form/samples/simplified-initializer/_config.js b/test/form/samples/simplified-initializer/_config.js index c893283454c..aa4d6692b13 100644 --- a/test/form/samples/simplified-initializer/_config.js +++ b/test/form/samples/simplified-initializer/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles simplified variable initializers', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/simplify-expression-annotations/_config.js b/test/form/samples/simplify-expression-annotations/_config.js index 8bc62f8c55b..122786e753d 100644 --- a/test/form/samples/simplify-expression-annotations/_config.js +++ b/test/form/samples/simplify-expression-annotations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps correct annotations when simplifying expressinos' -}; +}); diff --git a/test/form/samples/simplify-return-expression/_config.js b/test/form/samples/simplify-return-expression/_config.js index b89cc66704f..a3b11cbe9cb 100644 --- a/test/form/samples/simplify-return-expression/_config.js +++ b/test/form/samples/simplify-return-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Simplifies conditionals in return expression' -}; +}); diff --git a/test/form/samples/skips-dead-branches-b/_config.js b/test/form/samples/skips-dead-branches-b/_config.js index 22c399cee0b..aa22c5cf78e 100644 --- a/test/form/samples/skips-dead-branches-b/_config.js +++ b/test/form/samples/skips-dead-branches-b/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch (b)' -}; +}); diff --git a/test/form/samples/skips-dead-branches-c/_config.js b/test/form/samples/skips-dead-branches-c/_config.js index 86741425441..28ba06ca477 100644 --- a/test/form/samples/skips-dead-branches-c/_config.js +++ b/test/form/samples/skips-dead-branches-c/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch (c)' -}; +}); diff --git a/test/form/samples/skips-dead-branches-d/_config.js b/test/form/samples/skips-dead-branches-d/_config.js index 97791399bf1..cd3aa59b71d 100644 --- a/test/form/samples/skips-dead-branches-d/_config.js +++ b/test/form/samples/skips-dead-branches-d/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch (d)' -}; +}); diff --git a/test/form/samples/skips-dead-branches-e/_config.js b/test/form/samples/skips-dead-branches-e/_config.js index d290c80e60d..791bfd0932a 100644 --- a/test/form/samples/skips-dead-branches-e/_config.js +++ b/test/form/samples/skips-dead-branches-e/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch (e)' -}; +}); diff --git a/test/form/samples/skips-dead-branches-f/_config.js b/test/form/samples/skips-dead-branches-f/_config.js index 9ac1d2340bf..aaaae6c5d5a 100644 --- a/test/form/samples/skips-dead-branches-f/_config.js +++ b/test/form/samples/skips-dead-branches-f/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch (f)' -}; +}); diff --git a/test/form/samples/skips-dead-branches-g/_config.js b/test/form/samples/skips-dead-branches-g/_config.js index f592e056c93..aedec83911b 100644 --- a/test/form/samples/skips-dead-branches-g/_config.js +++ b/test/form/samples/skips-dead-branches-g/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead conditional expression branch (g)' -}; +}); diff --git a/test/form/samples/skips-dead-branches-h/_config.js b/test/form/samples/skips-dead-branches-h/_config.js index 85e8fbe2647..6327a0be138 100644 --- a/test/form/samples/skips-dead-branches-h/_config.js +++ b/test/form/samples/skips-dead-branches-h/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch (h)' -}; +}); diff --git a/test/form/samples/skips-dead-branches-i/_config.js b/test/form/samples/skips-dead-branches-i/_config.js index 95aa9425141..69a49ce1c40 100644 --- a/test/form/samples/skips-dead-branches-i/_config.js +++ b/test/form/samples/skips-dead-branches-i/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch (i)' -}; +}); diff --git a/test/form/samples/skips-dead-branches-j/_config.js b/test/form/samples/skips-dead-branches-j/_config.js index b9abe109dfa..7fcb3437bb8 100644 --- a/test/form/samples/skips-dead-branches-j/_config.js +++ b/test/form/samples/skips-dead-branches-j/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch (j)' -}; +}); diff --git a/test/form/samples/skips-dead-branches/_config.js b/test/form/samples/skips-dead-branches/_config.js index 078856d2ef6..5f9ceef5426 100644 --- a/test/form/samples/skips-dead-branches/_config.js +++ b/test/form/samples/skips-dead-branches/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'skips a dead branch' -}; +}); diff --git a/test/form/samples/slash-in-function-parameters/_config.js b/test/form/samples/slash-in-function-parameters/_config.js index b4865638777..3942553f122 100644 --- a/test/form/samples/slash-in-function-parameters/_config.js +++ b/test/form/samples/slash-in-function-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles slashes in function parameters and correctly inserts missing ids' -}; +}); diff --git a/test/form/samples/sourcemaps-excludesources/_config.js b/test/form/samples/sourcemaps-excludesources/_config.js index 491a8fe6f95..132504b1dda 100644 --- a/test/form/samples/sourcemaps-excludesources/_config.js +++ b/test/form/samples/sourcemaps-excludesources/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correct sourcemaps are written (excluding sourceContent)', skipIfWindows: true, options: { output: { sourcemap: true, sourcemapExcludeSources: true } } -}; +}); diff --git a/test/form/samples/sourcemaps-external/_config.js b/test/form/samples/sourcemaps-external/_config.js index 12501b32b43..fc293aaf399 100644 --- a/test/form/samples/sourcemaps-external/_config.js +++ b/test/form/samples/sourcemaps-external/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correct sourcemaps are written (separate file)', skipIfWindows: true, options: { output: { sourcemap: true } } -}; +}); diff --git a/test/form/samples/sourcemaps-hidden/_config.js b/test/form/samples/sourcemaps-hidden/_config.js index 9aa83cd79dc..2d8194e5bf3 100644 --- a/test/form/samples/sourcemaps-hidden/_config.js +++ b/test/form/samples/sourcemaps-hidden/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correct sourcemaps are written (separate file) without comment', skipIfWindows: true, options: { output: { sourcemap: 'hidden' } } -}; +}); diff --git a/test/form/samples/sourcemaps-inline/_config.js b/test/form/samples/sourcemaps-inline/_config.js index 28ce94fc4d5..4673f97c90f 100644 --- a/test/form/samples/sourcemaps-inline/_config.js +++ b/test/form/samples/sourcemaps-inline/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correct sourcemaps are written (inline)', skipIfWindows: true, options: { output: { sourcemap: 'inline' } } -}; +}); diff --git a/test/form/samples/spacing-after-function-with-semicolon/_config.js b/test/form/samples/spacing-after-function-with-semicolon/_config.js index 316c69d3613..529d8d1eccd 100644 --- a/test/form/samples/spacing-after-function-with-semicolon/_config.js +++ b/test/form/samples/spacing-after-function-with-semicolon/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles superfluous semicolons' -}; +}); diff --git a/test/form/samples/static-block-render/_config.js b/test/form/samples/static-block-render/_config.js index 02def0bb780..4c68ef2473f 100644 --- a/test/form/samples/static-block-render/_config.js +++ b/test/form/samples/static-block-render/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Correctly render treeshaked inline static blocks' -}; +}); diff --git a/test/form/samples/static-class-property-calls/_config.js b/test/form/samples/static-class-property-calls/_config.js index 2983907efde..70cf1f96b1b 100644 --- a/test/form/samples/static-class-property-calls/_config.js +++ b/test/form/samples/static-class-property-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles effects when calling static class properties' -}; +}); diff --git a/test/form/samples/static-method-deoptimization/_config.js b/test/form/samples/static-method-deoptimization/_config.js index 064ca3bc55e..dfcd745e536 100644 --- a/test/form/samples/static-method-deoptimization/_config.js +++ b/test/form/samples/static-method-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids infinite recursions when deoptimizing "this" context' -}; +}); diff --git a/test/form/samples/strict-false/_config.js b/test/form/samples/strict-false/_config.js index dac5b866925..20e196e3615 100644 --- a/test/form/samples/strict-false/_config.js +++ b/test/form/samples/strict-false/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'use strict should not be present', options: { output: { strict: false } } -}; +}); diff --git a/test/form/samples/string-indentation-b/_config.js b/test/form/samples/string-indentation-b/_config.js index f6c6cbeb903..dd86c900059 100644 --- a/test/form/samples/string-indentation-b/_config.js +++ b/test/form/samples/string-indentation-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles multiple var declarations inited to strings (#166)', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/string-indentation/_config.js b/test/form/samples/string-indentation/_config.js index 1aebe39f9ae..c8827d32f1b 100644 --- a/test/form/samples/string-indentation/_config.js +++ b/test/form/samples/string-indentation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'indentation is preserved in multi-line strings' -}; +}); diff --git a/test/form/samples/string-replace-side-effects/_config.js b/test/form/samples/string-replace-side-effects/_config.js index 291a777fcfa..26f85cd1ca0 100644 --- a/test/form/samples/string-replace-side-effects/_config.js +++ b/test/form/samples/string-replace-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not assume string.replace has side effects when called with a string as second argument' -}; +}); diff --git a/test/form/samples/super-class-no-side-effects/_config.js b/test/form/samples/super-class-no-side-effects/_config.js index 7e3165f391f..022a54e4647 100644 --- a/test/form/samples/super-class-no-side-effects/_config.js +++ b/test/form/samples/super-class-no-side-effects/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Does not wrongly attribute side effects when the super class of an unused class is in a file without side effects (#4808)', options: { treeshake: { moduleSideEffects: false } } -}; +}); diff --git a/test/form/samples/super-classes/super-class-prototype-access/_config.js b/test/form/samples/super-classes/super-class-prototype-access/_config.js index 6bac45041bb..120e37c3245 100644 --- a/test/form/samples/super-classes/super-class-prototype-access/_config.js +++ b/test/form/samples/super-classes/super-class-prototype-access/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly resolves the prototype of the super class when accessing properties' -}; +}); diff --git a/test/form/samples/super-classes/super-class-prototype-assignment/_config.js b/test/form/samples/super-classes/super-class-prototype-assignment/_config.js index dd974952e7f..4b02e149fa4 100644 --- a/test/form/samples/super-classes/super-class-prototype-assignment/_config.js +++ b/test/form/samples/super-classes/super-class-prototype-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly resolves the prototype of the super class when assigning properites' -}; +}); diff --git a/test/form/samples/super-classes/super-class-prototype-calls/_config.js b/test/form/samples/super-classes/super-class-prototype-calls/_config.js index f0d4045a4f9..9ede530321b 100644 --- a/test/form/samples/super-classes/super-class-prototype-calls/_config.js +++ b/test/form/samples/super-classes/super-class-prototype-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly resolves the prototype of the super class when calling properties' -}; +}); diff --git a/test/form/samples/super-classes/super-class-prototype-values/_config.js b/test/form/samples/super-classes/super-class-prototype-values/_config.js index 0f3f274db77..6418aacde29 100644 --- a/test/form/samples/super-classes/super-class-prototype-values/_config.js +++ b/test/form/samples/super-classes/super-class-prototype-values/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly resolves the prototype of the super class when reading property values' -}; +}); diff --git a/test/form/samples/supports-core-js/_config.js b/test/form/samples/supports-core-js/_config.js index ffbfcc0adea..ba254493122 100644 --- a/test/form/samples/supports-core-js/_config.js +++ b/test/form/samples/supports-core-js/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports core-js', options: { // check against tree-shake: false when updating the polyfill @@ -8,4 +8,4 @@ module.exports = { require('@rollup/plugin-commonjs')() ] } -}; +}); diff --git a/test/form/samples/supports-es5-shim/_config.js b/test/form/samples/supports-es5-shim/_config.js index f107d95a931..49921cc36cb 100644 --- a/test/form/samples/supports-es5-shim/_config.js +++ b/test/form/samples/supports-es5-shim/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports es5-shim', options: { onwarn(warning) { @@ -14,4 +14,4 @@ module.exports = { require('@rollup/plugin-commonjs')() ] } -}; +}); diff --git a/test/form/samples/supports-es6-shim/_config.js b/test/form/samples/supports-es6-shim/_config.js index 0697dbda361..a2196f30b1c 100644 --- a/test/form/samples/supports-es6-shim/_config.js +++ b/test/form/samples/supports-es6-shim/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports es6-shim', options: { onwarn(warning) { @@ -13,4 +13,4 @@ module.exports = { require('@rollup/plugin-commonjs')() ] } -}; +}); diff --git a/test/form/samples/switch-scopes/_config.js b/test/form/samples/switch-scopes/_config.js index 79a7b97dd61..2b72ba5cbaf 100644 --- a/test/form/samples/switch-scopes/_config.js +++ b/test/form/samples/switch-scopes/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles switch scopes', options: { output: { name: 'myBundle' } } -}; +}); diff --git a/test/form/samples/synthetic-named-exports/_config.js b/test/form/samples/synthetic-named-exports/_config.js index 65eff57dc5c..7a6f31db4ae 100644 --- a/test/form/samples/synthetic-named-exports/_config.js +++ b/test/form/samples/synthetic-named-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'synthetic named exports', options: { plugins: [ @@ -26,4 +26,4 @@ export default d;`, } ] } -}; +}); diff --git a/test/form/samples/system-comments/_config.js b/test/form/samples/system-comments/_config.js index 074f8c0a72e..53592ac733e 100644 --- a/test/form/samples/system-comments/_config.js +++ b/test/form/samples/system-comments/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Correctly places leading comments when rendering system bindings', options: { output: { format: 'system' } } -}; +}); diff --git a/test/form/samples/system-default-comments/_config.js b/test/form/samples/system-default-comments/_config.js index 1054b71b8a2..81706c4e31a 100644 --- a/test/form/samples/system-default-comments/_config.js +++ b/test/form/samples/system-default-comments/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Correctly places leading comments when rendering system default exports', options: { output: { format: 'system' } } -}; +}); diff --git a/test/form/samples/system-export-declarations/_config.js b/test/form/samples/system-export-declarations/_config.js index 0c60c7ff7cb..62bece33a0f 100644 --- a/test/form/samples/system-export-declarations/_config.js +++ b/test/form/samples/system-export-declarations/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Renders declarations where some variables are exported', options: { output: { format: 'system' } } -}; +}); diff --git a/test/form/samples/system-export-destructuring-declaration/_config.js b/test/form/samples/system-export-destructuring-declaration/_config.js index db198f829d5..5e253b35461 100644 --- a/test/form/samples/system-export-destructuring-declaration/_config.js +++ b/test/form/samples/system-export-destructuring-declaration/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports destructuring declarations for systemJS', options: { output: { format: 'system' } } -}; +}); diff --git a/test/form/samples/system-export-rendering-compact/_config.js b/test/form/samples/system-export-rendering-compact/_config.js index c06f8a33114..4420969ba55 100644 --- a/test/form/samples/system-export-rendering-compact/_config.js +++ b/test/form/samples/system-export-rendering-compact/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Renders updates of exported variables for SystemJS output in compact mode', options: { output: { @@ -6,4 +6,4 @@ module.exports = { compact: true } } -}; +}); diff --git a/test/form/samples/system-export-rendering/_config.js b/test/form/samples/system-export-rendering/_config.js index 846122a4c7c..e561f0473fd 100644 --- a/test/form/samples/system-export-rendering/_config.js +++ b/test/form/samples/system-export-rendering/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Renders updates of exported variables for SystemJS output', options: { output: { format: 'system' } } -}; +}); diff --git a/test/form/samples/system-module-reserved/_config.js b/test/form/samples/system-module-reserved/_config.js index 0da470d6610..c7c9698a237 100644 --- a/test/form/samples/system-module-reserved/_config.js +++ b/test/form/samples/system-module-reserved/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not output reserved system format identifiers', options: { external: ['test'], @@ -7,4 +7,4 @@ module.exports = { globals: { test: 'test' } } } -}; +}); diff --git a/test/form/samples/system-multiple-export-bindings/_config.js b/test/form/samples/system-multiple-export-bindings/_config.js index 3756936c774..4f04e656134 100644 --- a/test/form/samples/system-multiple-export-bindings/_config.js +++ b/test/form/samples/system-multiple-export-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports multiple live bindings for the same symbol in systemJS', options: { output: { @@ -6,4 +6,4 @@ module.exports = { exports: 'named' } } -}; +}); diff --git a/test/form/samples/system-null-setters/_config.js b/test/form/samples/system-null-setters/_config.js index f3948af0079..93ecfbf9e32 100644 --- a/test/form/samples/system-null-setters/_config.js +++ b/test/form/samples/system-null-setters/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows to avoid null setters for side effect only imports', options: { external: ['external'], @@ -7,4 +7,4 @@ module.exports = { systemNullSetters: false } } -}; +}); diff --git a/test/form/samples/system-reexports/_config.js b/test/form/samples/system-reexports/_config.js index 813bf77ce87..0b7dc9144c0 100644 --- a/test/form/samples/system-reexports/_config.js +++ b/test/form/samples/system-reexports/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'merges reexports in systemjs', options: { external: true, output: { format: 'system' } } -}; +}); diff --git a/test/form/samples/system-semicolon/_config.js b/test/form/samples/system-semicolon/_config.js index 224cae88f2f..dba0cb277d5 100644 --- a/test/form/samples/system-semicolon/_config.js +++ b/test/form/samples/system-semicolon/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports asi in system binding output', options: { output: { format: 'system' } } -}; +}); diff --git a/test/form/samples/system-uninitialized/_config.js b/test/form/samples/system-uninitialized/_config.js index 2ff19964cbd..1fa3c04721a 100644 --- a/test/form/samples/system-uninitialized/_config.js +++ b/test/form/samples/system-uninitialized/_config.js @@ -1,11 +1,11 @@ // Changed due to https://github.com/acornjs/acorn/issues/806 // Consider reverting this change should this become an acorn option -module.exports = { +module.exports = defineRollupTest({ description: 'supports uninitialized binding exports', options: { output: { format: 'system' } } -}; +}); diff --git a/test/form/samples/tdz-access-in-declaration/_config.js b/test/form/samples/tdz-access-in-declaration/_config.js index 12ef3f7a53d..452ecc94509 100644 --- a/test/form/samples/tdz-access-in-declaration/_config.js +++ b/test/form/samples/tdz-access-in-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detect accessing TDZ variables within the declaration' -}; +}); diff --git a/test/form/samples/tdz-common/_config.js b/test/form/samples/tdz-common/_config.js index ba41751e0fd..7caf964c6ee 100644 --- a/test/form/samples/tdz-common/_config.js +++ b/test/form/samples/tdz-common/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserve common TDZ violations' -}; +}); diff --git a/test/form/samples/tdz-pattern-access/_config.js b/test/form/samples/tdz-pattern-access/_config.js index a50522b9fd9..378601acb75 100644 --- a/test/form/samples/tdz-pattern-access/_config.js +++ b/test/form/samples/tdz-pattern-access/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles accessing variables declared in patterns before their declaration' -}; +}); diff --git a/test/form/samples/template-literal/computed-properties/_config.js b/test/form/samples/template-literal/computed-properties/_config.js index 85451aa7e27..98b93b3a181 100644 --- a/test/form/samples/template-literal/computed-properties/_config.js +++ b/test/form/samples/template-literal/computed-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Resolve template literals in computed property keys' -}; +}); diff --git a/test/form/samples/template-literal/simplify-conditionals/_config.js b/test/form/samples/template-literal/simplify-conditionals/_config.js index 47e0a8f442d..9517a414052 100644 --- a/test/form/samples/template-literal/simplify-conditionals/_config.js +++ b/test/form/samples/template-literal/simplify-conditionals/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Template literals can be simplified when used in conditionals' -}; +}); diff --git a/test/form/samples/this-in-class-body/_config.js b/test/form/samples/this-in-class-body/_config.js index 1ade8977cfe..a6f1fddfc56 100644 --- a/test/form/samples/this-in-class-body/_config.js +++ b/test/form/samples/this-in-class-body/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses the correct "this" value in class properties' -}; +}); diff --git a/test/form/samples/this-in-imports/_config.js b/test/form/samples/this-in-imports/_config.js index 968d0327b35..1336179a281 100644 --- a/test/form/samples/this-in-imports/_config.js +++ b/test/form/samples/this-in-imports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly keep or ignore "this"-expressions when calling imported functions' -}; +}); diff --git a/test/form/samples/this-is-undefined/_config.js b/test/form/samples/this-is-undefined/_config.js index 75134029384..f5cc620c248 100644 --- a/test/form/samples/this-is-undefined/_config.js +++ b/test/form/samples/this-is-undefined/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'top-level `this` expression is rewritten as `undefined`', options: { onwarn: () => {} } -}; +}); diff --git a/test/form/samples/top-level-await/_config.js b/test/form/samples/top-level-await/_config.js index a572b8a99f0..f9a2728a543 100644 --- a/test/form/samples/top-level-await/_config.js +++ b/test/form/samples/top-level-await/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'top-level await support', formats: ['system', 'es'] -}; +}); diff --git a/test/form/samples/tree-shake-arguments-conditional/_config.js b/test/form/samples/tree-shake-arguments-conditional/_config.js index 4390bfa586a..2a8395d195f 100644 --- a/test/form/samples/tree-shake-arguments-conditional/_config.js +++ b/test/form/samples/tree-shake-arguments-conditional/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks tree-shaking of arguments through simplified conditionals' -}; +}); diff --git a/test/form/samples/tree-shake-curried-functions/_config.js b/test/form/samples/tree-shake-curried-functions/_config.js index f022678d476..d48a9dba098 100644 --- a/test/form/samples/tree-shake-curried-functions/_config.js +++ b/test/form/samples/tree-shake-curried-functions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Remove side-effect-free curried functions (#1263)', expectedWarnings: ['EMPTY_BUNDLE'] -}; +}); diff --git a/test/form/samples/tree-shake-default-exports/_config.js b/test/form/samples/tree-shake-default-exports/_config.js index 8b7be460d61..483f21dedc1 100644 --- a/test/form/samples/tree-shake-default-exports/_config.js +++ b/test/form/samples/tree-shake-default-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly remove unused default exports' -}; +}); diff --git a/test/form/samples/tree-shake-if-statements/_config.js b/test/form/samples/tree-shake-if-statements/_config.js index 3debad2c2a7..dfb811a9af9 100644 --- a/test/form/samples/tree-shake-if-statements/_config.js +++ b/test/form/samples/tree-shake-if-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tree-shake if-statements with a condition that can be evaluated' -}; +}); diff --git a/test/form/samples/tree-shake-logical-expressions/_config.js b/test/form/samples/tree-shake-logical-expressions/_config.js index b0ab3abfc42..b8fa1113f4c 100644 --- a/test/form/samples/tree-shake-logical-expressions/_config.js +++ b/test/form/samples/tree-shake-logical-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tree-shake unused parts of logical expressions' -}; +}); diff --git a/test/form/samples/tree-shake-optional-chaining-literal/_config.js b/test/form/samples/tree-shake-optional-chaining-literal/_config.js index e9c3a618d6d..60bd7005669 100644 --- a/test/form/samples/tree-shake-optional-chaining-literal/_config.js +++ b/test/form/samples/tree-shake-optional-chaining-literal/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tree-shake expressions optional chaining with literal values' -}; +}); diff --git a/test/form/samples/tree-shake-pure-optional-chaining/_config.js b/test/form/samples/tree-shake-pure-optional-chaining/_config.js index f35ab64b278..c3daff38811 100644 --- a/test/form/samples/tree-shake-pure-optional-chaining/_config.js +++ b/test/form/samples/tree-shake-pure-optional-chaining/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tree-shake pure call expressions involving optional chaining' -}; +}); diff --git a/test/form/samples/treeshake-classes-with-fields/_config.js b/test/form/samples/treeshake-classes-with-fields/_config.js index 850350bdabd..5d7034fe636 100644 --- a/test/form/samples/treeshake-classes-with-fields/_config.js +++ b/test/form/samples/treeshake-classes-with-fields/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treeshakes classes with class fields (#3564)' -}; +}); diff --git a/test/form/samples/treeshake-excess-arguments/argument-side-effects/_config.js b/test/form/samples/treeshake-excess-arguments/argument-side-effects/_config.js index d2acef03025..aeeed1b1007 100644 --- a/test/form/samples/treeshake-excess-arguments/argument-side-effects/_config.js +++ b/test/form/samples/treeshake-excess-arguments/argument-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains arguments that have side-effects' -}; +}); diff --git a/test/form/samples/treeshake-excess-arguments/arguments-variable/_config.js b/test/form/samples/treeshake-excess-arguments/arguments-variable/_config.js index 86854f25350..9dd5cbeab64 100644 --- a/test/form/samples/treeshake-excess-arguments/arguments-variable/_config.js +++ b/test/form/samples/treeshake-excess-arguments/arguments-variable/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not remove arguments from call when arguments variables is accessed' -}; +}); diff --git a/test/form/samples/treeshake-excess-arguments/arrow-function-arguments/_config.js b/test/form/samples/treeshake-excess-arguments/arrow-function-arguments/_config.js index 8c4887c4e0a..7087d1b5286 100644 --- a/test/form/samples/treeshake-excess-arguments/arrow-function-arguments/_config.js +++ b/test/form/samples/treeshake-excess-arguments/arrow-function-arguments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes unneeded arguments from calls to arrow functions' -}; +}); diff --git a/test/form/samples/treeshake-excess-arguments/function-arguments/_config.js b/test/form/samples/treeshake-excess-arguments/function-arguments/_config.js index 2a51e6c38af..81e30df49d9 100644 --- a/test/form/samples/treeshake-excess-arguments/function-arguments/_config.js +++ b/test/form/samples/treeshake-excess-arguments/function-arguments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes unneeded arguments from calls to functions' -}; +}); diff --git a/test/form/samples/treeshake-excess-arguments/namespace-members/_config.js b/test/form/samples/treeshake-excess-arguments/namespace-members/_config.js index 1f3e70ad8c1..9879ccb77f7 100644 --- a/test/form/samples/treeshake-excess-arguments/namespace-members/_config.js +++ b/test/form/samples/treeshake-excess-arguments/namespace-members/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes unneeded arguments across namespace member calls' -}; +}); diff --git a/test/form/samples/treeshake-excess-arguments/patterns/_config.js b/test/form/samples/treeshake-excess-arguments/patterns/_config.js index 6a644e8b64e..13b68383bd1 100644 --- a/test/form/samples/treeshake-excess-arguments/patterns/_config.js +++ b/test/form/samples/treeshake-excess-arguments/patterns/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes unneeded arguments from calls when patterns are used' -}; +}); diff --git a/test/form/samples/treeshake-excess-arguments/rest-element/_config.js b/test/form/samples/treeshake-excess-arguments/rest-element/_config.js index 2daa706360d..27a852e63a1 100644 --- a/test/form/samples/treeshake-excess-arguments/rest-element/_config.js +++ b/test/form/samples/treeshake-excess-arguments/rest-element/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not remove arguments from calls when rest parameters are used' -}; +}); diff --git a/test/form/samples/treeshake-excess-arguments/unused-parameters/_config.js b/test/form/samples/treeshake-excess-arguments/unused-parameters/_config.js index ebe92e0065f..904f0f5ff17 100644 --- a/test/form/samples/treeshake-excess-arguments/unused-parameters/_config.js +++ b/test/form/samples/treeshake-excess-arguments/unused-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes arguments that correspond to unused parameters' -}; +}); diff --git a/test/form/samples/treeshake-import-meta-props/_config.js b/test/form/samples/treeshake-import-meta-props/_config.js index d73457be9b1..a1f5dc8dd7a 100644 --- a/test/form/samples/treeshake-import-meta-props/_config.js +++ b/test/form/samples/treeshake-import-meta-props/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'also does not include format globals when tree-shaking import meta' -}; +}); diff --git a/test/form/samples/treeshake-import-meta/_config.js b/test/form/samples/treeshake-import-meta/_config.js index 64d9f998bc0..6251dd09dcf 100644 --- a/test/form/samples/treeshake-import-meta/_config.js +++ b/test/form/samples/treeshake-import-meta/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports tree-shaking for meta properties' -}; +}); diff --git a/test/form/samples/treeshake-json/_config.js b/test/form/samples/treeshake-json/_config.js index 732525751e4..10234fb1a97 100644 --- a/test/form/samples/treeshake-json/_config.js +++ b/test/form/samples/treeshake-json/_config.js @@ -1,6 +1,6 @@ const json = require('@rollup/plugin-json'); -module.exports = { +module.exports = defineRollupTest({ description: 'removes unusued json keys', options: { plugins: [json()] } -}; +}); diff --git a/test/form/samples/treeshake-namespace-access/_config.js b/test/form/samples/treeshake-namespace-access/_config.js index 8f398f593b2..3bb817a6c86 100644 --- a/test/form/samples/treeshake-namespace-access/_config.js +++ b/test/form/samples/treeshake-namespace-access/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not count namespace property access as side-effect', options: { external: 'external' } -}; +}); diff --git a/test/form/samples/treeshake-presets/preset-with-override/_config.js b/test/form/samples/treeshake-presets/preset-with-override/_config.js index d12b226cd23..b27ffd1f433 100644 --- a/test/form/samples/treeshake-presets/preset-with-override/_config.js +++ b/test/form/samples/treeshake-presets/preset-with-override/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows using the "preset" option with overrides', options: { treeshake: { @@ -23,4 +23,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/treeshake-presets/recommended/_config.js b/test/form/samples/treeshake-presets/recommended/_config.js index 408a74b5788..d415f76693f 100644 --- a/test/form/samples/treeshake-presets/recommended/_config.js +++ b/test/form/samples/treeshake-presets/recommended/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles treeshake preset "recommended"', options: { treeshake: 'recommended', @@ -20,4 +20,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/treeshake-presets/safest/_config.js b/test/form/samples/treeshake-presets/safest/_config.js index 58cc89aad06..23ebfdf580a 100644 --- a/test/form/samples/treeshake-presets/safest/_config.js +++ b/test/form/samples/treeshake-presets/safest/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles treeshake preset "safest"', options: { treeshake: 'safest', @@ -20,4 +20,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/treeshake-presets/smallest/_config.js b/test/form/samples/treeshake-presets/smallest/_config.js index 9e694f6a1a9..2eb2a1c52c1 100644 --- a/test/form/samples/treeshake-presets/smallest/_config.js +++ b/test/form/samples/treeshake-presets/smallest/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles treeshake preset "smallest"', options: { treeshake: 'smallest', @@ -20,4 +20,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/treeshake-presets/true/_config.js b/test/form/samples/treeshake-presets/true/_config.js index 0b84faac597..84777cf5781 100644 --- a/test/form/samples/treeshake-presets/true/_config.js +++ b/test/form/samples/treeshake-presets/true/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles treeshake preset true', options: { treeshake: true, @@ -20,4 +20,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/form/samples/treeshake-sequence-expressions/_config.js b/test/form/samples/treeshake-sequence-expressions/_config.js index 011dc34eb64..acc675741fa 100644 --- a/test/form/samples/treeshake-sequence-expressions/_config.js +++ b/test/form/samples/treeshake-sequence-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'removes the last element of a sequence expression if it is unused' -}; +}); diff --git a/test/form/samples/try-statement-deoptimization/deactivate-via-option/_config.js b/test/form/samples/try-statement-deoptimization/deactivate-via-option/_config.js index 51ef18c06d6..f0e6623d185 100644 --- a/test/form/samples/try-statement-deoptimization/deactivate-via-option/_config.js +++ b/test/form/samples/try-statement-deoptimization/deactivate-via-option/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deactivates try-catch-deoptimization via option', options: { treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/form/samples/try-statement-deoptimization/direct-inclusion/_config.js b/test/form/samples/try-statement-deoptimization/direct-inclusion/_config.js index 2b9014d625b..1424d7e9f63 100644 --- a/test/form/samples/try-statement-deoptimization/direct-inclusion/_config.js +++ b/test/form/samples/try-statement-deoptimization/direct-inclusion/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains side-effect-free code in try-statement-blocks' -}; +}); diff --git a/test/form/samples/try-statement-deoptimization/follow-parameters/_config.js b/test/form/samples/try-statement-deoptimization/follow-parameters/_config.js index 4093ba3d54e..34d78e6ad88 100644 --- a/test/form/samples/try-statement-deoptimization/follow-parameters/_config.js +++ b/test/form/samples/try-statement-deoptimization/follow-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains side-effect-free code in parameters called from try-statement-blocks' -}; +}); diff --git a/test/form/samples/try-statement-deoptimization/follow-pattern-parameters/_config.js b/test/form/samples/try-statement-deoptimization/follow-pattern-parameters/_config.js index 6ce753ad006..9e3f6664170 100644 --- a/test/form/samples/try-statement-deoptimization/follow-pattern-parameters/_config.js +++ b/test/form/samples/try-statement-deoptimization/follow-pattern-parameters/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains side-effect-free code in pattern parameters called from try-statement-blocks' -}; +}); diff --git a/test/form/samples/try-statement-deoptimization/follow-variables/_config.js b/test/form/samples/try-statement-deoptimization/follow-variables/_config.js index 7422ae5cf03..4266dae6549 100644 --- a/test/form/samples/try-statement-deoptimization/follow-variables/_config.js +++ b/test/form/samples/try-statement-deoptimization/follow-variables/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not retain side-effect-free code in functions called from try-statement-blocks' -}; +}); diff --git a/test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js b/test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js index 8c0617a56c6..39006e36353 100644 --- a/test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js +++ b/test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'works when the try-statement is included via an outside variable' -}; +}); diff --git a/test/form/samples/try-statement-deoptimization/supports-core-js/_config.js b/test/form/samples/try-statement-deoptimization/supports-core-js/_config.js index ee05dfb0bf9..b7c5efb739c 100644 --- a/test/form/samples/try-statement-deoptimization/supports-core-js/_config.js +++ b/test/form/samples/try-statement-deoptimization/supports-core-js/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports core-js feature detection (#2869)' -}; +}); diff --git a/test/form/samples/typeof-side-effect/_config.js b/test/form/samples/typeof-side-effect/_config.js index bbdda1c3147..6a576680360 100644 --- a/test/form/samples/typeof-side-effect/_config.js +++ b/test/form/samples/typeof-side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'using typeof is does not trigger global side-effects' -}; +}); diff --git a/test/form/samples/umd-noconflict-extend/_config.js b/test/form/samples/umd-noconflict-extend/_config.js index 8ca8fb742a0..ac9316c0c49 100644 --- a/test/form/samples/umd-noconflict-extend/_config.js +++ b/test/form/samples/umd-noconflict-extend/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'exports noConflict method for default umd when requested', options: { output: { @@ -7,4 +7,4 @@ module.exports = { name: 'FooBar' } } -}; +}); diff --git a/test/form/samples/umd-noconflict-namespaced/_config.js b/test/form/samples/umd-noconflict-namespaced/_config.js index 5a404b1f2da..25d46c3d420 100644 --- a/test/form/samples/umd-noconflict-namespaced/_config.js +++ b/test/form/samples/umd-noconflict-namespaced/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'exports noConflict method for default umd when requested', options: { output: { @@ -6,4 +6,4 @@ module.exports = { name: 'my.name.spaced.module' } } -}; +}); diff --git a/test/form/samples/umd-noconflict-no-exports/_config.js b/test/form/samples/umd-noconflict-no-exports/_config.js index 93a353386b0..b6e6c9d2292 100644 --- a/test/form/samples/umd-noconflict-no-exports/_config.js +++ b/test/form/samples/umd-noconflict-no-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'exports noConflict even when there are no exports', options: { output: { @@ -6,4 +6,4 @@ module.exports = { name: 'FooBar' } } -}; +}); diff --git a/test/form/samples/umd-noconflict/_config.js b/test/form/samples/umd-noconflict/_config.js index 69e810bb044..1e498f51fe5 100644 --- a/test/form/samples/umd-noconflict/_config.js +++ b/test/form/samples/umd-noconflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'exports noConflict method for default umd when requested', options: { output: { @@ -6,4 +6,4 @@ module.exports = { name: 'FooBar' } } -}; +}); diff --git a/test/form/samples/unary-expressions/_config.js b/test/form/samples/unary-expressions/_config.js index 9e363ae5176..6b77c4d7868 100644 --- a/test/form/samples/unary-expressions/_config.js +++ b/test/form/samples/unary-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles unary expression side-effects' -}; +}); diff --git a/test/form/samples/undefined-default-export/_config.js b/test/form/samples/undefined-default-export/_config.js index 1149b6e503d..29a2dbd8818 100644 --- a/test/form/samples/undefined-default-export/_config.js +++ b/test/form/samples/undefined-default-export/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles default exporting undefined' -}; +}); diff --git a/test/form/samples/undefined-var/_config.js b/test/form/samples/undefined-var/_config.js index 7144d47d8f1..11b5c706e85 100644 --- a/test/form/samples/undefined-var/_config.js +++ b/test/form/samples/undefined-var/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treeshakes undefined variable literals' -}; +}); diff --git a/test/form/samples/unknown-token-effects/_config.js b/test/form/samples/unknown-token-effects/_config.js index 66f57107b45..67686e82fec 100644 --- a/test/form/samples/unknown-token-effects/_config.js +++ b/test/form/samples/unknown-token-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not tree-shake unknown tokens', options: { acornInjectPlugins: Parser => @@ -14,4 +14,4 @@ module.exports = { } } } -}; +}); diff --git a/test/form/samples/unmodified-default-exports-function-argument/_config.js b/test/form/samples/unmodified-default-exports-function-argument/_config.js index 3ccba4c4a9e..6ed9e74ed85 100644 --- a/test/form/samples/unmodified-default-exports-function-argument/_config.js +++ b/test/form/samples/unmodified-default-exports-function-argument/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'passing unbound default export to function cannot rebind it' -}; +}); diff --git a/test/form/samples/unmodified-default-exports/_config.js b/test/form/samples/unmodified-default-exports/_config.js index c37ef0f18d7..21307561913 100644 --- a/test/form/samples/unmodified-default-exports/_config.js +++ b/test/form/samples/unmodified-default-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not treat property assignment as rebinding for sake of unbound default exports' -}; +}); diff --git a/test/form/samples/unused-called-import/_config.js b/test/form/samples/unused-called-import/_config.js index 0f1029d3236..992d09dcc2c 100644 --- a/test/form/samples/unused-called-import/_config.js +++ b/test/form/samples/unused-called-import/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not include called-in-unused-code import' -}; +}); diff --git a/test/form/samples/unused-called-with-side-effects/_config.js b/test/form/samples/unused-called-with-side-effects/_config.js index 0f1029d3236..992d09dcc2c 100644 --- a/test/form/samples/unused-called-with-side-effects/_config.js +++ b/test/form/samples/unused-called-with-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not include called-in-unused-code import' -}; +}); diff --git a/test/form/samples/unused-default-exports/_config.js b/test/form/samples/unused-default-exports/_config.js index 31eeacde501..076d82adb8c 100644 --- a/test/form/samples/unused-default-exports/_config.js +++ b/test/form/samples/unused-default-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not name unused-but-included default export' -}; +}); diff --git a/test/form/samples/unused-function-and-class-expressions/_config.js b/test/form/samples/unused-function-and-class-expressions/_config.js index d45e980e08a..a8ec5c6e8fb 100644 --- a/test/form/samples/unused-function-and-class-expressions/_config.js +++ b/test/form/samples/unused-function-and-class-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly remove unused function and class expressions' -}; +}); diff --git a/test/form/samples/unused-import/_config.js b/test/form/samples/unused-import/_config.js index aa797dca171..a3786f31b36 100644 --- a/test/form/samples/unused-import/_config.js +++ b/test/form/samples/unused-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'excludes unused imports ([#595])', options: { external: ['external'], @@ -6,4 +6,4 @@ module.exports = { globals: { external: 'external' } } } -}; +}); diff --git a/test/form/samples/unused-inner-functions-and-classes/_config.js b/test/form/samples/unused-inner-functions-and-classes/_config.js index 76b31d1b101..ba615e00a41 100644 --- a/test/form/samples/unused-inner-functions-and-classes/_config.js +++ b/test/form/samples/unused-inner-functions-and-classes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not include unused inner functions and classes' -}; +}); diff --git a/test/form/samples/unused-var/_config.js b/test/form/samples/unused-var/_config.js index b89eb86733e..7dbdd4a35e8 100644 --- a/test/form/samples/unused-var/_config.js +++ b/test/form/samples/unused-var/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'omits unused var declaration' -}; +}); diff --git a/test/form/samples/update-expression-side-effects/_config.js b/test/form/samples/update-expression-side-effects/_config.js index 4dbc0f43e3f..4981f110796 100644 --- a/test/form/samples/update-expression-side-effects/_config.js +++ b/test/form/samples/update-expression-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detect side-effects when dealing with update expressions' -}; +}); diff --git a/test/form/samples/updating-assignments/_config.js b/test/form/samples/updating-assignments/_config.js index b6633185ee0..548bba2c68b 100644 --- a/test/form/samples/updating-assignments/_config.js +++ b/test/form/samples/updating-assignments/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Correctly handles assignment operators on exports', options: { output: { name: 'bundle' } } -}; +}); diff --git a/test/form/samples/url-external/_config.js b/test/form/samples/url-external/_config.js index 1a4fb129c72..d16cbadd1cd 100644 --- a/test/form/samples/url-external/_config.js +++ b/test/form/samples/url-external/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports URL externals', options: { external: ['https://external.com/external.js'], @@ -6,4 +6,4 @@ module.exports = { globals: { 'https://external.com/external.js': 'external' } } } -}; +}); diff --git a/test/form/samples/use-class-name-in-static-block/_config.js b/test/form/samples/use-class-name-in-static-block/_config.js index 1ca77cc9bb4..639ce10fbb1 100644 --- a/test/form/samples/use-class-name-in-static-block/_config.js +++ b/test/form/samples/use-class-name-in-static-block/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'use the original class name instead of renderName in class body' -}; +}); diff --git a/test/form/samples/use-global-map-for-export-name/_config.js b/test/form/samples/use-global-map-for-export-name/_config.js index a2836987199..5004390a85b 100644 --- a/test/form/samples/use-global-map-for-export-name/_config.js +++ b/test/form/samples/use-global-map-for-export-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'applies globals to output name', options: { output: { @@ -7,4 +7,4 @@ module.exports = { }, external: ['leaflet'] } -}; +}); diff --git a/test/form/samples/whitespace-around-namespace-member-expression/_config.js b/test/form/samples/whitespace-around-namespace-member-expression/_config.js index a97b168da8c..216e8192c82 100644 --- a/test/form/samples/whitespace-around-namespace-member-expression/_config.js +++ b/test/form/samples/whitespace-around-namespace-member-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'whitespace around the "." in member expressions does not mess up renaming' -}; +}); diff --git a/test/form/samples/wrap-simplified-expressions/_config.js b/test/form/samples/wrap-simplified-expressions/_config.js index dfc3eb92f71..e048b61374e 100644 --- a/test/form/samples/wrap-simplified-expressions/_config.js +++ b/test/form/samples/wrap-simplified-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'wraps simplified expressions that have become callees if necessary' -}; +}); diff --git a/test/form/samples/yield-expression/missing-space/_config.js b/test/form/samples/yield-expression/missing-space/_config.js index 3dace68f84f..4336e9bc5e0 100644 --- a/test/form/samples/yield-expression/missing-space/_config.js +++ b/test/form/samples/yield-expression/missing-space/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Inserts space when simplifying yield expression without space' -}; +}); diff --git a/test/function/samples/access-instance-prop/_config.js b/test/function/samples/access-instance-prop/_config.js index 98b5968822b..c609afc13cf 100644 --- a/test/function/samples/access-instance-prop/_config.js +++ b/test/function/samples/access-instance-prop/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects getters when accessing properties of an instance' -}; +}); diff --git a/test/function/samples/add-watch-file-generate/_config.js b/test/function/samples/add-watch-file-generate/_config.js index 19e2326f447..212f0178159 100644 --- a/test/function/samples/add-watch-file-generate/_config.js +++ b/test/function/samples/add-watch-file-generate/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when adding watch files during generate', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'INVALID_ROLLUP_PHASE' } -}; +}); diff --git a/test/function/samples/adds-json-hint-for-missing-export-if-is-json-file/_config.js b/test/function/samples/adds-json-hint-for-missing-export-if-is-json-file/_config.js index 5e6de887028..4377889e8d5 100644 --- a/test/function/samples/adds-json-hint-for-missing-export-if-is-json-file/_config.js +++ b/test/function/samples/adds-json-hint-for-missing-export-if-is-json-file/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_ARRAY_JSON = path.join(__dirname, 'array.json'); -module.exports = { +module.exports = defineRollupTest({ description: 'should provide json hint when importing a no export json file', error: { binding: 'default', @@ -25,4 +25,4 @@ module.exports = { message: '"default" is not exported by "array.json", imported by "main.js". (Note that you need @rollup/plugin-json to import JSON files)' } -}; +}); diff --git a/test/function/samples/adds-semicolons-if-necessary-b/_config.js b/test/function/samples/adds-semicolons-if-necessary-b/_config.js index bb17123ec79..b2d91edafc3 100644 --- a/test/function/samples/adds-semicolons-if-necessary-b/_config.js +++ b/test/function/samples/adds-semicolons-if-necessary-b/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds semi-colons if necessary' -}; +}); diff --git a/test/function/samples/adds-semicolons-if-necessary-c/_config.js b/test/function/samples/adds-semicolons-if-necessary-c/_config.js index bb17123ec79..b2d91edafc3 100644 --- a/test/function/samples/adds-semicolons-if-necessary-c/_config.js +++ b/test/function/samples/adds-semicolons-if-necessary-c/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds semi-colons if necessary' -}; +}); diff --git a/test/function/samples/adds-semicolons-if-necessary-d/_config.js b/test/function/samples/adds-semicolons-if-necessary-d/_config.js index bb17123ec79..b2d91edafc3 100644 --- a/test/function/samples/adds-semicolons-if-necessary-d/_config.js +++ b/test/function/samples/adds-semicolons-if-necessary-d/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds semi-colons if necessary' -}; +}); diff --git a/test/function/samples/adds-semicolons-if-necessary/_config.js b/test/function/samples/adds-semicolons-if-necessary/_config.js index bb17123ec79..b2d91edafc3 100644 --- a/test/function/samples/adds-semicolons-if-necessary/_config.js +++ b/test/function/samples/adds-semicolons-if-necessary/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds semi-colons if necessary' -}; +}); diff --git a/test/function/samples/adds-timings-to-bundle-when-codesplitting/_config.js b/test/function/samples/adds-timings-to-bundle-when-codesplitting/_config.js index 33bc52f42e7..fb3d43ef4ee 100644 --- a/test/function/samples/adds-timings-to-bundle-when-codesplitting/_config.js +++ b/test/function/samples/adds-timings-to-bundle-when-codesplitting/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Adds timing information to bundle when bundling with perf=true', options: { input: ['main.js', 'main2.js'], @@ -17,4 +17,4 @@ module.exports = { assert.ok(timings[timer][0] >= 0, 'Timer is not non-negative.'); } } -}; +}); diff --git a/test/function/samples/adds-timings-to-bundle/_config.js b/test/function/samples/adds-timings-to-bundle/_config.js index 8595fe45a18..74fa6c6de22 100644 --- a/test/function/samples/adds-timings-to-bundle/_config.js +++ b/test/function/samples/adds-timings-to-bundle/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Adds timing information to bundle when bundling with perf=true', options: { perf: true @@ -16,4 +16,4 @@ module.exports = { assert.ok(timings[timer][0] >= 0, 'Timer is not non-negative.'); } } -}; +}); diff --git a/test/function/samples/aliased-not-exported-twice/_config.js b/test/function/samples/aliased-not-exported-twice/_config.js index 1bb827de735..8f9f135ec23 100644 --- a/test/function/samples/aliased-not-exported-twice/_config.js +++ b/test/function/samples/aliased-not-exported-twice/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not export aliased binding under original name (#438)', exports(exports) { assert.equal(exports.number, 0); @@ -9,4 +9,4 @@ module.exports = { assert.ok(!('count' in exports)); } -}; +}); diff --git a/test/function/samples/allow-reserved/_config.js b/test/function/samples/allow-reserved/_config.js index 63f2a11c03f..ca874bfed0a 100644 --- a/test/function/samples/allow-reserved/_config.js +++ b/test/function/samples/allow-reserved/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allow reserved identifiers via custom acorn options', options: { acorn: { allowReserved: true } } -}; +}); diff --git a/test/function/samples/allow-undefined-as-parameter/_config.js b/test/function/samples/allow-undefined-as-parameter/_config.js index 5143691be92..af3959c26c5 100644 --- a/test/function/samples/allow-undefined-as-parameter/_config.js +++ b/test/function/samples/allow-undefined-as-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not make assumptions about its value when using undefined as a parameter name' -}; +}); diff --git a/test/function/samples/allows-external-modules-from-nested-module/_config.js b/test/function/samples/allows-external-modules-from-nested-module/_config.js index f59b20ffa1b..e0e566bd841 100644 --- a/test/function/samples/allows-external-modules-from-nested-module/_config.js +++ b/test/function/samples/allows-external-modules-from-nested-module/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports external modules from nested internal modules', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/allows-unknown-binary-operators/_config.js b/test/function/samples/allows-unknown-binary-operators/_config.js index 59419b6caa7..41a9c9029fd 100644 --- a/test/function/samples/allows-unknown-binary-operators/_config.js +++ b/test/function/samples/allows-unknown-binary-operators/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows unknown binary operators' -}; +}); diff --git a/test/function/samples/already-deshadowed-import/_config.js b/test/function/samples/already-deshadowed-import/_config.js index dea226671c3..ba8f4eec08e 100644 --- a/test/function/samples/already-deshadowed-import/_config.js +++ b/test/function/samples/already-deshadowed-import/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_BOB = path.join(__dirname, 'bob.js'); const ID_ALICE = path.join(__dirname, 'alice.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handle already module import names correctly if they are have already been deshadowed', warnings: [ @@ -12,4 +12,4 @@ module.exports = { message: 'Circular dependency: bob.js -> alice.js -> bob.js' } ] -}; +}); diff --git a/test/function/samples/amd-auto-id-id/_config.js b/test/function/samples/amd-auto-id-id/_config.js index 5ba6165fc43..19aed37efc3 100644 --- a/test/function/samples/amd-auto-id-id/_config.js +++ b/test/function/samples/amd-auto-id-id/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using both the amd.autoId and the amd.id option', options: { output: { dir: 'dist', amd: { autoId: 'a', id: 'a' } } @@ -9,4 +9,4 @@ module.exports = { 'Invalid value for option "output.amd.id" - this option cannot be used together with "output.amd.autoId"/"output.amd.basePath".', url: 'https://rollupjs.org/configuration-options/#output-amd-id' } -}; +}); diff --git a/test/function/samples/amd-base-path-id/_config.js b/test/function/samples/amd-base-path-id/_config.js index 7675080e10a..62d3e4887c9 100644 --- a/test/function/samples/amd-base-path-id/_config.js +++ b/test/function/samples/amd-base-path-id/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using both the amd.basePath and the amd.id option', options: { output: { dir: 'dist', amd: { basePath: 'a', id: 'a' } } @@ -9,4 +9,4 @@ module.exports = { 'Invalid value for option "output.amd.id" - this option cannot be used together with "output.amd.autoId"/"output.amd.basePath".', url: 'https://rollupjs.org/configuration-options/#output-amd-id' } -}; +}); diff --git a/test/function/samples/amd-base-path/_config.js b/test/function/samples/amd-base-path/_config.js index 98fff2c58e7..974471f568a 100644 --- a/test/function/samples/amd-base-path/_config.js +++ b/test/function/samples/amd-base-path/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using only amd.basePath option', options: { output: { dir: 'dist', amd: { basePath: 'a' } } @@ -9,4 +9,4 @@ module.exports = { 'Invalid value for option "output.amd.basePath" - this option only works with "output.amd.autoId".', url: 'https://rollupjs.org/configuration-options/#output-amd-basepath' } -}; +}); diff --git a/test/function/samples/arbitrary-module-namespace-identifiers/_config.js b/test/function/samples/arbitrary-module-namespace-identifiers/_config.js index 91e53ae26c7..8fdd13ba230 100644 --- a/test/function/samples/arbitrary-module-namespace-identifiers/_config.js +++ b/test/function/samples/arbitrary-module-namespace-identifiers/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports arbitrary module namespace identifiers' -}; +}); diff --git a/test/function/samples/argument-deoptimization/global-calls/_config.js b/test/function/samples/argument-deoptimization/global-calls/_config.js index 1e1df493faf..4e5116ea6f7 100644 --- a/test/function/samples/argument-deoptimization/global-calls/_config.js +++ b/test/function/samples/argument-deoptimization/global-calls/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks argument mutations of calls to globals', options: { treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/function/samples/argument-deoptimization/parameter-access-mutation/_config.js b/test/function/samples/argument-deoptimization/parameter-access-mutation/_config.js index e087e067e42..8de12ed70ab 100644 --- a/test/function/samples/argument-deoptimization/parameter-access-mutation/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-access-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of function parameters when accessed' -}; +}); diff --git a/test/function/samples/argument-deoptimization/parameter-call-mutation/_config.js b/test/function/samples/argument-deoptimization/parameter-call-mutation/_config.js index 944b9832756..b048b512549 100644 --- a/test/function/samples/argument-deoptimization/parameter-call-mutation/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-call-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of function parameters when called' -}; +}); diff --git a/test/function/samples/argument-deoptimization/parameter-deep-access-mutation/_config.js b/test/function/samples/argument-deoptimization/parameter-deep-access-mutation/_config.js index e087e067e42..8de12ed70ab 100644 --- a/test/function/samples/argument-deoptimization/parameter-deep-access-mutation/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-deep-access-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of function parameters when accessed' -}; +}); diff --git a/test/function/samples/argument-deoptimization/parameter-mutation-destructured/_config.js b/test/function/samples/argument-deoptimization/parameter-mutation-destructured/_config.js index 4ffeb2f76ed..0829d523cba 100644 --- a/test/function/samples/argument-deoptimization/parameter-mutation-destructured/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-mutation-destructured/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of destructured function parameters' -}; +}); diff --git a/test/function/samples/argument-deoptimization/parameter-mutation-spread/_config.js b/test/function/samples/argument-deoptimization/parameter-mutation-spread/_config.js index ce41790c814..c460abdc2d6 100644 --- a/test/function/samples/argument-deoptimization/parameter-mutation-spread/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-mutation-spread/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of function parameters picked up by spread operator' -}; +}); diff --git a/test/function/samples/argument-deoptimization/parameter-mutation/_config.js b/test/function/samples/argument-deoptimization/parameter-mutation/_config.js index aa4e69e24d6..59a5243f5df 100644 --- a/test/function/samples/argument-deoptimization/parameter-mutation/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of function parameters' -}; +}); diff --git a/test/function/samples/argument-deoptimization/parameter-variable-merge/_config.js b/test/function/samples/argument-deoptimization/parameter-variable-merge/_config.js index 9b8e311a1ea..7d92ed4c3c2 100644 --- a/test/function/samples/argument-deoptimization/parameter-variable-merge/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-variable-merge/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly merges parameters and variable declarations' -}; +}); diff --git a/test/function/samples/argument-deoptimization/return-function-known/_config.js b/test/function/samples/argument-deoptimization/return-function-known/_config.js index d73a9a80f11..aba75baad3e 100644 --- a/test/function/samples/argument-deoptimization/return-function-known/_config.js +++ b/test/function/samples/argument-deoptimization/return-function-known/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of function parameters by known returned functions' -}; +}); diff --git a/test/function/samples/argument-deoptimization/return-function-unknown/_config.js b/test/function/samples/argument-deoptimization/return-function-unknown/_config.js index d73a9a80f11..aba75baad3e 100644 --- a/test/function/samples/argument-deoptimization/return-function-unknown/_config.js +++ b/test/function/samples/argument-deoptimization/return-function-unknown/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of function parameters by known returned functions' -}; +}); diff --git a/test/function/samples/argument-deoptimization/unknown-global-assignment/_config.js b/test/function/samples/argument-deoptimization/unknown-global-assignment/_config.js index d45b151f079..2f576cf5ab7 100644 --- a/test/function/samples/argument-deoptimization/unknown-global-assignment/_config.js +++ b/test/function/samples/argument-deoptimization/unknown-global-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of assignments to unknown globals' -}; +}); diff --git a/test/function/samples/argument-deoptimization/unknown-global-call/_config.js b/test/function/samples/argument-deoptimization/unknown-global-call/_config.js index e583ed73ff6..2e7fd7017fa 100644 --- a/test/function/samples/argument-deoptimization/unknown-global-call/_config.js +++ b/test/function/samples/argument-deoptimization/unknown-global-call/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks argument mutations of calls to unknown globals' -}; +}); diff --git a/test/function/samples/argument-treeshaking-parameter-conflict/_config.js b/test/function/samples/argument-treeshaking-parameter-conflict/_config.js index a5e3f2c5620..7ede1774aee 100644 --- a/test/function/samples/argument-treeshaking-parameter-conflict/_config.js +++ b/test/function/samples/argument-treeshaking-parameter-conflict/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not cause conflicts when deconflicting non-included parameters' -}; +}); diff --git a/test/function/samples/array-double-spread/_config.js b/test/function/samples/array-double-spread/_config.js index a46300f406f..93cca1a2661 100644 --- a/test/function/samples/array-double-spread/_config.js +++ b/test/function/samples/array-double-spread/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly deoptimizes when there is no proto' -}; +}); diff --git a/test/function/samples/array-from-side-effect/_config.js b/test/function/samples/array-from-side-effect/_config.js index 6c7562ed5c1..986b2a5f052 100644 --- a/test/function/samples/array-from-side-effect/_config.js +++ b/test/function/samples/array-from-side-effect/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Observes side-effects in Array.from', exports(exports) { assert.strictEqual(exports.x, 7); } -}; +}); diff --git a/test/function/samples/array-getter/_config.js b/test/function/samples/array-getter/_config.js index e0437548252..c5e8774f566 100644 --- a/test/function/samples/array-getter/_config.js +++ b/test/function/samples/array-getter/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles getters defined on arrays' -}; +}); diff --git a/test/function/samples/array-mutation/_config.js b/test/function/samples/array-mutation/_config.js index 612a42d2e21..5136218a1d7 100644 --- a/test/function/samples/array-mutation/_config.js +++ b/test/function/samples/array-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks array mutations' -}; +}); diff --git a/test/function/samples/asi-prevention-with-comment-like-strings/_config.js b/test/function/samples/asi-prevention-with-comment-like-strings/_config.js index 97a6b347859..c850e3a3b4a 100644 --- a/test/function/samples/asi-prevention-with-comment-like-strings/_config.js +++ b/test/function/samples/asi-prevention-with-comment-like-strings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not hang when scanning for line-breaks in ASI prevention and there are comment-like strings' -}; +}); diff --git a/test/function/samples/assign-namespace-to-var/_config.js b/test/function/samples/assign-namespace-to-var/_config.js index 1a7e54ffc20..e1fd1c259f4 100644 --- a/test/function/samples/assign-namespace-to-var/_config.js +++ b/test/function/samples/assign-namespace-to-var/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows a namespace to be assigned to a variable', warnings: [ { @@ -7,4 +7,4 @@ module.exports = { names: ['main'] } ] -}; +}); diff --git a/test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_config.js b/test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_config.js index 25bb08a0f03..96da985b391 100644 --- a/test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_config.js +++ b/test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure the assignee is deoptimized' -}; +}); diff --git a/test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_config.js b/test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_config.js index cd94f45ae26..a656c2b08e2 100644 --- a/test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_config.js +++ b/test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure the assignment target is deoptimized' -}; +}); diff --git a/test/function/samples/assignment-deoptimization/nested-assignment/_config.js b/test/function/samples/assignment-deoptimization/nested-assignment/_config.js index 7c3114ddadc..cb4168b44e8 100644 --- a/test/function/samples/assignment-deoptimization/nested-assignment/_config.js +++ b/test/function/samples/assignment-deoptimization/nested-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks assigments nested in expressions that are included for other reasons' -}; +}); diff --git a/test/function/samples/assignment-deoptimization/try-catch-inclusion/_config.js b/test/function/samples/assignment-deoptimization/try-catch-inclusion/_config.js index 4a7b55c699a..ae37e8fac62 100644 --- a/test/function/samples/assignment-deoptimization/try-catch-inclusion/_config.js +++ b/test/function/samples/assignment-deoptimization/try-catch-inclusion/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks assigments included via try-catch-deoptimization' -}; +}); diff --git a/test/function/samples/assignment-patterns/_config.js b/test/function/samples/assignment-patterns/_config.js index 691299185ea..b8828636199 100644 --- a/test/function/samples/assignment-patterns/_config.js +++ b/test/function/samples/assignment-patterns/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows reassigments to default parameters that shadow imports' -}; +}); diff --git a/test/function/samples/assignment-to-exports-b/_config.js b/test/function/samples/assignment-to-exports-b/_config.js index a1b96267947..4c5b4aff026 100644 --- a/test/function/samples/assignment-to-exports-b/_config.js +++ b/test/function/samples/assignment-to-exports-b/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports are rewritten inside a variable init', exports: exports => { assert.equal(exports.b, 42); } -}; +}); diff --git a/test/function/samples/assignment-to-exports/_config.js b/test/function/samples/assignment-to-exports/_config.js index 65f38c89c82..8f809def259 100644 --- a/test/function/samples/assignment-to-exports/_config.js +++ b/test/function/samples/assignment-to-exports/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports are kept up-to-date', exports(exports) { assert.equal(exports.count, 0); exports.incr(); assert.equal(exports.count, 1); } -}; +}); diff --git a/test/function/samples/assignment-to-re-exports-conflict/_config.js b/test/function/samples/assignment-to-re-exports-conflict/_config.js index bbe691c0698..2424472c02f 100644 --- a/test/function/samples/assignment-to-re-exports-conflict/_config.js +++ b/test/function/samples/assignment-to-re-exports-conflict/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 're-exports are kept up-to-date', exports(exports) { assert.equal(exports.count, 0); exports.incr(); assert.equal(exports.count, 1); } -}; +}); diff --git a/test/function/samples/assignment-to-re-exports/_config.js b/test/function/samples/assignment-to-re-exports/_config.js index bbe691c0698..2424472c02f 100644 --- a/test/function/samples/assignment-to-re-exports/_config.js +++ b/test/function/samples/assignment-to-re-exports/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 're-exports are kept up-to-date', exports(exports) { assert.equal(exports.count, 0); exports.incr(); assert.equal(exports.count, 1); } -}; +}); diff --git a/test/function/samples/associate-arrow-function-parameter-mutations/_config.js b/test/function/samples/associate-arrow-function-parameter-mutations/_config.js index ab5fdae4596..0edae353ffa 100644 --- a/test/function/samples/associate-arrow-function-parameter-mutations/_config.js +++ b/test/function/samples/associate-arrow-function-parameter-mutations/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates arrow function parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.baz, 'present'); } -}; +}); diff --git a/test/function/samples/associate-arrow-function-return-values/_config.js b/test/function/samples/associate-arrow-function-return-values/_config.js index 001f94ce2dd..5140cc773ce 100644 --- a/test/function/samples/associate-arrow-function-return-values/_config.js +++ b/test/function/samples/associate-arrow-function-return-values/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates function return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-es5-constructor-parameter-mutations/_config.js b/test/function/samples/associate-es5-constructor-parameter-mutations/_config.js index 99c28faadfd..7cbbe60a6ea 100644 --- a/test/function/samples/associate-es5-constructor-parameter-mutations/_config.js +++ b/test/function/samples/associate-es5-constructor-parameter-mutations/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates ES5 constructor parameters with their call arguments', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-es6-constructor-parameter-mutations/_config.js b/test/function/samples/associate-es6-constructor-parameter-mutations/_config.js index 99c28faadfd..7cbbe60a6ea 100644 --- a/test/function/samples/associate-es6-constructor-parameter-mutations/_config.js +++ b/test/function/samples/associate-es6-constructor-parameter-mutations/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates ES5 constructor parameters with their call arguments', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-function-parameter-mutations-2/_config.js b/test/function/samples/associate-function-parameter-mutations-2/_config.js index 88a9f917c47..9c59e73e5d1 100644 --- a/test/function/samples/associate-function-parameter-mutations-2/_config.js +++ b/test/function/samples/associate-function-parameter-mutations-2/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates function parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-function-parameter-mutations/_config.js b/test/function/samples/associate-function-parameter-mutations/_config.js index 0a4917012dc..64441446c0f 100644 --- a/test/function/samples/associate-function-parameter-mutations/_config.js +++ b/test/function/samples/associate-function-parameter-mutations/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates function parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.baz, 'present'); } -}; +}); diff --git a/test/function/samples/associate-function-return-values-2/_config.js b/test/function/samples/associate-function-return-values-2/_config.js index 1fc6c4a79d9..f5610157d2b 100644 --- a/test/function/samples/associate-function-return-values-2/_config.js +++ b/test/function/samples/associate-function-return-values-2/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates function return values with regard to calls', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-function-return-values-3/_config.js b/test/function/samples/associate-function-return-values-3/_config.js index 41967870d7c..4cee02c5d23 100644 --- a/test/function/samples/associate-function-return-values-3/_config.js +++ b/test/function/samples/associate-function-return-values-3/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates function return values of returned functions', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-function-return-values-4/_config.js b/test/function/samples/associate-function-return-values-4/_config.js index 358dccd5ea9..6b0d3206068 100644 --- a/test/function/samples/associate-function-return-values-4/_config.js +++ b/test/function/samples/associate-function-return-values-4/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Handles empty return statements (#1702)', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-function-return-values-5/_config.js b/test/function/samples/associate-function-return-values-5/_config.js index bfa427607d9..29993f8910a 100644 --- a/test/function/samples/associate-function-return-values-5/_config.js +++ b/test/function/samples/associate-function-return-values-5/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates value mutations across return values', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-function-return-values-across-other-expressions/_config.js b/test/function/samples/associate-function-return-values-across-other-expressions/_config.js index 001f94ce2dd..5140cc773ce 100644 --- a/test/function/samples/associate-function-return-values-across-other-expressions/_config.js +++ b/test/function/samples/associate-function-return-values-across-other-expressions/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates function return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-function-return-values/_config.js b/test/function/samples/associate-function-return-values/_config.js index 001f94ce2dd..5140cc773ce 100644 --- a/test/function/samples/associate-function-return-values/_config.js +++ b/test/function/samples/associate-function-return-values/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates function return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-getter-return-values-2/_config.js b/test/function/samples/associate-getter-return-values-2/_config.js index 62569e5c57e..71d50f2007b 100644 --- a/test/function/samples/associate-getter-return-values-2/_config.js +++ b/test/function/samples/associate-getter-return-values-2/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates getter return values with regard to calls', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-getter-return-values/_config.js b/test/function/samples/associate-getter-return-values/_config.js index 88bc3624f36..fb39fcfc790 100644 --- a/test/function/samples/associate-getter-return-values/_config.js +++ b/test/function/samples/associate-getter-return-values/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates getter return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-method-parameter-mutations-2/_config.js b/test/function/samples/associate-method-parameter-mutations-2/_config.js index 51cbe064113..968a0aefa27 100644 --- a/test/function/samples/associate-method-parameter-mutations-2/_config.js +++ b/test/function/samples/associate-method-parameter-mutations-2/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates method parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-method-parameter-mutations/_config.js b/test/function/samples/associate-method-parameter-mutations/_config.js index 4730ed755fa..8b255b6e407 100644 --- a/test/function/samples/associate-method-parameter-mutations/_config.js +++ b/test/function/samples/associate-method-parameter-mutations/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates method parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.baz, 'present'); } -}; +}); diff --git a/test/function/samples/associate-object-expression-parameter-mutations/_config.js b/test/function/samples/associate-object-expression-parameter-mutations/_config.js index ae5c10e63e4..7eef58ad395 100644 --- a/test/function/samples/associate-object-expression-parameter-mutations/_config.js +++ b/test/function/samples/associate-object-expression-parameter-mutations/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates object expression member parameters with their call arguments', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-object-expression-return-values/_config.js b/test/function/samples/associate-object-expression-return-values/_config.js index ae5c10e63e4..7eef58ad395 100644 --- a/test/function/samples/associate-object-expression-return-values/_config.js +++ b/test/function/samples/associate-object-expression-return-values/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates object expression member parameters with their call arguments', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-parameter-mutations-across-other-expressions/_config.js b/test/function/samples/associate-parameter-mutations-across-other-expressions/_config.js index 966f2369199..c7be9d0d798 100644 --- a/test/function/samples/associate-parameter-mutations-across-other-expressions/_config.js +++ b/test/function/samples/associate-parameter-mutations-across-other-expressions/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates parameters with their call arguments across other expressions', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/associate-setter-parameters/_config.js b/test/function/samples/associate-setter-parameters/_config.js index 88bc3624f36..fb39fcfc790 100644 --- a/test/function/samples/associate-setter-parameters/_config.js +++ b/test/function/samples/associate-setter-parameters/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Associates getter return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); } -}; +}); diff --git a/test/function/samples/async-function-return/_config.js b/test/function/samples/async-function-return/_config.js index 4b732210711..89d66e3b363 100644 --- a/test/function/samples/async-function-return/_config.js +++ b/test/function/samples/async-function-return/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses the correct return value for async functions' -}; +}); diff --git a/test/function/samples/avoid-exports-dot-asterisk/_config.js b/test/function/samples/avoid-exports-dot-asterisk/_config.js index 76470f6f02d..9f310eedd27 100644 --- a/test/function/samples/avoid-exports-dot-asterisk/_config.js +++ b/test/function/samples/avoid-exports-dot-asterisk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoid return or set module.exports to dot-asterisk style', options: { external: () => true, @@ -6,4 +6,4 @@ module.exports = { format: 'cjs' } } -}; +}); diff --git a/test/function/samples/avoid-variable-be-empty/_config.js b/test/function/samples/avoid-variable-be-empty/_config.js index 425b44c4aec..07d821ecb20 100644 --- a/test/function/samples/avoid-variable-be-empty/_config.js +++ b/test/function/samples/avoid-variable-be-empty/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoid variable from empty module name be empty', options: { input: '', @@ -16,4 +16,4 @@ module.exports = { format: 'cjs' } } -}; +}); diff --git a/test/function/samples/aync-options/_config.js b/test/function/samples/aync-options/_config.js index 799934267c3..b7739b10717 100644 --- a/test/function/samples/aync-options/_config.js +++ b/test/function/samples/aync-options/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles async plugin options', options: { preserveEntrySignatures: false, @@ -22,4 +22,4 @@ module.exports = { exports(exports) { assert.strictEqual(exports.foo, 1); } -}; +}); diff --git a/test/function/samples/banner-and-footer/_config.js b/test/function/samples/banner-and-footer/_config.js index 6d2b514849b..476b5c12da8 100644 --- a/test/function/samples/banner-and-footer/_config.js +++ b/test/function/samples/banner-and-footer/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds a banner/footer', options: { output: { @@ -32,4 +32,4 @@ module.exports = { 'Could not retrieve "banner". Check configuration of plugin "at position 3".\n' + '\tError Message: Could not generate banner.' } -}; +}); diff --git a/test/function/samples/bindings/_config.js b/test/function/samples/bindings/_config.js index 963674adbca..7b03794f01b 100644 --- a/test/function/samples/bindings/_config.js +++ b/test/function/samples/bindings/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'maintains live bindings' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/bindings diff --git a/test/function/samples/braceless-arrow-function-returning-function/_config.js b/test/function/samples/braceless-arrow-function-returning-function/_config.js index 03ddb4d4951..4736904c5b0 100644 --- a/test/function/samples/braceless-arrow-function-returning-function/_config.js +++ b/test/function/samples/braceless-arrow-function-returning-function/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'arrow function without braces returning a function (#1032)' -}; +}); diff --git a/test/function/samples/break-label/_config.js b/test/function/samples/break-label/_config.js index 960a4831f6d..fc4d779aae0 100644 --- a/test/function/samples/break-label/_config.js +++ b/test/function/samples/break-label/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'do not deconflict break label (#2773)', exports(exports) { assert.deepStrictEqual(exports, { value: 'original', n: 1 }); } -}; +}); diff --git a/test/function/samples/build-promise-chain/_config.js b/test/function/samples/build-promise-chain/_config.js index 080c0fd694e..c0d33f22bc5 100644 --- a/test/function/samples/build-promise-chain/_config.js +++ b/test/function/samples/build-promise-chain/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Does not fail when iteratively chaining promises' -}; +}); diff --git a/test/function/samples/builtin-prototypes/argument-side-effects/_config.js b/test/function/samples/builtin-prototypes/argument-side-effects/_config.js index 5e77f83b5cc..d3abbffa069 100644 --- a/test/function/samples/builtin-prototypes/argument-side-effects/_config.js +++ b/test/function/samples/builtin-prototypes/argument-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects in chained string method arguments' -}; +}); diff --git a/test/function/samples/builtin-prototypes/truthiness/_config.js b/test/function/samples/builtin-prototypes/truthiness/_config.js index 9c57e067add..f128b1bb288 100644 --- a/test/function/samples/builtin-prototypes/truthiness/_config.js +++ b/test/function/samples/builtin-prototypes/truthiness/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'regards builtin methods as truthy in objects' -}; +}); diff --git a/test/function/samples/bundle-facade-order/_config.js b/test/function/samples/bundle-facade-order/_config.js index d305f92fd25..004d500f97d 100644 --- a/test/function/samples/bundle-facade-order/_config.js +++ b/test/function/samples/bundle-facade-order/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'respects the order of entry points when there are additional facades for chunks', options: { input: { @@ -24,4 +24,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/call-external-function/_config.js b/test/function/samples/call-external-function/_config.js index 5e2f554e13d..bfe0595afa2 100644 --- a/test/function/samples/call-external-function/_config.js +++ b/test/function/samples/call-external-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles call of aliased external function (#957)', warnings() {}, context: { @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/call-marked-pure-with-plugin-parse-ast/_config.js b/test/function/samples/call-marked-pure-with-plugin-parse-ast/_config.js index e224995b0b5..74bcba50936 100644 --- a/test/function/samples/call-marked-pure-with-plugin-parse-ast/_config.js +++ b/test/function/samples/call-marked-pure-with-plugin-parse-ast/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'external function calls marked with pure comment do not have effects and should be removed even if parsed by PluginContext.parse method', options: { @@ -30,4 +30,4 @@ module.exports = { code(code) { assert.ok(code.search(/socks\(\)/) === -1); } -}; +}); diff --git a/test/function/samples/call-marked-pure/_config.js b/test/function/samples/call-marked-pure/_config.js index 7eabd676ea5..0d7e5e3ead8 100644 --- a/test/function/samples/call-marked-pure/_config.js +++ b/test/function/samples/call-marked-pure/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'external function calls marked with pure comment do not have effects', options: { external: ['socks'] @@ -17,4 +17,4 @@ module.exports = { code(code) { assert.ok(code.search(/socks\(\)/) === -1); } -}; +}); diff --git a/test/function/samples/call-non-function-default-exports/_config.js b/test/function/samples/call-non-function-default-exports/_config.js index e03afa4b73a..6a3a389d3fa 100644 --- a/test/function/samples/call-non-function-default-exports/_config.js +++ b/test/function/samples/call-non-function-default-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'calls non-function default exports' -}; +}); diff --git a/test/function/samples/can-import-self-treeshake/_config.js b/test/function/samples/can-import-self-treeshake/_config.js index 167e675e9f6..ca05a478dd2 100644 --- a/test/function/samples/can-import-self-treeshake/_config.js +++ b/test/function/samples/can-import-self-treeshake/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_LIB = path.join(__dirname, 'lib.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'direct self import', warnings: [ { @@ -15,4 +15,4 @@ module.exports = { names: ['main'] } ] -}; +}); diff --git a/test/function/samples/can-import-self/_config.js b/test/function/samples/can-import-self/_config.js index 359e5767e4c..0fbf1300212 100644 --- a/test/function/samples/can-import-self/_config.js +++ b/test/function/samples/can-import-self/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const ID_LIB = path.join(__dirname, 'lib.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'a module importing its own bindings', exports(exports) { assert.equal(exports.result, 4); @@ -14,4 +14,4 @@ module.exports = { message: 'Circular dependency: lib.js -> lib.js' } ] -}; +}); diff --git a/test/function/samples/cannot-call-external-namespace/_config.js b/test/function/samples/cannot-call-external-namespace/_config.js index 29db9a5baf3..823c2700e1a 100644 --- a/test/function/samples/cannot-call-external-namespace/_config.js +++ b/test/function/samples/cannot-call-external-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns if code calls an external namespace', options: { external: ['fs'] @@ -11,4 +11,4 @@ module.exports = { 'main.js (8:1) Cannot call a namespace ("foo").' ]); } -}; +}); diff --git a/test/function/samples/cannot-call-internal-namespace/_config.js b/test/function/samples/cannot-call-internal-namespace/_config.js index 99945d564ea..023106c0574 100644 --- a/test/function/samples/cannot-call-internal-namespace/_config.js +++ b/test/function/samples/cannot-call-internal-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns if code calls an internal namespace', warnings(warnings) { assert.deepStrictEqual(warnings.map(String), [ @@ -8,4 +8,4 @@ module.exports = { 'main.js (8:1) Cannot call a namespace ("foo").' ]); } -}; +}); diff --git a/test/function/samples/cannot-resolve-sourcemap-warning/_config.js b/test/function/samples/cannot-resolve-sourcemap-warning/_config.js index 5339c89df06..2a56c5b9275 100644 --- a/test/function/samples/cannot-resolve-sourcemap-warning/_config.js +++ b/test/function/samples/cannot-resolve-sourcemap-warning/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles when a sourcemap cannot be resolved in a warning', options: { plugins: { @@ -45,4 +45,4 @@ module.exports = { url: 'https://rollupjs.org/troubleshooting/#error-this-is-undefined' } ] -}; +}); diff --git a/test/function/samples/catch-block-scope/_config.js b/test/function/samples/catch-block-scope/_config.js index 115e22e0260..a85397a7c33 100644 --- a/test/function/samples/catch-block-scope/_config.js +++ b/test/function/samples/catch-block-scope/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct scope in catch blocks' -}; +}); diff --git a/test/function/samples/catch-dynamic-import-failure/_config.js b/test/function/samples/catch-dynamic-import-failure/_config.js index cf95730c8e7..098e725ae7b 100644 --- a/test/function/samples/catch-dynamic-import-failure/_config.js +++ b/test/function/samples/catch-dynamic-import-failure/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows catching failed dynamic imports', options: { input: ['main', 'exists-default'], @@ -14,4 +14,4 @@ module.exports = { assert.strictEqual(result[2].message.slice(0, expectedError.length), expectedError); }); } -}; +}); diff --git a/test/function/samples/catch-scope-shadowing/_config.js b/test/function/samples/catch-scope-shadowing/_config.js index 6a7cd9de660..15f8534ef1e 100644 --- a/test/function/samples/catch-scope-shadowing/_config.js +++ b/test/function/samples/catch-scope-shadowing/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly associates shadowed variables in catch scopes' -}; +}); diff --git a/test/function/samples/catch-scope-variables/_config.js b/test/function/samples/catch-scope-variables/_config.js index b902e7168d5..f3048ce147a 100644 --- a/test/function/samples/catch-scope-variables/_config.js +++ b/test/function/samples/catch-scope-variables/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles variable declarations in catch scopes' -}; +}); diff --git a/test/function/samples/chained-mutable-array-methods/_config.js b/test/function/samples/chained-mutable-array-methods/_config.js index c0ac15f1194..c8849abb961 100644 --- a/test/function/samples/chained-mutable-array-methods/_config.js +++ b/test/function/samples/chained-mutable-array-methods/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'recognizes side-effects when applying mutable array methods to chained array methods (#3555)', exports(exports) { assert.deepStrictEqual(exports.a, ['PASS']); } -}; +}); diff --git a/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js b/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js index 39fb90ab737..3055d02c799 100644 --- a/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js +++ b/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js @@ -20,7 +20,7 @@ const expectedResult = { } }; -module.exports = { +module.exports = defineRollupTest({ description: 'check exports and exportedBindings in moduleParsed as a supplementary test', options: { plugins: { @@ -30,4 +30,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/check-resolve-for-entry/_config.js b/test/function/samples/check-resolve-for-entry/_config.js index b2120f29507..a0a9606b7d8 100644 --- a/test/function/samples/check-resolve-for-entry/_config.js +++ b/test/function/samples/check-resolve-for-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'checks that entry is resolved', options: { input: 'not/a/path/that/actually/really/exists' @@ -7,4 +7,4 @@ module.exports = { code: 'UNRESOLVED_ENTRY', message: 'Could not resolve entry module "not/a/path/that/actually/really/exists".' } -}; +}); diff --git a/test/function/samples/chunk-external-dependency-execution-order/_config.js b/test/function/samples/chunk-external-dependency-execution-order/_config.js index cc97adaa192..76fe2d25b70 100644 --- a/test/function/samples/chunk-external-dependency-execution-order/_config.js +++ b/test/function/samples/chunk-external-dependency-execution-order/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const executionOrder = []; -module.exports = { +module.exports = defineRollupTest({ description: 'Uses correct execution order when several modules in a chunk have external dependencies', context: { @@ -17,4 +17,4 @@ module.exports = { exports() { assert.deepStrictEqual(executionOrder, ['external-first', 'external-second', 'dep', 'main']); } -}; +}); diff --git a/test/function/samples/chunking-duplicate-reexport/_config.js b/test/function/samples/chunking-duplicate-reexport/_config.js index 14d2eb4b192..99a0256a64a 100644 --- a/test/function/samples/chunking-duplicate-reexport/_config.js +++ b/test/function/samples/chunking-duplicate-reexport/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles duplicate reexports when using dynamic imports', exports(exports) { return exports.then(result => assert.deepStrictEqual(result, [{ answer: 42 }, { answer: 42 }])); } -}; +}); diff --git a/test/function/samples/circular-default-exports/_config.js b/test/function/samples/circular-default-exports/_config.js index 1614850f578..0b7ec703a29 100644 --- a/test/function/samples/circular-default-exports/_config.js +++ b/test/function/samples/circular-default-exports/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles circular default exports', warnings: [ { @@ -10,4 +10,4 @@ module.exports = { message: 'Circular dependency: main.js -> main.js' } ] -}; +}); diff --git a/test/function/samples/circular-missed-reexports-2/_config.js b/test/function/samples/circular-missed-reexports-2/_config.js index 3bcb4160a8c..a1ed4164d5b 100644 --- a/test/function/samples/circular-missed-reexports-2/_config.js +++ b/test/function/samples/circular-missed-reexports-2/_config.js @@ -4,7 +4,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP1 = path.join(__dirname, 'dep1.js'); const ID_DEP2 = path.join(__dirname, 'dep2.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles circular reexports', exports(exports) { assert.strictEqual(exports.exists, 42); @@ -16,4 +16,4 @@ module.exports = { '"doesNotExist" cannot be exported from "dep1.js" as it is a reexport that references itself.', watchFiles: [ID_DEP1, ID_DEP2, ID_MAIN] } -}; +}); diff --git a/test/function/samples/circular-missed-reexports/_config.js b/test/function/samples/circular-missed-reexports/_config.js index 727d8069c4a..3adbcb023d7 100644 --- a/test/function/samples/circular-missed-reexports/_config.js +++ b/test/function/samples/circular-missed-reexports/_config.js @@ -5,7 +5,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP1 = path.join(__dirname, 'dep1.js'); const ID_DEP2 = path.join(__dirname, 'dep2.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles circular reexports', exports(exports) { assert.strictEqual(exports.exists, 42); @@ -48,4 +48,4 @@ module.exports = { reexporter: ID_DEP2 } ] -}; +}); diff --git a/test/function/samples/circular-namespace-reexport-manual-chunks/_config.js b/test/function/samples/circular-namespace-reexport-manual-chunks/_config.js index eff91817d4c..897d8c1589a 100644 --- a/test/function/samples/circular-namespace-reexport-manual-chunks/_config.js +++ b/test/function/samples/circular-namespace-reexport-manual-chunks/_config.js @@ -5,7 +5,7 @@ const ID_TYPES = path.join(__dirname, 'types.js'); const ID_FORMATTERS = path.join(__dirname, 'formatters.js'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles namespace reexports with circular dependencies when using manual chunks', options: { @@ -64,4 +64,4 @@ module.exports = { names: ['index.js'] } ] -}; +}); diff --git a/test/function/samples/circular-namespace-reexport-preserve-modules/_config.js b/test/function/samples/circular-namespace-reexport-preserve-modules/_config.js index a66f558f911..d8a184df5c6 100644 --- a/test/function/samples/circular-namespace-reexport-preserve-modules/_config.js +++ b/test/function/samples/circular-namespace-reexport-preserve-modules/_config.js @@ -5,7 +5,7 @@ const ID_TYPES = path.join(__dirname, 'types.js'); const ID_FORMATTERS = path.join(__dirname, 'formatters.js'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles namespace reexports with circular dependencies when preserving modules', options: { @@ -57,4 +57,4 @@ module.exports = { reexporter: ID_INDEX } ] -}; +}); diff --git a/test/function/samples/circular-preserve-modules/_config.js b/test/function/samples/circular-preserve-modules/_config.js index ee8b3ded422..26a01a408c6 100644 --- a/test/function/samples/circular-preserve-modules/_config.js +++ b/test/function/samples/circular-preserve-modules/_config.js @@ -3,7 +3,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FIRST = path.join(__dirname, 'first.js'); const ID_SECOND = path.join(__dirname, 'second.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles circular dependencies when preserving modules', options: { output: { preserveModules: true } @@ -36,4 +36,4 @@ module.exports = { reexporter: ID_MAIN } ] -}; +}); diff --git a/test/function/samples/circular-reexport/_config.js b/test/function/samples/circular-reexport/_config.js index 79e6f092a7f..bc1b9fa78b8 100644 --- a/test/function/samples/circular-reexport/_config.js +++ b/test/function/samples/circular-reexport/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws proper error for circular reexports', error: { code: 'CIRCULAR_REEXPORT', @@ -9,4 +9,4 @@ module.exports = { message: '"foo" cannot be exported from "main.js" as it is a reexport that references itself.', watchFiles: [ID_MAIN] } -}; +}); diff --git a/test/function/samples/class-method-getter-properties/_config.js b/test/function/samples/class-method-getter-properties/_config.js index 6a6f5724505..002edb748a4 100644 --- a/test/function/samples/class-method-getter-properties/_config.js +++ b/test/function/samples/class-method-getter-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects getters added to class methods' -}; +}); diff --git a/test/function/samples/class-method-mutation/_config.js b/test/function/samples/class-method-mutation/_config.js index fcf070b8b11..f3442679d9b 100644 --- a/test/function/samples/class-method-mutation/_config.js +++ b/test/function/samples/class-method-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of class methods' -}; +}); diff --git a/test/function/samples/class-method-mutations/_config.js b/test/function/samples/class-method-mutations/_config.js index 40da5095641..31dc605476e 100644 --- a/test/function/samples/class-method-mutations/_config.js +++ b/test/function/samples/class-method-mutations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes variable mutations in class methods if tree-shaking is disabled', options: { treeshake: false @@ -8,4 +8,4 @@ module.exports = { async exports({ promise }) { assert.strictEqual(await promise, 'ok'); } -}; +}); diff --git a/test/function/samples/class-method-returns/_config.js b/test/function/samples/class-method-returns/_config.js index b2fc183b770..91164274c56 100644 --- a/test/function/samples/class-method-returns/_config.js +++ b/test/function/samples/class-method-returns/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes return values of class methods' -}; +}); diff --git a/test/function/samples/class-methods-not-renamed/_config.js b/test/function/samples/class-methods-not-renamed/_config.js index a5afb24b4d8..7396b2cb26f 100644 --- a/test/function/samples/class-methods-not-renamed/_config.js +++ b/test/function/samples/class-methods-not-renamed/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not rename class methods incorrectly', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/class-name-conflict-2/_config.js b/test/function/samples/class-name-conflict-2/_config.js index 922cad01591..6a0db8b219c 100644 --- a/test/function/samples/class-name-conflict-2/_config.js +++ b/test/function/samples/class-name-conflict-2/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not shadow variables when preserving class names' -}; +}); diff --git a/test/function/samples/class-name-conflict-3/_config.js b/test/function/samples/class-name-conflict-3/_config.js index 922cad01591..6a0db8b219c 100644 --- a/test/function/samples/class-name-conflict-3/_config.js +++ b/test/function/samples/class-name-conflict-3/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not shadow variables when preserving class names' -}; +}); diff --git a/test/function/samples/class-name-conflict-4/_config.js b/test/function/samples/class-name-conflict-4/_config.js index 922cad01591..6a0db8b219c 100644 --- a/test/function/samples/class-name-conflict-4/_config.js +++ b/test/function/samples/class-name-conflict-4/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not shadow variables when preserving class names' -}; +}); diff --git a/test/function/samples/class-name-conflict/_config.js b/test/function/samples/class-name-conflict/_config.js index 336557d03a1..df128cb9ebd 100644 --- a/test/function/samples/class-name-conflict/_config.js +++ b/test/function/samples/class-name-conflict/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves class names even if the class is renamed' -}; +}); diff --git a/test/function/samples/class-prop-returns/_config.js b/test/function/samples/class-prop-returns/_config.js index 0e621669013..c9613112c50 100644 --- a/test/function/samples/class-prop-returns/_config.js +++ b/test/function/samples/class-prop-returns/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not remove calls to props without value', exports({ callProp, callStaticProp }) { let hasError = false; @@ -18,4 +18,4 @@ module.exports = { } assert.ok(hasError); } -}; +}); diff --git a/test/function/samples/code-splitting-export-default-from-entry/_config.js b/test/function/samples/code-splitting-export-default-from-entry/_config.js index aa1c0533854..c02dfd5b750 100644 --- a/test/function/samples/code-splitting-export-default-from-entry/_config.js +++ b/test/function/samples/code-splitting-export-default-from-entry/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly imports the default from an entry point', options: { input: ['main', 'dep'] @@ -10,4 +10,4 @@ module.exports = { value: 42 }); } -}; +}); diff --git a/test/function/samples/compact-multiple-imports/_config.js b/test/function/samples/compact-multiple-imports/_config.js index b651e98d09d..764fe06640e 100644 --- a/test/function/samples/compact-multiple-imports/_config.js +++ b/test/function/samples/compact-multiple-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles empty external imports in compact mode', context: { require(id) { @@ -13,4 +13,4 @@ module.exports = { compact: true } } -}; +}); diff --git a/test/function/samples/compact/_config.js b/test/function/samples/compact/_config.js index acacdf30b40..40accfc26cd 100644 --- a/test/function/samples/compact/_config.js +++ b/test/function/samples/compact/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'compact output with compact: true', options: { external: ['external'], @@ -22,4 +22,4 @@ module.exports = { return 42; } } -}; +}); diff --git a/test/function/samples/conditional-catch/_config.js b/test/function/samples/conditional-catch/_config.js index 7fe0c318b80..fb28431225d 100644 --- a/test/function/samples/conditional-catch/_config.js +++ b/test/function/samples/conditional-catch/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles conditional catch blocks (#3869)' -}; +}); diff --git a/test/function/samples/conditional-definition/_config.js b/test/function/samples/conditional-definition/_config.js index a6b22f45c2e..ebc7b949428 100644 --- a/test/function/samples/conditional-definition/_config.js +++ b/test/function/samples/conditional-definition/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'avoids infinite loop when testing conditional definitions' -}; +}); diff --git a/test/function/samples/conditionals-deoptimization/_config.js b/test/function/samples/conditionals-deoptimization/_config.js index 2f081f1dc6c..a85c5f01210 100644 --- a/test/function/samples/conditionals-deoptimization/_config.js +++ b/test/function/samples/conditionals-deoptimization/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles deoptimization of conditionals', exports(exports) { assert.deepStrictEqual(exports, { @@ -14,4 +14,4 @@ module.exports = { log2b: true }); } -}; +}); diff --git a/test/function/samples/configure-external-module-b/_config.js b/test/function/samples/configure-external-module-b/_config.js index ebff63749b9..74786d49a7f 100644 --- a/test/function/samples/configure-external-module-b/_config.js +++ b/test/function/samples/configure-external-module-b/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows external module to be configured (b)', options: { external: ['path'] @@ -8,4 +8,4 @@ module.exports = { exports() { assert.equal(require('node:path').resolve.configured, 'yes'); } -}; +}); diff --git a/test/function/samples/configure-external-module/_config.js b/test/function/samples/configure-external-module/_config.js index c9faeeea5f6..4f067a3c915 100644 --- a/test/function/samples/configure-external-module/_config.js +++ b/test/function/samples/configure-external-module/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows external module to be configured', options: { external: ['path'] @@ -8,4 +8,4 @@ module.exports = { exports() { assert.equal(require('node:path').resolve.configured, 'yes'); } -}; +}); diff --git a/test/function/samples/configure-relative-external-module/_config.js b/test/function/samples/configure-relative-external-module/_config.js index 531c906f647..453b9f9d3a2 100644 --- a/test/function/samples/configure-relative-external-module/_config.js +++ b/test/function/samples/configure-relative-external-module/_config.js @@ -5,7 +5,7 @@ const mockedValue = { val: 'A value' }; -module.exports = { +module.exports = defineRollupTest({ description: 'allows a nonexistent relative module to be configured as external', options: { external: [path.join(__dirname, './nonexistent-relative-dependency.js')] @@ -18,4 +18,4 @@ module.exports = { exports() { assert.equal(mockedValue.wasAltered, true); } -}; +}); diff --git a/test/function/samples/conflicting-reexports/named-import-external/_config.js b/test/function/samples/conflicting-reexports/named-import-external/_config.js index a7c86096b51..5c1db2bf010 100644 --- a/test/function/samples/conflicting-reexports/named-import-external/_config.js +++ b/test/function/samples/conflicting-reexports/named-import-external/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_REEXPORT = path.join(__dirname, 'reexport.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns when a conflicting binding is imported via a named import from external namespaces', warnings: [ @@ -27,4 +27,4 @@ module.exports = { return { foo: id }; } } -}; +}); diff --git a/test/function/samples/conflicting-reexports/named-import/_config.js b/test/function/samples/conflicting-reexports/named-import/_config.js index 60e3a80d871..5befc057a4a 100644 --- a/test/function/samples/conflicting-reexports/named-import/_config.js +++ b/test/function/samples/conflicting-reexports/named-import/_config.js @@ -5,7 +5,7 @@ const ID_REEXPORT = path.join(__dirname, 'reexport.js'); const ID_FIRST = path.join(__dirname, 'first.js'); const ID_SECOND = path.join(__dirname, 'second.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when a conflicting binding is imported via a named import', error: { binding: 'foo', @@ -27,4 +27,4 @@ module.exports = { watchFiles: [ID_FIRST, ID_MAIN, ID_REEXPORT, ID_SECOND], message: '"foo" is not exported by "reexport.js", imported by "main.js".' } -}; +}); diff --git a/test/function/samples/conflicting-reexports/namespace-import/_config.js b/test/function/samples/conflicting-reexports/namespace-import/_config.js index ce3a21c3d89..a5e49c2030c 100644 --- a/test/function/samples/conflicting-reexports/namespace-import/_config.js +++ b/test/function/samples/conflicting-reexports/namespace-import/_config.js @@ -4,7 +4,7 @@ const ID_FIRST = path.join(__dirname, 'first.js'); const ID_SECOND = path.join(__dirname, 'second.js'); const ID_REEXPORT = path.join(__dirname, 'reexport.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns when a conflicting binding is imported via a namespace import', warnings: [ { @@ -35,4 +35,4 @@ module.exports = { ^` } ] -}; +}); diff --git a/test/function/samples/conflicting-reexports/same-binding/_config.js b/test/function/samples/conflicting-reexports/same-binding/_config.js index 3f46afb5feb..b058307353a 100644 --- a/test/function/samples/conflicting-reexports/same-binding/_config.js +++ b/test/function/samples/conflicting-reexports/same-binding/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not fail when the same binding is reexported from different files' -}; +}); diff --git a/test/function/samples/confused-default-identifier/_config.js b/test/function/samples/confused-default-identifier/_config.js index adb7973ab8f..78574dcdcdc 100644 --- a/test/function/samples/confused-default-identifier/_config.js +++ b/test/function/samples/confused-default-identifier/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Rollup should not get confused and allow "default" as an identifier name', warnings() {} // suppress -}; +}); // https://github.com/rollup/rollup/issues/215 diff --git a/test/function/samples/consistent-renaming-b/_config.js b/test/function/samples/consistent-renaming-b/_config.js index f1b3ee69460..7833fc9f589 100644 --- a/test/function/samples/consistent-renaming-b/_config.js +++ b/test/function/samples/consistent-renaming-b/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'consistent renaming test b' -}; +}); diff --git a/test/function/samples/consistent-renaming-c/_config.js b/test/function/samples/consistent-renaming-c/_config.js index 4b30d565081..1af73d39c1c 100644 --- a/test/function/samples/consistent-renaming-c/_config.js +++ b/test/function/samples/consistent-renaming-c/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'consistent renaming test c' -}; +}); diff --git a/test/function/samples/consistent-renaming-d/_config.js b/test/function/samples/consistent-renaming-d/_config.js index 6859f78784e..66feb6ab21b 100644 --- a/test/function/samples/consistent-renaming-d/_config.js +++ b/test/function/samples/consistent-renaming-d/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'consistent renaming test d' -}; +}); diff --git a/test/function/samples/consistent-renaming-e/_config.js b/test/function/samples/consistent-renaming-e/_config.js index 52455ada4c0..737226c600c 100644 --- a/test/function/samples/consistent-renaming-e/_config.js +++ b/test/function/samples/consistent-renaming-e/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'consistent renaming test e' -}; +}); diff --git a/test/function/samples/consistent-renaming-f/_config.js b/test/function/samples/consistent-renaming-f/_config.js index 873e29605c1..32e79fdcfa5 100644 --- a/test/function/samples/consistent-renaming-f/_config.js +++ b/test/function/samples/consistent-renaming-f/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'consistent renaming test f' -}; +}); diff --git a/test/function/samples/consistent-renaming/_config.js b/test/function/samples/consistent-renaming/_config.js index e6760b1fe5a..46b09ae62f4 100644 --- a/test/function/samples/consistent-renaming/_config.js +++ b/test/function/samples/consistent-renaming/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'consistent renaming test' -}; +}); diff --git a/test/function/samples/consistently-renames-destructured-parameters/_config.js b/test/function/samples/consistently-renames-destructured-parameters/_config.js index 6eb58a04984..2ca0e10dab4 100644 --- a/test/function/samples/consistently-renames-destructured-parameters/_config.js +++ b/test/function/samples/consistently-renames-destructured-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'destructured parameters are properly renamed (#2418)' -}; +}); diff --git a/test/function/samples/context-resolve-skipself/_config.js b/test/function/samples/context-resolve-skipself/_config.js index 2e95077d921..eea2eb1d4a0 100644 --- a/test/function/samples/context-resolve-skipself/_config.js +++ b/test/function/samples/context-resolve-skipself/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows a plugin to skip its own resolveId hook when using this.resolve', options: { plugins: [ @@ -39,4 +39,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/context-resolve/_config.js b/test/function/samples/context-resolve/_config.js index c3afd5ff60c..56bb9a3bce7 100644 --- a/test/function/samples/context-resolve/_config.js +++ b/test/function/samples/context-resolve/_config.js @@ -120,7 +120,7 @@ const tests = [ } ]; -module.exports = { +module.exports = defineRollupTest({ description: 'returns the correct results for the context resolve helper', options: { external: [ @@ -170,4 +170,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/correct-var-before-declaration-deopt/_config.js b/test/function/samples/correct-var-before-declaration-deopt/_config.js index c5e5b826788..f3df8b8d236 100644 --- a/test/function/samples/correct-var-before-declaration-deopt/_config.js +++ b/test/function/samples/correct-var-before-declaration-deopt/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds necessary deoptimizations when using var' -}; +}); diff --git a/test/function/samples/create-undefined-export-property-compact/_config.js b/test/function/samples/create-undefined-export-property-compact/_config.js index bf7d6da2238..8b8ad779c5d 100644 --- a/test/function/samples/create-undefined-export-property-compact/_config.js +++ b/test/function/samples/create-undefined-export-property-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'creates an export as an exports property even if is has no initializer', options: { output: { compact: true } }, exports(exports) { @@ -14,4 +14,4 @@ module.exports = { assert.strictEqual(exports.foo, 'defined'); assert.strictEqual(exports.bar, 'defined'); } -}; +}); diff --git a/test/function/samples/create-undefined-export-property/_config.js b/test/function/samples/create-undefined-export-property/_config.js index 1e18df1a143..9e7db9f0cb4 100644 --- a/test/function/samples/create-undefined-export-property/_config.js +++ b/test/function/samples/create-undefined-export-property/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'creates an export as an exports property even if is has no initializer', exports(exports) { assert.strictEqual(exports.foo, undefined); @@ -13,4 +13,4 @@ module.exports = { assert.strictEqual(exports.foo, 'defined'); assert.strictEqual(exports.bar, 'defined'); } -}; +}); diff --git a/test/function/samples/cross-chunk-live-binding-compact/_config.js b/test/function/samples/cross-chunk-live-binding-compact/_config.js index d86b3a4f75b..859277ed0cd 100644 --- a/test/function/samples/cross-chunk-live-binding-compact/_config.js +++ b/test/function/samples/cross-chunk-live-binding-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles cross-chunk live-bindings in compact mode', options: { input: ['main.js', 'named.js', 'star.js'], @@ -17,4 +17,4 @@ module.exports = { exports.incrementStar(); assert.equal(exports.star, 1, 'star'); } -}; +}); diff --git a/test/function/samples/cross-chunk-live-binding/_config.js b/test/function/samples/cross-chunk-live-binding/_config.js index 4e6c3df5be7..78b7c8799f4 100644 --- a/test/function/samples/cross-chunk-live-binding/_config.js +++ b/test/function/samples/cross-chunk-live-binding/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles cross-chunk live-bindings', options: { input: ['main.js', 'named.js', 'star.js'] @@ -14,4 +14,4 @@ module.exports = { exports.incrementStar(); assert.equal(exports.star, 1, 'star'); } -}; +}); diff --git a/test/function/samples/custom-external-module-options/_config.js b/test/function/samples/custom-external-module-options/_config.js index ef00e08a25e..323f05aee91 100644 --- a/test/function/samples/custom-external-module-options/_config.js +++ b/test/function/samples/custom-external-module-options/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports adding custom options to external modules', options: { plugins: [ @@ -22,4 +22,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/custom-external-resolver-async/_config.js b/test/function/samples/custom-external-resolver-async/_config.js index 5f5580d01e4..beff4dab491 100644 --- a/test/function/samples/custom-external-resolver-async/_config.js +++ b/test/function/samples/custom-external-resolver-async/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses a custom external path resolver (asynchronous)', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { exports(exports) { assert.ok(exports.success); } -}; +}); diff --git a/test/function/samples/custom-external-resolver-sync/_config.js b/test/function/samples/custom-external-resolver-sync/_config.js index d58aabcb42c..fdf219d8700 100644 --- a/test/function/samples/custom-external-resolver-sync/_config.js +++ b/test/function/samples/custom-external-resolver-sync/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses a custom external path resolver (synchronous)', options: { plugins: [ @@ -15,4 +15,4 @@ module.exports = { exports(exports) { assert.ok(exports.success); } -}; +}); diff --git a/test/function/samples/custom-iterator-2/_config.js b/test/function/samples/custom-iterator-2/_config.js index 046c68b3d57..8fa2e78b918 100644 --- a/test/function/samples/custom-iterator-2/_config.js +++ b/test/function/samples/custom-iterator-2/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles manually defined iterators' -}; +}); diff --git a/test/function/samples/custom-iterator/_config.js b/test/function/samples/custom-iterator/_config.js index 046c68b3d57..8fa2e78b918 100644 --- a/test/function/samples/custom-iterator/_config.js +++ b/test/function/samples/custom-iterator/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles manually defined iterators' -}; +}); diff --git a/test/function/samples/custom-loaders/_config.js b/test/function/samples/custom-loaders/_config.js index f77543e1c65..8cd0b9ff268 100644 --- a/test/function/samples/custom-loaders/_config.js +++ b/test/function/samples/custom-loaders/_config.js @@ -1,6 +1,6 @@ const { readFileSync } = require('node:fs'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses custom loaders, falling back to default', options: { plugins: [ @@ -20,4 +20,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/custom-module-options/_config.js b/test/function/samples/custom-module-options/_config.js index eb5e1647b6c..b7977e23bc0 100644 --- a/test/function/samples/custom-module-options/_config.js +++ b/test/function/samples/custom-module-options/_config.js @@ -30,7 +30,7 @@ function getTestPlugin(index) { }; } -module.exports = { +module.exports = defineRollupTest({ description: 'supports adding custom options to modules', options: { plugins: [ @@ -73,4 +73,4 @@ module.exports = { value3: { 'test-3': { loaded: 3 }, 'test-1': { transformed: 1 } } }); } -}; +}); diff --git a/test/function/samples/custom-path-resolver-async/_config.js b/test/function/samples/custom-path-resolver-async/_config.js index cb48e2a9ae0..3cb9640da09 100644 --- a/test/function/samples/custom-path-resolver-async/_config.js +++ b/test/function/samples/custom-path-resolver-async/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses a custom path resolver (asynchronous)', options: { plugins: [ @@ -17,4 +17,4 @@ module.exports = { exports(exports) { assert.strictEqual(exports.path, require('node:path')); } -}; +}); diff --git a/test/function/samples/custom-path-resolver-on-entry/_config.js b/test/function/samples/custom-path-resolver-on-entry/_config.js index 275a1b06662..2ad57fb929f 100644 --- a/test/function/samples/custom-path-resolver-on-entry/_config.js +++ b/test/function/samples/custom-path-resolver-on-entry/_config.js @@ -6,7 +6,7 @@ const cachedModules = { '@main.js': 'import foo from "./foo"; export default foo();' }; -module.exports = { +module.exports = defineRollupTest({ description: 'applies custom resolver to entry point', options: { plugins: [ @@ -33,4 +33,4 @@ module.exports = { exports(exports) { assert.equal(exports, 42); } -}; +}); diff --git a/test/function/samples/custom-path-resolver-plural-b/_config.js b/test/function/samples/custom-path-resolver-plural-b/_config.js index 8407c4a5632..575de1ccef4 100644 --- a/test/function/samples/custom-path-resolver-plural-b/_config.js +++ b/test/function/samples/custom-path-resolver-plural-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'resolver error is not caught', options: { plugins: [ @@ -23,4 +23,4 @@ module.exports = { message: 'nope', plugin: 'at position 1' } -}; +}); diff --git a/test/function/samples/custom-path-resolver-plural/_config.js b/test/function/samples/custom-path-resolver-plural/_config.js index 9973c70df63..1b722042d2c 100644 --- a/test/function/samples/custom-path-resolver-plural/_config.js +++ b/test/function/samples/custom-path-resolver-plural/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses custom path resolvers (plural)', options: { plugins: [ @@ -24,4 +24,4 @@ module.exports = { exports(exports) { assert.strictEqual(exports.res, 0); } -}; +}); diff --git a/test/function/samples/custom-path-resolver-sync/_config.js b/test/function/samples/custom-path-resolver-sync/_config.js index dd8d62fe666..8eac22d2dd1 100644 --- a/test/function/samples/custom-path-resolver-sync/_config.js +++ b/test/function/samples/custom-path-resolver-sync/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses a custom path resolver (synchronous)', options: { plugins: [ @@ -18,4 +18,4 @@ module.exports = { exports(exports) { assert.strictEqual(exports.path, require('node:path')); } -}; +}); diff --git a/test/function/samples/custom-resolve-options/_config.js b/test/function/samples/custom-resolve-options/_config.js index e3239753065..621fb526378 100644 --- a/test/function/samples/custom-resolve-options/_config.js +++ b/test/function/samples/custom-resolve-options/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports custom resolve options', options: { plugins: [ @@ -34,4 +34,4 @@ module.exports = { second: 'the-actual-id' }); } -}; +}); diff --git a/test/function/samples/cycles-default-anonymous-function-hoisted/_config.js b/test/function/samples/cycles-default-anonymous-function-hoisted/_config.js index 6b24720266f..19dfcc4c768 100644 --- a/test/function/samples/cycles-default-anonymous-function-hoisted/_config.js +++ b/test/function/samples/cycles-default-anonymous-function-hoisted/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_F = path.join(__dirname, 'f.js'); const ID_G = path.join(__dirname, 'g.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'Anonymous function declarations are hoisted', warnings: [ { @@ -11,4 +11,4 @@ module.exports = { message: 'Circular dependency: f.js -> g.js -> f.js' } ] -}; +}); diff --git a/test/function/samples/cycles-defaults/_config.js b/test/function/samples/cycles-defaults/_config.js index 0836a96ff5c..2b0b920fb75 100644 --- a/test/function/samples/cycles-defaults/_config.js +++ b/test/function/samples/cycles-defaults/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_A = path.join(__dirname, 'a.js'); const ID_B = path.join(__dirname, 'b.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'cycles work with default exports', warnings: [ { @@ -11,6 +11,6 @@ module.exports = { message: 'Circular dependency: a.js -> b.js -> a.js' } ] -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/cycles-defaults diff --git a/test/function/samples/cycles-export-star/_config.js b/test/function/samples/cycles-export-star/_config.js index dc04c179ae3..eeff001626e 100644 --- a/test/function/samples/cycles-export-star/_config.js +++ b/test/function/samples/cycles-export-star/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_A = path.join(__dirname, 'a.js'); const ID_B = path.join(__dirname, 'b.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not stack overflow on `export * from X` cycles', code(code) { assert.equal( @@ -18,4 +18,4 @@ module.exports = { message: 'Circular dependency: a.js -> b.js -> a.js' } ] -}; +}); diff --git a/test/function/samples/cycles-immediate/_config.js b/test/function/samples/cycles-immediate/_config.js index b64647acfdd..7e6c693edfa 100644 --- a/test/function/samples/cycles-immediate/_config.js +++ b/test/function/samples/cycles-immediate/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_EVENS = path.join(__dirname, 'evens.js'); const ID_ODDS = path.join(__dirname, 'odds.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles cycles where imports are immediately used', warnings: [ { @@ -11,6 +11,6 @@ module.exports = { message: 'Circular dependency: evens.js -> odds.js -> evens.js' } ] -}; +}); // Test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/cycles-immediate diff --git a/test/function/samples/cycles-pathological-2/_config.js b/test/function/samples/cycles-pathological-2/_config.js index 462bc546681..987b4ce3c97 100644 --- a/test/function/samples/cycles-pathological-2/_config.js +++ b/test/function/samples/cycles-pathological-2/_config.js @@ -4,7 +4,7 @@ const ID_B = path.join(__dirname, 'b.js'); const ID_C = path.join(__dirname, 'c.js'); const ID_D = path.join(__dirname, 'd.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'resolves even more pathological cyclical dependencies gracefully', warnings: [ { @@ -23,4 +23,4 @@ module.exports = { message: 'Circular dependency: main.js -> b.js -> d.js -> c.js -> main.js' } ] -}; +}); diff --git a/test/function/samples/cycles-stack-overflow/_config.js b/test/function/samples/cycles-stack-overflow/_config.js index 6dc79fbc2a9..93a176d0e5a 100644 --- a/test/function/samples/cycles-stack-overflow/_config.js +++ b/test/function/samples/cycles-stack-overflow/_config.js @@ -3,7 +3,7 @@ const ID_B = path.join(__dirname, 'b.js'); const ID_C = path.join(__dirname, 'c.js'); const ID_D = path.join(__dirname, 'd.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not stack overflow on crazy cyclical dependencies', warnings: [ { @@ -17,4 +17,4 @@ module.exports = { message: 'Circular dependency: c.js -> d.js -> c.js' } ] -}; +}); diff --git a/test/function/samples/cyclic-assignments/_config.js b/test/function/samples/cyclic-assignments/_config.js index ca96493478d..e14a6eae412 100644 --- a/test/function/samples/cyclic-assignments/_config.js +++ b/test/function/samples/cyclic-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not fail for cyclic assignments' -}; +}); diff --git a/test/function/samples/deconflict-deconflicted/_config.js b/test/function/samples/deconflict-deconflicted/_config.js index a3fcda5c37c..04317bb5cef 100644 --- a/test/function/samples/deconflict-deconflicted/_config.js +++ b/test/function/samples/deconflict-deconflicted/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'also deconflict variables which already appear to be deconflicted (#2683)' -}; +}); diff --git a/test/function/samples/deconflict-default-exported-named-function/_config.js b/test/function/samples/deconflict-default-exported-named-function/_config.js index 20c051e2287..2f306c8b4ce 100644 --- a/test/function/samples/deconflict-default-exported-named-function/_config.js +++ b/test/function/samples/deconflict-default-exported-named-function/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflict default exported named function and class expressions' -}; +}); diff --git a/test/function/samples/deconflict-ids/_config.js b/test/function/samples/deconflict-ids/_config.js index 0d91c9ee299..d8af863a0bc 100644 --- a/test/function/samples/deconflict-ids/_config.js +++ b/test/function/samples/deconflict-ids/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts reassigned ids' -}; +}); diff --git a/test/function/samples/deconflict-parameter-defaults/_config.js b/test/function/samples/deconflict-parameter-defaults/_config.js index dcba432ae02..d4528afc0f6 100644 --- a/test/function/samples/deconflict-parameter-defaults/_config.js +++ b/test/function/samples/deconflict-parameter-defaults/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'consistently deconflict variable names for parameter defaults' -}; +}); diff --git a/test/function/samples/deconflict-synthetic-named-export-cross-chunk/_config.js b/test/function/samples/deconflict-synthetic-named-export-cross-chunk/_config.js index d7a4173726f..9668c557a01 100644 --- a/test/function/samples/deconflict-synthetic-named-export-cross-chunk/_config.js +++ b/test/function/samples/deconflict-synthetic-named-export-cross-chunk/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts synthetic named exports across chunks', options: { input: ['main', 'foo'], @@ -16,4 +16,4 @@ module.exports = { exports(exports) { assert.strictEqual(exports(2), 4); } -}; +}); diff --git a/test/function/samples/deconflict-synthetic-named-export/_config.js b/test/function/samples/deconflict-synthetic-named-export/_config.js index fe0b30c3995..5b03941aca1 100644 --- a/test/function/samples/deconflict-synthetic-named-export/_config.js +++ b/test/function/samples/deconflict-synthetic-named-export/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts synthetic named exports', options: { plugins: [ @@ -14,4 +14,4 @@ module.exports = { exports(exports) { assert.strictEqual(exports(2), 4); } -}; +}); diff --git a/test/function/samples/deconflicts-classes/_config.js b/test/function/samples/deconflicts-classes/_config.js index ee66bd1122b..9113acc54c6 100644 --- a/test/function/samples/deconflicts-classes/_config.js +++ b/test/function/samples/deconflicts-classes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts top-level classes' -}; +}); diff --git a/test/function/samples/deconflicts-exports-2/_config.js b/test/function/samples/deconflicts-exports-2/_config.js index 7614e882491..9964c84e750 100644 --- a/test/function/samples/deconflicts-exports-2/_config.js +++ b/test/function/samples/deconflicts-exports-2/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'renames nested variables named "exports" if necessary', exports(exports) { assert.equal(exports.x, 2); } -}; +}); diff --git a/test/function/samples/deconflicts-exports-3/_config.js b/test/function/samples/deconflicts-exports-3/_config.js index d28b7c2d4cd..7ba3fcaf77d 100644 --- a/test/function/samples/deconflicts-exports-3/_config.js +++ b/test/function/samples/deconflicts-exports-3/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'renames variables named "module" if necessary', exports(exports) { assert.equal(exports, 1); } -}; +}); diff --git a/test/function/samples/deconflicts-exports/_config.js b/test/function/samples/deconflicts-exports/_config.js index c8c5d6617d0..254881cfe9f 100644 --- a/test/function/samples/deconflicts-exports/_config.js +++ b/test/function/samples/deconflicts-exports/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'renames variables named "exports" if necessary', exports(exports) { assert.deepEqual(Object.keys(exports), ['a', 'b']); assert.equal(exports.a, 'A'); assert.equal(exports.b, 42); } -}; +}); diff --git a/test/function/samples/deconflicts-external-imports/_config.js b/test/function/samples/deconflicts-external-imports/_config.js index 1e3b5d13baa..0ac013f064f 100644 --- a/test/function/samples/deconflicts-external-imports/_config.js +++ b/test/function/samples/deconflicts-external-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts external imports', context: { require(id) { @@ -10,4 +10,4 @@ module.exports = { options: { external: ['foo', 'bar'] } -}; +}); diff --git a/test/function/samples/deconflicts-generated-default-names/_config.js b/test/function/samples/deconflicts-generated-default-names/_config.js index ebf4a0748f9..37a0c8f90d4 100644 --- a/test/function/samples/deconflicts-generated-default-names/_config.js +++ b/test/function/samples/deconflicts-generated-default-names/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts generated default export names' -}; +}); diff --git a/test/function/samples/deconflicts-globals/_config.js b/test/function/samples/deconflicts-globals/_config.js index 360ce512dc9..9c034f0899e 100644 --- a/test/function/samples/deconflicts-globals/_config.js +++ b/test/function/samples/deconflicts-globals/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts names that are assumed to be global' -}; +}); diff --git a/test/function/samples/deconflicts-interop/_config.js b/test/function/samples/deconflicts-interop/_config.js index e569d383180..4215f9a92e0 100644 --- a/test/function/samples/deconflicts-interop/_config.js +++ b/test/function/samples/deconflicts-interop/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts the interop function', options: { external(id) { @@ -28,4 +28,4 @@ module.exports = { require: () => Object.defineProperty({ foo: 'foo', default: 'bar' }, '__esModule', { value: true }) } -}; +}); diff --git a/test/function/samples/deconstructed-exported-vars/_config.js b/test/function/samples/deconstructed-exported-vars/_config.js index 85daf65e32a..5b1e499ccad 100644 --- a/test/function/samples/deconstructed-exported-vars/_config.js +++ b/test/function/samples/deconstructed-exported-vars/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows destructuring in exported variable declarations, synthetic or otherwise', exports(exports) { assert.equal(exports.a, 1); assert.equal(exports.d, 4); } -}; +}); diff --git a/test/function/samples/default-export-as-is-bound/_config.js b/test/function/samples/default-export-as-is-bound/_config.js index 87d11362eae..49cff8457bf 100644 --- a/test/function/samples/default-export-as-is-bound/_config.js +++ b/test/function/samples/default-export-as-is-bound/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does bind export as default (#1078)' -}; +}); diff --git a/test/function/samples/default-export-before-declaration/_config.js b/test/function/samples/default-export-before-declaration/_config.js index 3f33d6f7db1..5d17ec53a46 100644 --- a/test/function/samples/default-export-before-declaration/_config.js +++ b/test/function/samples/default-export-before-declaration/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles default exports before a variable is declared', exports(exports) { assert.strictEqual(exports, undefined); } -}; +}); diff --git a/test/function/samples/default-export-is-not-bound-b/_config.js b/test/function/samples/default-export-is-not-bound-b/_config.js index ce8cd11c43f..78a8f7938c9 100644 --- a/test/function/samples/default-export-is-not-bound-b/_config.js +++ b/test/function/samples/default-export-is-not-bound-b/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not move default export statement above earlier statements', exports(exports) { assert.equal(exports.bar, 42); } -}; +}); diff --git a/test/function/samples/default-export-is-not-bound/_config.js b/test/function/samples/default-export-is-not-bound/_config.js index ca098561546..ad79156bfdd 100644 --- a/test/function/samples/default-export-is-not-bound/_config.js +++ b/test/function/samples/default-export-is-not-bound/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not bind default exports' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/export-default diff --git a/test/function/samples/default-export-with-null-prototype/_config.js b/test/function/samples/default-export-with-null-prototype/_config.js index 8912ca75d4c..af8f2bdd05c 100644 --- a/test/function/samples/default-export-with-null-prototype/_config.js +++ b/test/function/samples/default-export-with-null-prototype/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'default exports of objects with null prototypes are supported', options: { external: ['foo'], @@ -15,4 +15,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/default-exported-global/_config.js b/test/function/samples/default-exported-global/_config.js index 2d759c9b578..40cf6b1f293 100644 --- a/test/function/samples/default-exported-global/_config.js +++ b/test/function/samples/default-exported-global/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Tracks updates of default exported globals', exports(exports) { assert.deepStrictEqual(exports, { original: 1, updated: 2 }); } -}; +}); diff --git a/test/function/samples/default-exports-in-parens-class-with-id/_config.js b/test/function/samples/default-exports-in-parens-class-with-id/_config.js index 464d56a7ca3..3e5d4bab581 100644 --- a/test/function/samples/default-exports-in-parens-class-with-id/_config.js +++ b/test/function/samples/default-exports-in-parens-class-with-id/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles default class with id exports wrapped in parens' -}; +}); diff --git a/test/function/samples/default-exports-in-parens-class-without-id/_config.js b/test/function/samples/default-exports-in-parens-class-without-id/_config.js index bbde1c72917..1303130e643 100644 --- a/test/function/samples/default-exports-in-parens-class-without-id/_config.js +++ b/test/function/samples/default-exports-in-parens-class-without-id/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles default class without id exports wrapped in parens' -}; +}); diff --git a/test/function/samples/default-exports-in-parens-function-with-id/_config.js b/test/function/samples/default-exports-in-parens-function-with-id/_config.js index bc7b8f3b5ea..7cdbcc8b898 100644 --- a/test/function/samples/default-exports-in-parens-function-with-id/_config.js +++ b/test/function/samples/default-exports-in-parens-function-with-id/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles default function with id exports wrapped in parens' -}; +}); diff --git a/test/function/samples/default-exports-in-parens-function-without-id/_config.js b/test/function/samples/default-exports-in-parens-function-without-id/_config.js index 1d26a7d399f..c6cd07e13f2 100644 --- a/test/function/samples/default-exports-in-parens-function-without-id/_config.js +++ b/test/function/samples/default-exports-in-parens-function-without-id/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles default function without id exports wrapped in parens' -}; +}); diff --git a/test/function/samples/default-function-export-conflict/_config.js b/test/function/samples/default-function-export-conflict/_config.js index d062e00bd7e..f87d57828f6 100644 --- a/test/function/samples/default-function-export-conflict/_config.js +++ b/test/function/samples/default-function-export-conflict/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'default export of anonymous function' -}; +}); diff --git a/test/function/samples/default-not-reexported/_config.js b/test/function/samples/default-not-reexported/_config.js index 529e747b09e..1de6b5c08e4 100644 --- a/test/function/samples/default-not-reexported/_config.js +++ b/test/function/samples/default-not-reexported/_config.js @@ -3,7 +3,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); const ID_BAR = path.join(__dirname, 'bar.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'default export is not re-exported with export *', error: { binding: 'default', @@ -26,4 +26,4 @@ module.exports = { `, url: `https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module` } -}; +}); diff --git a/test/function/samples/default-on-warn/_config.js b/test/function/samples/default-on-warn/_config.js index ee906462eac..461325e9b1c 100644 --- a/test/function/samples/default-on-warn/_config.js +++ b/test/function/samples/default-on-warn/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); let oldConsoleWarn; const warnings = []; -module.exports = { +module.exports = defineRollupTest({ description: 'provides a default handler for warnings to onwarn that handles strings and objects', options: { onwarn(warning, defaultHandler) { @@ -24,4 +24,4 @@ module.exports = { 'Entry module "main.js" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.' ]); } -}; +}); diff --git a/test/function/samples/delete/_config.js b/test/function/samples/delete/_config.js index 3495183e618..5130bf60af9 100644 --- a/test/function/samples/delete/_config.js +++ b/test/function/samples/delete/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: '`delete` operator at the top level is preserved' -}; +}); diff --git a/test/function/samples/deoptimize-assumes-getters/_config.js b/test/function/samples/deoptimize-assumes-getters/_config.js index c04d33fbc9b..edf98072965 100644 --- a/test/function/samples/deoptimize-assumes-getters/_config.js +++ b/test/function/samples/deoptimize-assumes-getters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'assume full deoptimization may inject side-effectful getters' -}; +}); diff --git a/test/function/samples/deoptimize-cached-prop/_config.js b/test/function/samples/deoptimize-cached-prop/_config.js index 5bffd221ee2..504bb555bcf 100644 --- a/test/function/samples/deoptimize-cached-prop/_config.js +++ b/test/function/samples/deoptimize-cached-prop/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes cached properties and return values if necessary (#3264)' -}; +}); diff --git a/test/function/samples/deoptimize-call-expression-reassignments/_config.js b/test/function/samples/deoptimize-call-expression-reassignments/_config.js index 94ee87be2e7..386e160e45d 100644 --- a/test/function/samples/deoptimize-call-expression-reassignments/_config.js +++ b/test/function/samples/deoptimize-call-expression-reassignments/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes call expressions of conditional expressions if their return value is reassigned' -}; +}); diff --git a/test/function/samples/deoptimize-call-expressions/_config.js b/test/function/samples/deoptimize-call-expressions/_config.js index 493fbc146d6..65e3849e769 100644 --- a/test/function/samples/deoptimize-call-expressions/_config.js +++ b/test/function/samples/deoptimize-call-expressions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes call expressions conditional expressions if their return value is reassigned' -}; +}); diff --git a/test/function/samples/deoptimize-class/_config.js b/test/function/samples/deoptimize-class/_config.js index 14bcdb722ee..621bf9abb5a 100644 --- a/test/function/samples/deoptimize-class/_config.js +++ b/test/function/samples/deoptimize-class/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deoptimization of static class properties' -}; +}); diff --git a/test/function/samples/deoptimize-computed-class-keys/_config.js b/test/function/samples/deoptimize-computed-class-keys/_config.js index dfe1e1e59b7..0495d12cce8 100644 --- a/test/function/samples/deoptimize-computed-class-keys/_config.js +++ b/test/function/samples/deoptimize-computed-class-keys/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes computed class property keys' -}; +}); diff --git a/test/function/samples/deoptimize-computed-keys/_config.js b/test/function/samples/deoptimize-computed-keys/_config.js index 2ac75a24810..36832777886 100644 --- a/test/function/samples/deoptimize-computed-keys/_config.js +++ b/test/function/samples/deoptimize-computed-keys/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes computed object property keys' -}; +}); diff --git a/test/function/samples/deoptimize-conditional-expression-reassignments/_config.js b/test/function/samples/deoptimize-conditional-expression-reassignments/_config.js index 61dd10aee3b..90b64a6b873 100644 --- a/test/function/samples/deoptimize-conditional-expression-reassignments/_config.js +++ b/test/function/samples/deoptimize-conditional-expression-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks reassignments of deoptimized conditional expressions' -}; +}); diff --git a/test/function/samples/deoptimize-conditional-expressions/_config.js b/test/function/samples/deoptimize-conditional-expressions/_config.js index d7cd37d7ce8..b2ffcc72b5b 100644 --- a/test/function/samples/deoptimize-conditional-expressions/_config.js +++ b/test/function/samples/deoptimize-conditional-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps conditional expressions if their test value is reassigned' -}; +}); diff --git a/test/function/samples/deoptimize-logical-expression-reassignments/_config.js b/test/function/samples/deoptimize-logical-expression-reassignments/_config.js index 8626c0b4ffa..92f79b9e426 100644 --- a/test/function/samples/deoptimize-logical-expression-reassignments/_config.js +++ b/test/function/samples/deoptimize-logical-expression-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks reassignments of deoptimized logical expressions' -}; +}); diff --git a/test/function/samples/deoptimize-logical-expressions/_config.js b/test/function/samples/deoptimize-logical-expressions/_config.js index fbdb65233c4..49d4f47dac7 100644 --- a/test/function/samples/deoptimize-logical-expressions/_config.js +++ b/test/function/samples/deoptimize-logical-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps logical expressions if the first part is reassigned' -}; +}); diff --git a/test/function/samples/deoptimize-loop-element/_config.js b/test/function/samples/deoptimize-loop-element/_config.js index 0e0cd6ac573..7838770b855 100644 --- a/test/function/samples/deoptimize-loop-element/_config.js +++ b/test/function/samples/deoptimize-loop-element/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes the loop element when it is reassigned' -}; +}); diff --git a/test/function/samples/deoptimize-member-expressions/_config.js b/test/function/samples/deoptimize-member-expressions/_config.js index ccd60b17f58..7f32ab45978 100644 --- a/test/function/samples/deoptimize-member-expressions/_config.js +++ b/test/function/samples/deoptimize-member-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps accesses to computed properties if their key is reassigned' -}; +}); diff --git a/test/function/samples/deoptimize-missing-namespace-members/_config.js b/test/function/samples/deoptimize-missing-namespace-members/_config.js index 908625e3bd2..711b3b91b41 100644 --- a/test/function/samples/deoptimize-missing-namespace-members/_config.js +++ b/test/function/samples/deoptimize-missing-namespace-members/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles deoptimization of non-existing namespace members', exports(exports) { assert.strictEqual(exports.bar, undefined); } -}; +}); diff --git a/test/function/samples/deoptimize-object-expressions-2/_config.js b/test/function/samples/deoptimize-object-expressions-2/_config.js index e813da503b0..f6e15271dc8 100644 --- a/test/function/samples/deoptimize-object-expressions-2/_config.js +++ b/test/function/samples/deoptimize-object-expressions-2/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track deoptimizations of computed properties of empty objects' -}; +}); diff --git a/test/function/samples/deoptimize-object-expressions/_config.js b/test/function/samples/deoptimize-object-expressions/_config.js index c848c2ffc44..dd7308bfdda 100644 --- a/test/function/samples/deoptimize-object-expressions/_config.js +++ b/test/function/samples/deoptimize-object-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track deoptimizations of computed properties' -}; +}); diff --git a/test/function/samples/deoptimize-object/_config.js b/test/function/samples/deoptimize-object/_config.js index 2906b6780d7..a47e7213b73 100644 --- a/test/function/samples/deoptimize-object/_config.js +++ b/test/function/samples/deoptimize-object/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deoptimization of object properties' -}; +}); diff --git a/test/function/samples/deoptimize-request-treeshaking-pass/_config.js b/test/function/samples/deoptimize-request-treeshaking-pass/_config.js index e397def2c06..930c9990e59 100644 --- a/test/function/samples/deoptimize-request-treeshaking-pass/_config.js +++ b/test/function/samples/deoptimize-request-treeshaking-pass/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); const result = { value: 0 }; -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure to request additional passes when a variable is deoptimized', context: { result }, exports() { assert.strictEqual(result.value, 2); } -}; +}); diff --git a/test/function/samples/deoptimize-this-parameters/_config.js b/test/function/samples/deoptimize-this-parameters/_config.js index 518f65d290a..4c6772b5b99 100644 --- a/test/function/samples/deoptimize-this-parameters/_config.js +++ b/test/function/samples/deoptimize-this-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles deoptimization of this parameters' -}; +}); diff --git a/test/function/samples/deprecated/compact/_config.js b/test/function/samples/deprecated/compact/_config.js index be9be0616c9..dffd7d85082 100644 --- a/test/function/samples/deprecated/compact/_config.js +++ b/test/function/samples/deprecated/compact/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'compact output with compact: true', options: { strictDeprecations: false, @@ -29,4 +29,4 @@ module.exports = { return 42; } } -}; +}); diff --git a/test/function/samples/deprecated/dynamic-import-duplicates/_config.js b/test/function/samples/deprecated/dynamic-import-duplicates/_config.js index 10a22cf5ac9..03325426d02 100644 --- a/test/function/samples/deprecated/dynamic-import-duplicates/_config.js +++ b/test/function/samples/deprecated/dynamic-import-duplicates/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Dynamic import inlining', options: { strictDeprecations: false, @@ -20,4 +20,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } ] -}; +}); diff --git a/test/function/samples/deprecated/dynamic-import-inlining/_config.js b/test/function/samples/deprecated/dynamic-import-inlining/_config.js index 10a22cf5ac9..03325426d02 100644 --- a/test/function/samples/deprecated/dynamic-import-inlining/_config.js +++ b/test/function/samples/deprecated/dynamic-import-inlining/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Dynamic import inlining', options: { strictDeprecations: false, @@ -20,4 +20,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } ] -}; +}); diff --git a/test/function/samples/deprecated/dynamic-import-name-warn/_config.js b/test/function/samples/deprecated/dynamic-import-name-warn/_config.js index b4d19815736..37db7853e6e 100644 --- a/test/function/samples/deprecated/dynamic-import-name-warn/_config.js +++ b/test/function/samples/deprecated/dynamic-import-name-warn/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns when specifying a custom importer function for formats other than "es"', context: { require(path) { @@ -41,4 +41,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-dynamicimportfunction' } ] -}; +}); diff --git a/test/function/samples/deprecated/dynamic-import-name/_config.js b/test/function/samples/deprecated/dynamic-import-name/_config.js index 8f6372d0cc5..18eaec4439d 100644 --- a/test/function/samples/deprecated/dynamic-import-name/_config.js +++ b/test/function/samples/deprecated/dynamic-import-name/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let imported = false; -module.exports = { +module.exports = defineRollupTest({ description: 'allows specifying a custom importer function', context: { myImporter(path) { @@ -33,4 +33,4 @@ module.exports = { url: 'https://rollupjs.org/plugin-development/#renderdynamicimport' } ] -}; +}); diff --git a/test/function/samples/deprecated/inline-dynamic-imports-bundle/_config.js b/test/function/samples/deprecated/inline-dynamic-imports-bundle/_config.js index 0730ccf96d5..b6207dd5329 100644 --- a/test/function/samples/deprecated/inline-dynamic-imports-bundle/_config.js +++ b/test/function/samples/deprecated/inline-dynamic-imports-bundle/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'ignores non-bundled modules when inlining dynamic imports', options: { strictDeprecations: false, @@ -23,4 +23,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } ] -}; +}); diff --git a/test/function/samples/deprecated/inline-imports-with-manual/_config.js b/test/function/samples/deprecated/inline-imports-with-manual/_config.js index 4dc1d33f0d7..7f2eb492ddb 100644 --- a/test/function/samples/deprecated/inline-imports-with-manual/_config.js +++ b/test/function/samples/deprecated/inline-imports-with-manual/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Manual chunks are not supported when inlining dynamic imports', options: { strictDeprecations: false, @@ -15,4 +15,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-manualchunks' }, warnings: [] -}; +}); diff --git a/test/function/samples/deprecated/inline-imports-with-multiple-array/_config.js b/test/function/samples/deprecated/inline-imports-with-multiple-array/_config.js index e2d77fbaa13..c5349d23cbe 100644 --- a/test/function/samples/deprecated/inline-imports-with-multiple-array/_config.js +++ b/test/function/samples/deprecated/inline-imports-with-multiple-array/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Having multiple inputs in an array is not supported when inlining dynamic imports', options: { strictDeprecations: false, @@ -12,4 +12,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' }, warnings: [] -}; +}); diff --git a/test/function/samples/deprecated/inline-imports-with-multiple-object/_config.js b/test/function/samples/deprecated/inline-imports-with-multiple-object/_config.js index 43dc300bda4..6252b9dd950 100644 --- a/test/function/samples/deprecated/inline-imports-with-multiple-object/_config.js +++ b/test/function/samples/deprecated/inline-imports-with-multiple-object/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Having multiple inputs in an object is not supported when inlining dynamic imports', options: { strictDeprecations: false, @@ -18,4 +18,4 @@ module.exports = { 'The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.' } ] -}; +}); diff --git a/test/function/samples/deprecated/manual-chunks-conflict/_config.js b/test/function/samples/deprecated/manual-chunks-conflict/_config.js index 04e0839bcca..5279bca0ab4 100644 --- a/test/function/samples/deprecated/manual-chunks-conflict/_config.js +++ b/test/function/samples/deprecated/manual-chunks-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Throws for conflicts between manual chunks', options: { strictDeprecations: false, @@ -15,4 +15,4 @@ module.exports = { message: 'Cannot assign "dep.js" to the "dep2" chunk as it is already in the "dep1" chunk.' }, warnings: [] -}; +}); diff --git a/test/function/samples/deprecated/manual-chunks-info/_config.js b/test/function/samples/deprecated/manual-chunks-info/_config.js index 70b90be2704..705d20797b7 100644 --- a/test/function/samples/deprecated/manual-chunks-info/_config.js +++ b/test/function/samples/deprecated/manual-chunks-info/_config.js @@ -6,7 +6,7 @@ function getId(name) { return path.join(__dirname, `${name}.js`); } -module.exports = { +module.exports = defineRollupTest({ description: 'provides additional chunk information to a manualChunks function', options: { strictDeprecations: false, @@ -312,4 +312,4 @@ module.exports = { } }, warnings: [] -}; +}); diff --git a/test/function/samples/deprecated/manual-chunks-preserve-modules/_config.js b/test/function/samples/deprecated/manual-chunks-preserve-modules/_config.js index 43e347db608..7ff7e7692f2 100644 --- a/test/function/samples/deprecated/manual-chunks-preserve-modules/_config.js +++ b/test/function/samples/deprecated/manual-chunks-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Assigning manual chunks fails when preserving modules', options: { strictDeprecations: false, @@ -15,4 +15,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-manualchunks' }, warnings: [] -}; +}); diff --git a/test/function/samples/deprecated/max-parallel-file-reads/infinity/_config.js b/test/function/samples/deprecated/max-parallel-file-reads/infinity/_config.js index 26e2cd395f8..021a3ff8432 100644 --- a/test/function/samples/deprecated/max-parallel-file-reads/infinity/_config.js +++ b/test/function/samples/deprecated/max-parallel-file-reads/infinity/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileReads set to infinity', options: { strictDeprecations: false, @@ -34,4 +34,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#maxparallelfileops' } ] -}; +}); diff --git a/test/function/samples/deprecated/max-parallel-file-reads/set/_config.js b/test/function/samples/deprecated/max-parallel-file-reads/set/_config.js index 0372a4abaa6..f2d77f28864 100644 --- a/test/function/samples/deprecated/max-parallel-file-reads/set/_config.js +++ b/test/function/samples/deprecated/max-parallel-file-reads/set/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileReads set to 3', options: { strictDeprecations: false, @@ -34,4 +34,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#maxparallelfileops' } ] -}; +}); diff --git a/test/function/samples/deprecated/max-parallel-file-reads/with-plugin/_config.js b/test/function/samples/deprecated/max-parallel-file-reads/with-plugin/_config.js index 91ee4d01d95..5b8f91f04ed 100644 --- a/test/function/samples/deprecated/max-parallel-file-reads/with-plugin/_config.js +++ b/test/function/samples/deprecated/max-parallel-file-reads/with-plugin/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileReads with plugin', options: { strictDeprecations: false, @@ -41,4 +41,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#maxparallelfileops' } ] -}; +}); diff --git a/test/function/samples/deprecated/name-conflict-symbol/_config.js b/test/function/samples/deprecated/name-conflict-symbol/_config.js index 1f48fa34975..7ed97b5031b 100644 --- a/test/function/samples/deprecated/name-conflict-symbol/_config.js +++ b/test/function/samples/deprecated/name-conflict-symbol/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'avoids name conflicts with local variables named Symbol', options: { strictDeprecations: false, @@ -20,4 +20,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js b/test/function/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js index 8ca96af6378..65129a91d2b 100644 --- a/test/function/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', options: { @@ -24,4 +24,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/namespace-tostring/dynamic-import/_config.js b/test/function/samples/deprecated/namespace-tostring/dynamic-import/_config.js index 56dd2a94ec4..b154a0ba163 100644 --- a/test/function/samples/deprecated/namespace-tostring/dynamic-import/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/dynamic-import/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to dynamic imports', options: { strictDeprecations: false, @@ -27,4 +27,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/namespace-tostring/entry-default/_config.js b/test/function/samples/deprecated/namespace-tostring/entry-default/_config.js index 7794d818589..49defe5b590 100644 --- a/test/function/samples/deprecated/namespace-tostring/entry-default/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/entry-default/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not add Symbol.toStringTag property to entry chunks with default export mode', options: { strictDeprecations: false, @@ -22,4 +22,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/namespace-tostring/entry-named/_config.js b/test/function/samples/deprecated/namespace-tostring/entry-named/_config.js index 4f74505c228..e9766c0fee1 100644 --- a/test/function/samples/deprecated/namespace-tostring/entry-named/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/entry-named/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to entry chunks with named exports', options: { strictDeprecations: false, @@ -27,4 +27,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/namespace-tostring/external-namespaces/_config.js b/test/function/samples/deprecated/namespace-tostring/external-namespaces/_config.js index 88b0c5f34a3..55b067b1c1a 100644 --- a/test/function/samples/deprecated/namespace-tostring/external-namespaces/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/external-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to external namespaces', options: { strictDeprecations: false, @@ -38,4 +38,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/namespace-tostring/inlined-namespace/_config.js b/test/function/samples/deprecated/namespace-tostring/inlined-namespace/_config.js index acf230e3c03..88aba7315d9 100644 --- a/test/function/samples/deprecated/namespace-tostring/inlined-namespace/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/inlined-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to inlined namespaces', options: { strictDeprecations: false, @@ -14,4 +14,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/namespace-tostring/interop-property-descriptor/_config.js b/test/function/samples/deprecated/namespace-tostring/interop-property-descriptor/_config.js index 9fb94d75c4a..649e563dc72 100644 --- a/test/function/samples/deprecated/namespace-tostring/interop-property-descriptor/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/interop-property-descriptor/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'generated interop namespaces should have correct Symbol.toStringTag', context: { require() { @@ -25,4 +25,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/namespace-tostring/property-descriptor/_config.js b/test/function/samples/deprecated/namespace-tostring/property-descriptor/_config.js index 16992cef3d0..ea4fe0f27ff 100644 --- a/test/function/samples/deprecated/namespace-tostring/property-descriptor/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/property-descriptor/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'namespace export should have @@toStringTag with correct property descriptors #4336', options: { strictDeprecations: false, @@ -14,4 +14,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/nested-inlined-dynamic-import-1/_config.js b/test/function/samples/deprecated/nested-inlined-dynamic-import-1/_config.js index d35086d6969..c51b63f0de0 100644 --- a/test/function/samples/deprecated/nested-inlined-dynamic-import-1/_config.js +++ b/test/function/samples/deprecated/nested-inlined-dynamic-import-1/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts variables when nested dynamic imports are inlined via inlineDynamicImports', options: { @@ -18,4 +18,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } ] -}; +}); diff --git a/test/function/samples/deprecated/plugin-module-ids/_config.js b/test/function/samples/deprecated/plugin-module-ids/_config.js index baf54daad9f..fcebb5945c9 100644 --- a/test/function/samples/deprecated/plugin-module-ids/_config.js +++ b/test/function/samples/deprecated/plugin-module-ids/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); let rendered = false; -module.exports = { +module.exports = defineRollupTest({ description: 'provides all module ids on the plugin context', options: { strictDeprecations: false, @@ -31,4 +31,4 @@ module.exports = { url: 'https://rollupjs.org/plugin-development/#this-getmoduleids' } ] -}; +}); diff --git a/test/function/samples/deprecated/preserveModules/inline-dynamic-imports/_config.js b/test/function/samples/deprecated/preserveModules/inline-dynamic-imports/_config.js index e1426433492..8648e0b5b49 100644 --- a/test/function/samples/deprecated/preserveModules/inline-dynamic-imports/_config.js +++ b/test/function/samples/deprecated/preserveModules/inline-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Inlining dynamic imports is not supported when preserving modules', options: { strictDeprecations: false, @@ -12,4 +12,4 @@ module.exports = { 'Invalid value for option "output.inlineDynamicImports" - this option is not supported for "output.preserveModules".', url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } -}; +}); diff --git a/test/function/samples/deprecated/preserveModules/invalid-default-export-mode/_config.js b/test/function/samples/deprecated/preserveModules/invalid-default-export-mode/_config.js index c302bb8feb3..9d8b80ef9a3 100644 --- a/test/function/samples/deprecated/preserveModules/invalid-default-export-mode/_config.js +++ b/test/function/samples/deprecated/preserveModules/invalid-default-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using default export mode with named exports', options: { strictDeprecations: false, @@ -14,4 +14,4 @@ module.exports = { '"default" was specified for "output.exports", but entry module "lib.js" has the following exports: "value"', url: 'https://rollupjs.org/configuration-options/#output-exports' } -}; +}); diff --git a/test/function/samples/deprecated/preserveModules/invalid-no-preserve-entry-signatures/_config.js b/test/function/samples/deprecated/preserveModules/invalid-no-preserve-entry-signatures/_config.js index 1b463e5a81e..6dfff0fb0ca 100644 --- a/test/function/samples/deprecated/preserveModules/invalid-no-preserve-entry-signatures/_config.js +++ b/test/function/samples/deprecated/preserveModules/invalid-no-preserve-entry-signatures/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting preserveEntrySignatures to false', options: { strictDeprecations: false, @@ -12,4 +12,4 @@ module.exports = { 'Invalid value for option "preserveEntrySignatures" - setting this option to false is not supported for "output.preserveModules".', url: 'https://rollupjs.org/configuration-options/#preserveentrysignatures' } -}; +}); diff --git a/test/function/samples/deprecated/preserveModules/invalid-none-export-mode/_config.js b/test/function/samples/deprecated/preserveModules/invalid-none-export-mode/_config.js index 37b76ef043b..6684d3eaaf2 100644 --- a/test/function/samples/deprecated/preserveModules/invalid-none-export-mode/_config.js +++ b/test/function/samples/deprecated/preserveModules/invalid-none-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using none export mode with named exports', options: { strictDeprecations: false, @@ -14,4 +14,4 @@ module.exports = { '"none" was specified for "output.exports", but entry module "lib.js" has the following exports: "value"', url: 'https://rollupjs.org/configuration-options/#output-exports' } -}; +}); diff --git a/test/function/samples/deprecated/preserveModules/manual-chunks/_config.js b/test/function/samples/deprecated/preserveModules/manual-chunks/_config.js index 0d314e54fa9..baf1c5bfec0 100644 --- a/test/function/samples/deprecated/preserveModules/manual-chunks/_config.js +++ b/test/function/samples/deprecated/preserveModules/manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Assigning manual chunks fails when preserving modules', options: { strictDeprecations: false, @@ -16,4 +16,4 @@ module.exports = { 'Invalid value for option "output.manualChunks" - this option is not supported for "output.preserveModules".', url: 'https://rollupjs.org/configuration-options/#output-manualchunks' } -}; +}); diff --git a/test/function/samples/deprecated/preserveModules/mixed-exports/_config.js b/test/function/samples/deprecated/preserveModules/mixed-exports/_config.js index fe6f283d018..985d1d369fc 100644 --- a/test/function/samples/deprecated/preserveModules/mixed-exports/_config.js +++ b/test/function/samples/deprecated/preserveModules/mixed-exports/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB1 = path.join(__dirname, 'lib1.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns for mixed exports in all chunks when preserving modules', options: { strictDeprecations: false, @@ -31,4 +31,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-exports' } ] -}; +}); diff --git a/test/function/samples/deprecated/preserveModules/virtual-modules-conflict/_config.js b/test/function/samples/deprecated/preserveModules/virtual-modules-conflict/_config.js index 0d118cec1bb..4eea05790e4 100644 --- a/test/function/samples/deprecated/preserveModules/virtual-modules-conflict/_config.js +++ b/test/function/samples/deprecated/preserveModules/virtual-modules-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { strictDeprecations: false, @@ -38,4 +38,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-preservemodules' } ] -}; +}); diff --git a/test/function/samples/deprecated/preserveModules/virtual-modules/_config.js b/test/function/samples/deprecated/preserveModules/virtual-modules/_config.js index 5b67e84442b..66024b188e6 100644 --- a/test/function/samples/deprecated/preserveModules/virtual-modules/_config.js +++ b/test/function/samples/deprecated/preserveModules/virtual-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { strictDeprecations: false, @@ -38,4 +38,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-preservemodules' } ] -}; +}); diff --git a/test/function/samples/deprecated/reexport-ns/_config.js b/test/function/samples/deprecated/reexport-ns/_config.js index 4400c062841..9e6be21844d 100644 --- a/test/function/samples/deprecated/reexport-ns/_config.js +++ b/test/function/samples/deprecated/reexport-ns/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'external namespace reexport', options: { strictDeprecations: false, @@ -22,4 +22,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } ] -}; +}); diff --git a/test/function/samples/deprecated/resolve-id-external/_config.js b/test/function/samples/deprecated/resolve-id-external/_config.js index d2b6316fd1a..cee037d2cee 100644 --- a/test/function/samples/deprecated/resolve-id-external/_config.js +++ b/test/function/samples/deprecated/resolve-id-external/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const sideEffects = []; const { getObject } = require('../../../../utils'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not include modules without used exports if moduleSideEffect is false', context: { require(id) { @@ -84,4 +84,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/deprecated/resolve-id/_config.js b/test/function/samples/deprecated/resolve-id/_config.js index c1599d972fc..9cd9119300e 100644 --- a/test/function/samples/deprecated/resolve-id/_config.js +++ b/test/function/samples/deprecated/resolve-id/_config.js @@ -4,7 +4,7 @@ const { getObject } = require('../../../../utils'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'does not include modules without used exports if moduleSideEffect is false', context: { sideEffects @@ -91,4 +91,4 @@ module.exports = { assert.strictEqual(warning.code, 'DEPRECATED_FEATURE'); } } -}; +}); diff --git a/test/function/samples/deprecations/dynamicImportFunction/_config.js b/test/function/samples/deprecations/dynamicImportFunction/_config.js index 0ce0b770125..319af48e1d9 100644 --- a/test/function/samples/deprecations/dynamicImportFunction/_config.js +++ b/test/function/samples/deprecations/dynamicImportFunction/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks the "output.dynamicImportFunction" option as deprecated', options: { output: { @@ -11,4 +11,4 @@ module.exports = { 'The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.', url: 'https://rollupjs.org/plugin-development/#renderdynamicimport' } -}; +}); diff --git a/test/function/samples/deprecations/experimentalDeepDynamicChunkOptimization/_config.js b/test/function/samples/deprecations/experimentalDeepDynamicChunkOptimization/_config.js index e0a3d5fdac7..2e86eab4899 100644 --- a/test/function/samples/deprecations/experimentalDeepDynamicChunkOptimization/_config.js +++ b/test/function/samples/deprecations/experimentalDeepDynamicChunkOptimization/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks the "output.experimentalDeepDynamicChunkOptimization" option as deprecated', options: { output: { @@ -11,4 +11,4 @@ module.exports = { 'The "output.experimentalDeepDynamicChunkOptimization" option is deprecated as Rollup always runs the full chunking algorithm now. The option should be removed.', url: 'https://rollupjs.org/configuration-options/#output-experimentaldeepdynamicchunkoptimization' } -}; +}); diff --git a/test/function/samples/deprecations/hasModuleSideEffects/_config.js b/test/function/samples/deprecations/hasModuleSideEffects/_config.js index 19fbbf73cd5..debb192b2db 100644 --- a/test/function/samples/deprecations/hasModuleSideEffects/_config.js +++ b/test/function/samples/deprecations/hasModuleSideEffects/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns that accessing "ModuleInfo.hasModuleSideEffects" is deprecated', options: { strictDeprecations: true, @@ -24,4 +24,4 @@ module.exports = { url: 'https://rollupjs.org/plugin-development/#this-getmoduleinfo', watchFiles: [path.join(__dirname, 'main.js')] } -}; +}); diff --git a/test/function/samples/deprecations/inlineDynamicImports/_config.js b/test/function/samples/deprecations/inlineDynamicImports/_config.js index 53fcbadd7d8..1eaa3f935f5 100644 --- a/test/function/samples/deprecations/inlineDynamicImports/_config.js +++ b/test/function/samples/deprecations/inlineDynamicImports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks the "inlineDynamicImports" input option as deprecated', options: { inlineDynamicImports: true @@ -9,4 +9,4 @@ module.exports = { 'The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.', url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } -}; +}); diff --git a/test/function/samples/deprecations/manualChunks/_config.js b/test/function/samples/deprecations/manualChunks/_config.js index 4c32f14fabb..a81bd7fb405 100644 --- a/test/function/samples/deprecations/manualChunks/_config.js +++ b/test/function/samples/deprecations/manualChunks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks the "manualChunks" input option as deprecated', options: { manualChunks() { @@ -11,4 +11,4 @@ module.exports = { 'The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.', url: 'https://rollupjs.org/configuration-options/#output-manualchunks' } -}; +}); diff --git a/test/function/samples/deprecations/maxParallelFileReads/_config.js b/test/function/samples/deprecations/maxParallelFileReads/_config.js index 1a1909c9a74..1f26f6325f8 100644 --- a/test/function/samples/deprecations/maxParallelFileReads/_config.js +++ b/test/function/samples/deprecations/maxParallelFileReads/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks the "maxParallelFileReads" option as deprecated', options: { maxParallelFileReads: 3 @@ -9,4 +9,4 @@ module.exports = { 'The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.', url: 'https://rollupjs.org/configuration-options/#maxparallelfileops' } -}; +}); diff --git a/test/function/samples/deprecations/namespaceToStringTag/_config.js b/test/function/samples/deprecations/namespaceToStringTag/_config.js index d9cc0fe9262..de9b36b8ca2 100644 --- a/test/function/samples/deprecations/namespaceToStringTag/_config.js +++ b/test/function/samples/deprecations/namespaceToStringTag/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks the "output.namespaceToStringTag" option as deprecated', options: { output: { @@ -11,4 +11,4 @@ module.exports = { 'The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.', url: 'https://rollupjs.org/configuration-options/#output-generatedcode-symbols' } -}; +}); diff --git a/test/function/samples/deprecations/plugin-module-ids/_config.js b/test/function/samples/deprecations/plugin-module-ids/_config.js index fbdadac1740..3fc09276e1e 100644 --- a/test/function/samples/deprecations/plugin-module-ids/_config.js +++ b/test/function/samples/deprecations/plugin-module-ids/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'provides all module ids on the plugin context', options: { external: ['path'], @@ -18,4 +18,4 @@ module.exports = { pluginCode: 'DEPRECATED_FEATURE', url: 'https://rollupjs.org/plugin-development/#this-getmoduleids' } -}; +}); diff --git a/test/function/samples/deprecations/prefer-const/_config.js b/test/function/samples/deprecations/prefer-const/_config.js index d8f58e4b9b8..99a40facec6 100644 --- a/test/function/samples/deprecations/prefer-const/_config.js +++ b/test/function/samples/deprecations/prefer-const/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks the "output.preferConst" option as deprecated', options: { output: { @@ -11,4 +11,4 @@ module.exports = { 'The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.', url: 'https://rollupjs.org/configuration-options/#output-generatedcode-constbindings' } -}; +}); diff --git a/test/function/samples/deprecations/preserveModules/_config.js b/test/function/samples/deprecations/preserveModules/_config.js index 62dfaa250d0..8e3af414c26 100644 --- a/test/function/samples/deprecations/preserveModules/_config.js +++ b/test/function/samples/deprecations/preserveModules/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks the "preserveModules" input option as deprecated', options: { preserveModules: true @@ -9,4 +9,4 @@ module.exports = { 'The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.', url: 'https://rollupjs.org/configuration-options/#output-preservemodules' } -}; +}); diff --git a/test/function/samples/deshadow-respect-existing/_config.js b/test/function/samples/deshadow-respect-existing/_config.js index f37914a5815..888876d53bc 100644 --- a/test/function/samples/deshadow-respect-existing/_config.js +++ b/test/function/samples/deshadow-respect-existing/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'respect existing variable names when deshadowing', exports(exports) { assert.equal(exports.getValue(), 'mainmainmainmaindep'); } -}; +}); diff --git a/test/function/samples/deshadow-top-level-declaration/_config.js b/test/function/samples/deshadow-top-level-declaration/_config.js index b8d32ac0d85..c5d1351271c 100644 --- a/test/function/samples/deshadow-top-level-declaration/_config.js +++ b/test/function/samples/deshadow-top-level-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deshadows top-level declarations' -}; +}); diff --git a/test/function/samples/deshadowed-destructured-parameter/_config.js b/test/function/samples/deshadowed-destructured-parameter/_config.js index 015ba4ce20c..fab513adbda 100644 --- a/test/function/samples/deshadowed-destructured-parameter/_config.js +++ b/test/function/samples/deshadowed-destructured-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly deshadows destructured function parameters (#1008)' -}; +}); diff --git a/test/function/samples/deshadowed-namespaced-external-import-ignored/_config.js b/test/function/samples/deshadowed-namespaced-external-import-ignored/_config.js index 1eb42243357..00873393d17 100644 --- a/test/function/samples/deshadowed-namespaced-external-import-ignored/_config.js +++ b/test/function/samples/deshadowed-namespaced-external-import-ignored/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: '#1547', options: { external: ['external'] @@ -9,4 +9,4 @@ module.exports = { throw new Error('huh?'); } } -}; +}); diff --git a/test/function/samples/deshadowed-namespaced-import-renamed/_config.js b/test/function/samples/deshadowed-namespaced-import-renamed/_config.js index 00c9cc61173..87bb025bc2b 100644 --- a/test/function/samples/deshadowed-namespaced-import-renamed/_config.js +++ b/test/function/samples/deshadowed-namespaced-import-renamed/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: '#1550' -}; +}); diff --git a/test/function/samples/deshadowed-namespaced-import/_config.js b/test/function/samples/deshadowed-namespaced-import/_config.js index 99a1fdc71df..debdbfc9f7c 100644 --- a/test/function/samples/deshadowed-namespaced-import/_config.js +++ b/test/function/samples/deshadowed-namespaced-import/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: '#1488' -}; +}); diff --git a/test/function/samples/deshadowed-shorthand-property/_config.js b/test/function/samples/deshadowed-shorthand-property/_config.js index 352f7f3e8b9..5daabfe8d67 100644 --- a/test/function/samples/deshadowed-shorthand-property/_config.js +++ b/test/function/samples/deshadowed-shorthand-property/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'shorthand properties referencing deshadowed variables are expanded' -}; +}); diff --git a/test/function/samples/deshadows-function-expression-id/_config.js b/test/function/samples/deshadows-function-expression-id/_config.js index 2f0ff5381b9..7071b01d905 100644 --- a/test/function/samples/deshadows-function-expression-id/_config.js +++ b/test/function/samples/deshadows-function-expression-id/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deshadows function expression ID (#1176)' -}; +}); diff --git a/test/function/samples/destructuring-loop/_config.js b/test/function/samples/destructuring-loop/_config.js index a7307a7e141..66b7b1c380a 100644 --- a/test/function/samples/destructuring-loop/_config.js +++ b/test/function/samples/destructuring-loop/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles loops with destructuring declarations' -}; +}); diff --git a/test/function/samples/disappearing-exported-value/_config.js b/test/function/samples/disappearing-exported-value/_config.js index 10be0e873e4..3f487781666 100644 --- a/test/function/samples/disappearing-exported-value/_config.js +++ b/test/function/samples/disappearing-exported-value/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exported values do not mysteriously disappear (#484)', exports(exports) { assert.equal(exports.exportedAnswer, 42); assert.equal(exports.foo(), 42); } -}; +}); diff --git a/test/function/samples/do-while-conditional-break/_config.js b/test/function/samples/do-while-conditional-break/_config.js index f239588d8a8..7e051df2381 100644 --- a/test/function/samples/do-while-conditional-break/_config.js +++ b/test/function/samples/do-while-conditional-break/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles conditional breaks in do-while loops with unconditional return' -}; +}); diff --git a/test/function/samples/does-not-deconflict-undefined/_config.js b/test/function/samples/does-not-deconflict-undefined/_config.js index 56a2f0daa8e..adc0f86a590 100644 --- a/test/function/samples/does-not-deconflict-undefined/_config.js +++ b/test/function/samples/does-not-deconflict-undefined/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not rename undefined' -}; +}); diff --git a/test/function/samples/does-not-fail-for-arguments-test/_config.js b/test/function/samples/does-not-fail-for-arguments-test/_config.js index b9ad98c8d17..8d9dfcdf2f6 100644 --- a/test/function/samples/does-not-fail-for-arguments-test/_config.js +++ b/test/function/samples/does-not-fail-for-arguments-test/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not fail when non-integer arguments properties are accessed' -}; +}); diff --git a/test/function/samples/does-not-hang-on-missing-module/_config.js b/test/function/samples/does-not-hang-on-missing-module/_config.js index 5c6f2ba2fd3..73e410d0c75 100644 --- a/test/function/samples/does-not-hang-on-missing-module/_config.js +++ b/test/function/samples/does-not-hang-on-missing-module/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not hang on missing module (#53)', warnings: [ { @@ -20,4 +20,4 @@ module.exports = { "Cannot find module 'unlessYouCreatedThisFileForSomeReason'" ); } -}; +}); diff --git a/test/function/samples/does-not-mangle-entry-point/_config.js b/test/function/samples/does-not-mangle-entry-point/_config.js index 7eebdc8bff3..76e984d0877 100644 --- a/test/function/samples/does-not-mangle-entry-point/_config.js +++ b/test/function/samples/does-not-mangle-entry-point/_config.js @@ -5,7 +5,7 @@ const modules = { 'x/y': 'export default 24;' }; -module.exports = { +module.exports = defineRollupTest({ description: 'does not mangle input', options: { input: 'x\\y', @@ -23,4 +23,4 @@ module.exports = { exports(exports) { assert.equal(exports, 42); } -}; +}); diff --git a/test/function/samples/double-default-export/_config.js b/test/function/samples/double-default-export/_config.js index f10fcb73029..4e05ddbb92a 100644 --- a/test/function/samples/double-default-export/_config.js +++ b/test/function/samples/double-default-export/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_FOO = path.join(__dirname, 'foo.js'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws on double default exports', error: { cause: { @@ -30,4 +30,4 @@ module.exports = { ^ ` } -}; +}); diff --git a/test/function/samples/double-named-export/_config.js b/test/function/samples/double-named-export/_config.js index 83f16414123..bf8617642d2 100644 --- a/test/function/samples/double-named-export/_config.js +++ b/test/function/samples/double-named-export/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws on duplicate named exports', error: { cause: { @@ -31,4 +31,4 @@ module.exports = { ^ ` } -}; +}); diff --git a/test/function/samples/double-named-reexport/_config.js b/test/function/samples/double-named-reexport/_config.js index 6e9a18d4fec..ee5f850206b 100644 --- a/test/function/samples/double-named-reexport/_config.js +++ b/test/function/samples/double-named-reexport/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws on duplicate named exports', error: { cause: { @@ -31,4 +31,4 @@ module.exports = { ^ ` } -}; +}); diff --git a/test/function/samples/double-namespace-reexport/_config.js b/test/function/samples/double-namespace-reexport/_config.js index 170c57c055c..3ab739bd134 100644 --- a/test/function/samples/double-namespace-reexport/_config.js +++ b/test/function/samples/double-namespace-reexport/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles chained namespace reexports from externals', options: { external: 'external' @@ -14,4 +14,4 @@ module.exports = { exports({ foo }) { assert.strictEqual(foo, 42); } -}; +}); diff --git a/test/function/samples/duplicate-import-fails/_config.js b/test/function/samples/duplicate-import-fails/_config.js index 30b69cd5df3..bab2f282731 100644 --- a/test/function/samples/duplicate-import-fails/_config.js +++ b/test/function/samples/duplicate-import-fails/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'disallows duplicate imports', error: { cause: { @@ -31,6 +31,6 @@ module.exports = { 4: assert.equal(a, 1); ` } -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/duplicate-import-fails diff --git a/test/function/samples/duplicate-import-specifier-fails/_config.js b/test/function/samples/duplicate-import-specifier-fails/_config.js index 7e8a5f5d435..0c9c7e1864e 100644 --- a/test/function/samples/duplicate-import-specifier-fails/_config.js +++ b/test/function/samples/duplicate-import-specifier-fails/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'disallows duplicate import specifiers', error: { cause: { @@ -29,6 +29,6 @@ module.exports = { 2: assert.equal(a, 1); ` } -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/duplicate-import-specifier-fails diff --git a/test/function/samples/duplicate-input-entry/_config.js b/test/function/samples/duplicate-input-entry/_config.js index eb83d0c39a2..92e2f6d106b 100644 --- a/test/function/samples/duplicate-input-entry/_config.js +++ b/test/function/samples/duplicate-input-entry/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles duplicate entry modules when using the object form', options: { input: ['entry', 'entry.js'] @@ -8,4 +8,4 @@ module.exports = { exports(exports) { assert.deepStrictEqual(exports, { entry: 'main' }); } -}; +}); diff --git a/test/function/samples/dynamic-import-default-mode-facade/_config.js b/test/function/samples/dynamic-import-default-mode-facade/_config.js index 9c71bb47957..2e429da9aa4 100644 --- a/test/function/samples/dynamic-import-default-mode-facade/_config.js +++ b/test/function/samples/dynamic-import-default-mode-facade/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles dynamic imports from facades using default export mode', options: { input: ['main', 'foo', 'bar'] @@ -10,4 +10,4 @@ module.exports = { assert.deepStrictEqual(exported, { __proto__: null, default: 4 }) ); } -}; +}); diff --git a/test/function/samples/dynamic-import-duplicates/_config.js b/test/function/samples/dynamic-import-duplicates/_config.js index b1801582872..7d3475a4749 100644 --- a/test/function/samples/dynamic-import-duplicates/_config.js +++ b/test/function/samples/dynamic-import-duplicates/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Dynamic import inlining', options: { output: { inlineDynamicImports: true } @@ -11,4 +11,4 @@ module.exports = { assert.equal(y, 42); }); } -}; +}); diff --git a/test/function/samples/dynamic-import-existing/_config.js b/test/function/samples/dynamic-import-existing/_config.js index faa8e4c1f05..41e60221919 100644 --- a/test/function/samples/dynamic-import-existing/_config.js +++ b/test/function/samples/dynamic-import-existing/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Dynamic import inlining when resolution id is a module in the bundle', exports(exports) { assert.equal(exports.y, 42); @@ -8,4 +8,4 @@ module.exports = { assert.equal(value, 84); }); } -}; +}); diff --git a/test/function/samples/dynamic-import-expression/_config.js b/test/function/samples/dynamic-import-expression/_config.js index 653706645d2..8bcef4ccc27 100644 --- a/test/function/samples/dynamic-import-expression/_config.js +++ b/test/function/samples/dynamic-import-expression/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Dynamic import expression replacement', options: { plugins: [ @@ -28,4 +28,4 @@ module.exports = { assert.strictEqual(error.message.slice(0, expectedError.length), expectedError) ); } -}; +}); diff --git a/test/function/samples/dynamic-import-inlining/_config.js b/test/function/samples/dynamic-import-inlining/_config.js index b1801582872..7d3475a4749 100644 --- a/test/function/samples/dynamic-import-inlining/_config.js +++ b/test/function/samples/dynamic-import-inlining/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Dynamic import inlining', options: { output: { inlineDynamicImports: true } @@ -11,4 +11,4 @@ module.exports = { assert.equal(y, 42); }); } -}; +}); diff --git a/test/function/samples/dynamic-import-not-found/_config.js b/test/function/samples/dynamic-import-not-found/_config.js index ed852db42fe..af01876c91f 100644 --- a/test/function/samples/dynamic-import-not-found/_config.js +++ b/test/function/samples/dynamic-import-not-found/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns if a dynamic import is not found', context: { require(id) { @@ -20,4 +20,4 @@ module.exports = { url: 'https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency' } ] -}; +}); diff --git a/test/function/samples/dynamic-import-only-default/_config.js b/test/function/samples/dynamic-import-only-default/_config.js index fe6765e5bf1..d096e1a6170 100644 --- a/test/function/samples/dynamic-import-only-default/_config.js +++ b/test/function/samples/dynamic-import-only-default/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly imports dynamic namespaces with only a default export from entry- and non-entry-point chunks', options: { @@ -11,4 +11,4 @@ module.exports = { assert.deepStrictEqual(result, [{ __proto__: null, default: 42 }, { default: 42 }]) ); } -}; +}); diff --git a/test/function/samples/dynamic-import-relative-not-found/_config.js b/test/function/samples/dynamic-import-relative-not-found/_config.js index a6958c78316..4440891210f 100644 --- a/test/function/samples/dynamic-import-relative-not-found/_config.js +++ b/test/function/samples/dynamic-import-relative-not-found/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws if a dynamic relative import is not found', error: { code: 'UNRESOLVED_IMPORT', @@ -10,4 +10,4 @@ module.exports = { message: 'Could not resolve "./mod" from "main.js"', watchFiles: [ID_MAIN] } -}; +}); diff --git a/test/function/samples/dynamic-import-rewriting/_config.js b/test/function/samples/dynamic-import-rewriting/_config.js index 2574fe4344d..1ba38bbc538 100644 --- a/test/function/samples/dynamic-import-rewriting/_config.js +++ b/test/function/samples/dynamic-import-rewriting/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Dynamic import string specifier resolving', options: { external: ['asdf'], @@ -18,4 +18,4 @@ module.exports = { assert.strictEqual(error.message.slice(0, expectedError.length), expectedError) ); } -}; +}); diff --git a/test/function/samples/dynamic-import-this-arrow/_config.js b/test/function/samples/dynamic-import-this-arrow/_config.js index 7ebceb43d71..728ce62656c 100644 --- a/test/function/samples/dynamic-import-this-arrow/_config.js +++ b/test/function/samples/dynamic-import-this-arrow/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct "this" in dynamic imports when using arrow functions', context: { require(id) { @@ -27,4 +27,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/function/samples/dynamic-import-this-function/_config.js b/test/function/samples/dynamic-import-this-function/_config.js index a58e2bbb87d..bcc0895be9e 100644 --- a/test/function/samples/dynamic-import-this-function/_config.js +++ b/test/function/samples/dynamic-import-this-function/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct "this" in dynamic imports when not using arrow functions', context: { require(id) { @@ -27,4 +27,4 @@ module.exports = { dynamicImportInCjs: false } } -}; +}); diff --git a/test/function/samples/dynamic-imports-shared-exports/_config.js b/test/function/samples/dynamic-imports-shared-exports/_config.js index 20609cd5fed..1bc6b69eaca 100644 --- a/test/function/samples/dynamic-imports-shared-exports/_config.js +++ b/test/function/samples/dynamic-imports-shared-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows sharing imports between dynamic chunks', options: { preserveEntrySignatures: 'allow-extension' @@ -6,4 +6,4 @@ module.exports = { exports(exports) { return exports.promise; } -}; +}); diff --git a/test/function/samples/dynamic-namespace-lookup/_config.js b/test/function/samples/dynamic-namespace-lookup/_config.js index 3c2fe549cc2..1a9e1fef123 100644 --- a/test/function/samples/dynamic-namespace-lookup/_config.js +++ b/test/function/samples/dynamic-namespace-lookup/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does namespace optimization when possible, but not for dynamic lookups' -}; +}); diff --git a/test/function/samples/emit-chunk-hash/_config.js b/test/function/samples/emit-chunk-hash/_config.js index 06b4563b867..98d1f642921 100644 --- a/test/function/samples/emit-chunk-hash/_config.js +++ b/test/function/samples/emit-chunk-hash/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'gives access to the hashed filed name via this.getFileName in generateBundle', options: { input: 'main', @@ -17,4 +17,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/emit-chunk-manual-asset-source/_config.js b/test/function/samples/emit-chunk-manual-asset-source/_config.js index 910f62f2cf1..272ac51eda7 100644 --- a/test/function/samples/emit-chunk-manual-asset-source/_config.js +++ b/test/function/samples/emit-chunk-manual-asset-source/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'supports setting asset sources as side effect of the manual chunks option', options: { output: { @@ -24,4 +24,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/emit-chunk-manual/_config.js b/test/function/samples/emit-chunk-manual/_config.js index ecf1ba393f1..a2029052ec6 100644 --- a/test/function/samples/emit-chunk-manual/_config.js +++ b/test/function/samples/emit-chunk-manual/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'supports emitting chunks as side effect of the manual chunks option', options: { output: { @@ -19,4 +19,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-invalid/_config.js b/test/function/samples/emit-file/asset-source-invalid/_config.js index 95351e3fbee..c6b08b7125c 100644 --- a/test/function/samples/emit-file/asset-source-invalid/_config.js +++ b/test/function/samples/emit-file/asset-source-invalid/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting an empty asset source', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-invalid2/_config.js b/test/function/samples/emit-file/asset-source-invalid2/_config.js index b41d8952062..be359d207ee 100644 --- a/test/function/samples/emit-file/asset-source-invalid2/_config.js +++ b/test/function/samples/emit-file/asset-source-invalid2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting an empty asset source', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-invalid3/_config.js b/test/function/samples/emit-file/asset-source-invalid3/_config.js index 411b195433c..3ba826385e7 100644 --- a/test/function/samples/emit-file/asset-source-invalid3/_config.js +++ b/test/function/samples/emit-file/asset-source-invalid3/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting an empty asset source', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-invalid4/_config.js b/test/function/samples/emit-file/asset-source-invalid4/_config.js index c23119557b1..a684af0b46f 100644 --- a/test/function/samples/emit-file/asset-source-invalid4/_config.js +++ b/test/function/samples/emit-file/asset-source-invalid4/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting an empty asset source', options: { plugins: { @@ -16,4 +16,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-missing/_config.js b/test/function/samples/emit-file/asset-source-missing/_config.js index bb97104870f..5b1a0c151ea 100644 --- a/test/function/samples/emit-file/asset-source-missing/_config.js +++ b/test/function/samples/emit-file/asset-source-missing/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when not setting the asset source', options: { plugins: { @@ -12,4 +12,4 @@ module.exports = { code: 'ASSET_SOURCE_MISSING', message: 'Plugin error creating asset "test.ext" - no asset source set.' } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-missing2/_config.js b/test/function/samples/emit-file/asset-source-missing2/_config.js index 20a1975c3b5..fe08ce5cd4e 100644 --- a/test/function/samples/emit-file/asset-source-missing2/_config.js +++ b/test/function/samples/emit-file/asset-source-missing2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when not setting the asset source', options: { plugins: { @@ -12,4 +12,4 @@ module.exports = { code: 'ASSET_SOURCE_MISSING', message: 'Plugin error creating asset "6b86b273" - no asset source set.' } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-missing3/_config.js b/test/function/samples/emit-file/asset-source-missing3/_config.js index 202b2e01c59..317f03f5e3b 100644 --- a/test/function/samples/emit-file/asset-source-missing3/_config.js +++ b/test/function/samples/emit-file/asset-source-missing3/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when accessing the file name before the asset source is set', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'ASSET_NOT_FINALISED' } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-missing4/_config.js b/test/function/samples/emit-file/asset-source-missing4/_config.js index b55fb138b78..025c0ec564c 100644 --- a/test/function/samples/emit-file/asset-source-missing4/_config.js +++ b/test/function/samples/emit-file/asset-source-missing4/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when accessing the file name before the asset source is set', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'ASSET_NOT_FINALISED' } -}; +}); diff --git a/test/function/samples/emit-file/asset-source-missing5/_config.js b/test/function/samples/emit-file/asset-source-missing5/_config.js index 54b254be27f..44f6cccb1ce 100644 --- a/test/function/samples/emit-file/asset-source-missing5/_config.js +++ b/test/function/samples/emit-file/asset-source-missing5/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when not setting the asset source and accessing the asset URL', options: { plugins: { @@ -16,4 +16,4 @@ module.exports = { message: 'Plugin error - Unable to get file name for asset "test.ext". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.' } -}; +}); diff --git a/test/function/samples/emit-file/chunk-filename-not-available-buildEnd/_config.js b/test/function/samples/emit-file/chunk-filename-not-available-buildEnd/_config.js index dd470ea74cd..ab6cf87b2d9 100644 --- a/test/function/samples/emit-file/chunk-filename-not-available-buildEnd/_config.js +++ b/test/function/samples/emit-file/chunk-filename-not-available-buildEnd/_config.js @@ -1,6 +1,6 @@ let chunkId; -module.exports = { +module.exports = defineRollupTest({ description: 'Throws when accessing the filename before it has been generated in buildEnd', options: { input: 'main.js', @@ -22,4 +22,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'CHUNK_NOT_GENERATED' } -}; +}); diff --git a/test/function/samples/emit-file/chunk-filename-not-available-renderStart/_config.js b/test/function/samples/emit-file/chunk-filename-not-available-renderStart/_config.js index 86e620e2fd5..db6c3bcf332 100644 --- a/test/function/samples/emit-file/chunk-filename-not-available-renderStart/_config.js +++ b/test/function/samples/emit-file/chunk-filename-not-available-renderStart/_config.js @@ -1,6 +1,6 @@ let chunkId; -module.exports = { +module.exports = defineRollupTest({ description: 'Throws when accessing the filename before it has been generated in renderStart', options: { input: 'main.js', @@ -22,4 +22,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'CHUNK_NOT_GENERATED' } -}; +}); diff --git a/test/function/samples/emit-file/chunk-filename-not-available/_config.js b/test/function/samples/emit-file/chunk-filename-not-available/_config.js index b56bd15667c..1f6401caf7f 100644 --- a/test/function/samples/emit-file/chunk-filename-not-available/_config.js +++ b/test/function/samples/emit-file/chunk-filename-not-available/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Throws when accessing the filename before it has been generated', options: { input: 'main.js', @@ -18,4 +18,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'CHUNK_NOT_GENERATED' } -}; +}); diff --git a/test/function/samples/emit-file/chunk-not-found/_config.js b/test/function/samples/emit-file/chunk-not-found/_config.js index 4feb0b9182f..7497de1278d 100644 --- a/test/function/samples/emit-file/chunk-not-found/_config.js +++ b/test/function/samples/emit-file/chunk-not-found/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'Throws if an emitted entry chunk cannot be resolved', options: { input: 'main.js', @@ -16,4 +16,4 @@ module.exports = { watchFiles: [ID_MAIN], message: 'Could not resolve entry module "not-found.js".' } -}; +}); diff --git a/test/function/samples/emit-file/emit-from-output-options/_config.js b/test/function/samples/emit-file/emit-from-output-options/_config.js index bf3ce6381d7..abc2401eafe 100644 --- a/test/function/samples/emit-file/emit-from-output-options/_config.js +++ b/test/function/samples/emit-file/emit-from-output-options/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when trying to emit files from the outputOptions hook', options: { input: 'main', @@ -19,4 +19,4 @@ module.exports = { plugin: 'at position 1', pluginCode: 'CANNOT_EMIT_FROM_OPTIONS_HOOK' } -}; +}); diff --git a/test/function/samples/emit-file/emit-same-file/_config.js b/test/function/samples/emit-file/emit-same-file/_config.js index a0266d5791b..b19e16f551a 100644 --- a/test/function/samples/emit-file/emit-same-file/_config.js +++ b/test/function/samples/emit-file/emit-same-file/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns if multiple files with the same name are emitted', options: { input: 'main.js', @@ -27,4 +27,4 @@ module.exports = { 'The emitted file "generateBundle" overwrites a previously emitted file of the same name.' } ] -}; +}); diff --git a/test/function/samples/emit-file/file-references-in-bundle/_config.js b/test/function/samples/emit-file/file-references-in-bundle/_config.js index e1ed74c6f88..4f247cfd646 100644 --- a/test/function/samples/emit-file/file-references-in-bundle/_config.js +++ b/test/function/samples/emit-file/file-references-in-bundle/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { pathToFileURL } = require('node:url'); -module.exports = { +module.exports = defineRollupTest({ description: 'lists referenced files in the bundle', options: { input: 'main', @@ -43,4 +43,4 @@ module.exports = { urlEncoding: `${directoryURL}/chunks/My%252FFile.js` }); } -}; +}); diff --git a/test/function/samples/emit-file/invalid-asset-name/_config.js b/test/function/samples/emit-file/invalid-asset-name/_config.js index 1d58fe9c100..f628317845a 100644 --- a/test/function/samples/emit-file/invalid-asset-name/_config.js +++ b/test/function/samples/emit-file/invalid-asset-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid asset names', options: { plugins: { @@ -16,4 +16,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/invalid-asset-name3/_config.js b/test/function/samples/emit-file/invalid-asset-name3/_config.js index 5d720fda2e8..85603f472e4 100644 --- a/test/function/samples/emit-file/invalid-asset-name3/_config.js +++ b/test/function/samples/emit-file/invalid-asset-name3/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid asset names with absolute path on Windows OS', options: { plugins: { @@ -16,4 +16,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/invalid-chunk-id/_config.js b/test/function/samples/emit-file/invalid-chunk-id/_config.js index ed73d4d4776..912a9ea90a3 100644 --- a/test/function/samples/emit-file/invalid-chunk-id/_config.js +++ b/test/function/samples/emit-file/invalid-chunk-id/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid chunk ids', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/invalid-file-type/_config.js b/test/function/samples/emit-file/invalid-file-type/_config.js index 1c665fc2772..673dc33d686 100644 --- a/test/function/samples/emit-file/invalid-file-type/_config.js +++ b/test/function/samples/emit-file/invalid-file-type/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid file types', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/invalid-reference-id/_config.js b/test/function/samples/emit-file/invalid-reference-id/_config.js index 43e4e38420f..b36163123bd 100644 --- a/test/function/samples/emit-file/invalid-reference-id/_config.js +++ b/test/function/samples/emit-file/invalid-reference-id/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid reference ids', options: { plugins: { @@ -12,4 +12,4 @@ module.exports = { code: 'FILE_NOT_FOUND', message: 'Plugin error - Unable to get file name for unknown file "invalid".' } -}; +}); diff --git a/test/function/samples/emit-file/invalid-set-asset-source-id/_config.js b/test/function/samples/emit-file/invalid-set-asset-source-id/_config.js index 67ed85414a5..018601ecf1a 100644 --- a/test/function/samples/emit-file/invalid-set-asset-source-id/_config.js +++ b/test/function/samples/emit-file/invalid-set-asset-source-id/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid asset ids', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'ASSET_NOT_FOUND' } -}; +}); diff --git a/test/function/samples/emit-file/modules-loaded/_config.js b/test/function/samples/emit-file/modules-loaded/_config.js index 3cd01bfcd83..5f86f55f840 100644 --- a/test/function/samples/emit-file/modules-loaded/_config.js +++ b/test/function/samples/emit-file/modules-loaded/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Throws when adding a chunk after the modules have finished loading', options: { input: 'main.js', @@ -16,4 +16,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'INVALID_ROLLUP_PHASE' } -}; +}); diff --git a/test/function/samples/emit-file/no-input/_config.js b/test/function/samples/emit-file/no-input/_config.js index c35eb800405..de4dd2c7ec5 100644 --- a/test/function/samples/emit-file/no-input/_config.js +++ b/test/function/samples/emit-file/no-input/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'It is not necessary to provide an input if a dynamic entry is emitted', options: { input: undefined, @@ -9,4 +9,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/emit-file/set-asset-source-chunk/_config.js b/test/function/samples/emit-file/set-asset-source-chunk/_config.js index 27b97f89fb1..9c689eaba73 100644 --- a/test/function/samples/emit-file/set-asset-source-chunk/_config.js +++ b/test/function/samples/emit-file/set-asset-source-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when trying to set the asset source of a chunk', options: { plugins: { @@ -16,4 +16,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'VALIDATION_ERROR' } -}; +}); diff --git a/test/function/samples/emit-file/set-asset-source-transform/_config.js b/test/function/samples/emit-file/set-asset-source-transform/_config.js index 452630d7ce7..11296a4b348 100644 --- a/test/function/samples/emit-file/set-asset-source-transform/_config.js +++ b/test/function/samples/emit-file/set-asset-source-transform/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting the asset source in the transform hook', options: { plugins: { @@ -22,4 +22,4 @@ module.exports = { pluginCode: 'INVALID_SETASSETSOURCE', watchFiles: [path.join(__dirname, 'main.js')] } -}; +}); diff --git a/test/function/samples/emit-file/set-asset-source-twice/_config.js b/test/function/samples/emit-file/set-asset-source-twice/_config.js index 52e798fec21..e29d8e100ca 100644 --- a/test/function/samples/emit-file/set-asset-source-twice/_config.js +++ b/test/function/samples/emit-file/set-asset-source-twice/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting the asset source twice', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'ASSET_SOURCE_ALREADY_SET' } -}; +}); diff --git a/test/function/samples/emit-file/set-asset-source-twice2/_config.js b/test/function/samples/emit-file/set-asset-source-twice2/_config.js index 92e38307cc0..cd7dc359788 100644 --- a/test/function/samples/emit-file/set-asset-source-twice2/_config.js +++ b/test/function/samples/emit-file/set-asset-source-twice2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting the asset source twice', options: { plugins: { @@ -17,4 +17,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'ASSET_SOURCE_ALREADY_SET' } -}; +}); diff --git a/test/function/samples/emit-file/set-source-in-output-options/_config.js b/test/function/samples/emit-file/set-source-in-output-options/_config.js index 6cba91aa9a2..c143ce4c251 100644 --- a/test/function/samples/emit-file/set-source-in-output-options/_config.js +++ b/test/function/samples/emit-file/set-source-in-output-options/_config.js @@ -1,6 +1,6 @@ let referenceId; -module.exports = { +module.exports = defineRollupTest({ description: 'throws when trying to set file sources in the outputOptions hook', options: { input: 'main', @@ -21,4 +21,4 @@ module.exports = { plugin: 'at position 1', pluginCode: 'CANNOT_EMIT_FROM_OPTIONS_HOOK' } -}; +}); diff --git a/test/function/samples/empty-imports-have-side-effects/_config.js b/test/function/samples/empty-imports-have-side-effects/_config.js index 683ca7598eb..5a36229f1c2 100644 --- a/test/function/samples/empty-imports-have-side-effects/_config.js +++ b/test/function/samples/empty-imports-have-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'empty imports are assumed to contain side-effects' -}; +}); diff --git a/test/function/samples/empty-string-as-module-name/_config.js b/test/function/samples/empty-string-as-module-name/_config.js index dfbc2595b37..0fff62cd43c 100644 --- a/test/function/samples/empty-string-as-module-name/_config.js +++ b/test/function/samples/empty-string-as-module-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows using empty string as a valid module name', options: { external: () => false, @@ -12,4 +12,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/enforce-plugin-order/_config.js b/test/function/samples/enforce-plugin-order/_config.js index 0a5d3e78d68..3ac5e181ecc 100644 --- a/test/function/samples/enforce-plugin-order/_config.js +++ b/test/function/samples/enforce-plugin-order/_config.js @@ -73,7 +73,7 @@ function addPlugin(order) { plugins.push(plugin); } -module.exports = { +module.exports = defineRollupTest({ description: 'allows to enforce plugin hook order', options: { plugins, @@ -105,4 +105,4 @@ module.exports = { ); } } -}; +}); diff --git a/test/function/samples/enforce-sequential-plugin-order/_config.js b/test/function/samples/enforce-sequential-plugin-order/_config.js index c297ef82bdd..f77d7650469 100644 --- a/test/function/samples/enforce-sequential-plugin-order/_config.js +++ b/test/function/samples/enforce-sequential-plugin-order/_config.js @@ -59,7 +59,7 @@ function addPlugin(order, sequential) { plugins.push(plugin); } -module.exports = { +module.exports = defineRollupTest({ description: 'allows to enforce sequential plugin hook order for parallel plugin hooks', options: { plugins @@ -86,4 +86,4 @@ module.exports = { ); } } -}; +}); diff --git a/test/function/samples/error-after-transform-should-throw-correct-location/_config.js b/test/function/samples/error-after-transform-should-throw-correct-location/_config.js index 50be8fca2af..265918bf850 100644 --- a/test/function/samples/error-after-transform-should-throw-correct-location/_config.js +++ b/test/function/samples/error-after-transform-should-throw-correct-location/_config.js @@ -3,7 +3,7 @@ const MagicString = require('magic-string'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_EMPTY = path.join(__dirname, 'empty.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'error after transform should throw with correct location of file', options: { plugins: [ @@ -41,4 +41,4 @@ module.exports = { watchFiles: [ID_EMPTY, ID_MAIN], message: '"default" is not exported by "empty.js", imported by "main.js".' } -}; +}); diff --git a/test/function/samples/error-missing-umd-name/_config.js b/test/function/samples/error-missing-umd-name/_config.js index 356e40cd02b..847b6099d80 100644 --- a/test/function/samples/error-missing-umd-name/_config.js +++ b/test/function/samples/error-missing-umd-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws an error if no name is provided for a UMD bundle', options: { output: { format: 'umd' } }, generateError: { @@ -7,4 +7,4 @@ module.exports = { 'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.', url: 'https://rollupjs.org/configuration-options/#output-name' } -}; +}); diff --git a/test/function/samples/error-parse-json/_config.js b/test/function/samples/error-parse-json/_config.js index cfe3e33e3d5..158b3fb0420 100644 --- a/test/function/samples/error-parse-json/_config.js +++ b/test/function/samples/error-parse-json/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_JSON = path.join(__dirname, 'file.json'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws with an extended error message when failing to parse a file with ".json" extension', error: { @@ -32,4 +32,4 @@ module.exports = { watchFiles: [ID_JSON, ID_MAIN], message: 'Unexpected token (Note that you need @rollup/plugin-json to import JSON files)' } -}; +}); diff --git a/test/function/samples/error-parse-unknown-extension/_config.js b/test/function/samples/error-parse-unknown-extension/_config.js index 2af6075edda..a25a275e4d2 100644 --- a/test/function/samples/error-parse-unknown-extension/_config.js +++ b/test/function/samples/error-parse-unknown-extension/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_CSS = path.join(__dirname, 'file.css'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws with an extended error message when failing to parse a file without .(m)js extension', error: { @@ -32,4 +32,4 @@ module.exports = { watchFiles: [ID_CSS, ID_MAIN], message: 'Unexpected token (Note that you need plugins to import files that are not JavaScript)' } -}; +}); diff --git a/test/function/samples/es5-class-called-without-new/_config.js b/test/function/samples/es5-class-called-without-new/_config.js index 8c25f24144c..988f2c1ba6d 100644 --- a/test/function/samples/es5-class-called-without-new/_config.js +++ b/test/function/samples/es5-class-called-without-new/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not swallow type errors when running constructor functions without "new"' -}; +}); diff --git a/test/function/samples/escape-arguments/_config.js b/test/function/samples/escape-arguments/_config.js index 126dcda005f..ac0b6fbb093 100644 --- a/test/function/samples/escape-arguments/_config.js +++ b/test/function/samples/escape-arguments/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not use "arguments" as a placeholder variable for a default export', exports(exports) { assert.deepStrictEqual(exports, { foo: { __proto__: null, default: 42 } }); } -}; +}); diff --git a/test/function/samples/export-all-from-external/_config.js b/test/function/samples/export-all-from-external/_config.js index 86240a5d4cb..e9a11b03916 100644 --- a/test/function/samples/export-all-from-external/_config.js +++ b/test/function/samples/export-all-from-external/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows `export *` from external module, internally', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/export-all-multiple/_config.js b/test/function/samples/export-all-multiple/_config.js index 409610baa79..aaee6530d60 100644 --- a/test/function/samples/export-all-multiple/_config.js +++ b/test/function/samples/export-all-multiple/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows multiple export * statements' -}; +}); diff --git a/test/function/samples/export-all/_config.js b/test/function/samples/export-all/_config.js index 806031691fa..77ccaf442ab 100644 --- a/test/function/samples/export-all/_config.js +++ b/test/function/samples/export-all/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows export *' -}; +}); diff --git a/test/function/samples/export-and-import-reference-share-var/_config.js b/test/function/samples/export-and-import-reference-share-var/_config.js index 55ace33d09e..8785b945b01 100644 --- a/test/function/samples/export-and-import-reference-share-var/_config.js +++ b/test/function/samples/export-and-import-reference-share-var/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows export and import reference to share name', exports(exports) { assert.equal(exports.b, 9); } -}; +}); // adapted from es6-module-transpiler diff --git a/test/function/samples/export-as/_config.js b/test/function/samples/export-as/_config.js index ed89b856725..ad07972c1af 100644 --- a/test/function/samples/export-as/_config.js +++ b/test/function/samples/export-as/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows export { x as y }' -}; +}); diff --git a/test/function/samples/export-deconflicted-names/_config.js b/test/function/samples/export-deconflicted-names/_config.js index c7e6c7ac10a..3cc6b7c65ed 100644 --- a/test/function/samples/export-deconflicted-names/_config.js +++ b/test/function/samples/export-deconflicted-names/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly exports deconflicted names', exports(exports) { assert.equal(exports.bar(), 'bar'); } -}; +}); diff --git a/test/function/samples/export-default-anonymous-function/_config.js b/test/function/samples/export-default-anonymous-function/_config.js index 7c1a6e3f7d0..ec2254c2402 100644 --- a/test/function/samples/export-default-anonymous-function/_config.js +++ b/test/function/samples/export-default-anonymous-function/_config.js @@ -1,7 +1,7 @@ const { readFileSync } = require('node:fs'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports an anonymous function with custom ID resolver', // yeah, this is a real edge case options: { plugins: [ @@ -15,4 +15,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/export-default-as-b/_config.js b/test/function/samples/export-default-as-b/_config.js index dc8136824ce..4efcde241e6 100644 --- a/test/function/samples/export-default-as-b/_config.js +++ b/test/function/samples/export-default-as-b/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'exports default-as-named from sibling module (b)' -}; +}); diff --git a/test/function/samples/export-default-as-c/_config.js b/test/function/samples/export-default-as-c/_config.js index 9dfbc0be0e2..8ab6f87c2d4 100644 --- a/test/function/samples/export-default-as-c/_config.js +++ b/test/function/samples/export-default-as-c/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports default-as-named from sibling module (c)', exports(exports) { assert.equal(exports.namespace.baz, 'BAZ'); } -}; +}); diff --git a/test/function/samples/export-default-as/_config.js b/test/function/samples/export-default-as/_config.js index 3047c4d5d93..81dbee4edc3 100644 --- a/test/function/samples/export-default-as/_config.js +++ b/test/function/samples/export-default-as/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports default-as-named from sibling module', exports(exports) { assert.equal(exports.foo, 'FOO'); } -}; +}); diff --git a/test/function/samples/export-default-exported-id/_config.js b/test/function/samples/export-default-exported-id/_config.js index 6e3c0ca2b03..eb4b53d2de6 100644 --- a/test/function/samples/export-default-exported-id/_config.js +++ b/test/function/samples/export-default-exported-id/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports an id that is also a default export', options: { output: { exports: 'named' } @@ -9,4 +9,4 @@ module.exports = { assert.ok(new exports.default().ok); assert.ok(new exports.Image().ok); } -}; +}); diff --git a/test/function/samples/export-default-expression/_config.js b/test/function/samples/export-default-expression/_config.js index e3f438a6aa5..f8711bb06cb 100644 --- a/test/function/samples/export-default-expression/_config.js +++ b/test/function/samples/export-default-expression/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports a default value as module.exports', exports(exports) { assert.equal(exports, 42); } -}; +}); diff --git a/test/function/samples/export-default-from-external/_config.js b/test/function/samples/export-default-from-external/_config.js index e02be969d52..3b8c581343d 100644 --- a/test/function/samples/export-default-from-external/_config.js +++ b/test/function/samples/export-default-from-external/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'ensures external modules have correct names', options: { external: ['path'] @@ -9,4 +9,4 @@ module.exports = { exports(exports) { assert.equal(exports, path.sep); } -}; +}); diff --git a/test/function/samples/export-default-named-function/_config.js b/test/function/samples/export-default-named-function/_config.js index c1b160dc009..a64abdc5da9 100644 --- a/test/function/samples/export-default-named-function/_config.js +++ b/test/function/samples/export-default-named-function/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports a default named function', exports(exports) { assert.equal(exports(), 42); } -}; +}); diff --git a/test/function/samples/export-default-no-space/_config.js b/test/function/samples/export-default-no-space/_config.js index 4acbd451146..16d15e7687e 100644 --- a/test/function/samples/export-default-no-space/_config.js +++ b/test/function/samples/export-default-no-space/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles default exports with no space before declaration', exports: exports => { assert.deepEqual(exports, {}); } -}; +}); diff --git a/test/function/samples/export-destruction/_config.js b/test/function/samples/export-destruction/_config.js index 4541253cd72..a0c90f30722 100644 --- a/test/function/samples/export-destruction/_config.js +++ b/test/function/samples/export-destruction/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handle destruction patterns in export declarations', exports(exports) { @@ -8,4 +8,4 @@ module.exports = { assert.equal(exports.baz, 5); assert.equal(exports.quux, 17); } -}; +}); diff --git a/test/function/samples/export-from-default-renamed/_config.js b/test/function/samples/export-from-default-renamed/_config.js index 2c9c52ad511..81e18d299bd 100644 --- a/test/function/samples/export-from-default-renamed/_config.js +++ b/test/function/samples/export-from-default-renamed/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'export from works with multiple renamed default exports' -}; +}); diff --git a/test/function/samples/export-from-default/_config.js b/test/function/samples/export-from-default/_config.js index 81d51466e79..b3bd8cf3acd 100644 --- a/test/function/samples/export-from-default/_config.js +++ b/test/function/samples/export-from-default/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'export from works with default exports' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/export-from-default diff --git a/test/function/samples/export-from-external/_config.js b/test/function/samples/export-from-external/_config.js index dbc597aad6d..8ed2511c620 100644 --- a/test/function/samples/export-from-external/_config.js +++ b/test/function/samples/export-from-external/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports directly from an external module', options: { external: ['path'] @@ -9,6 +9,6 @@ module.exports = { exports(exports) { assert.equal(exports.sep, path.sep); } -}; +}); // https://github.com/esperantojs/esperanto/issues/161 diff --git a/test/function/samples/export-from-internal-module/_config.js b/test/function/samples/export-from-internal-module/_config.js index 3af8c98fb1a..4b7c61dbd68 100644 --- a/test/function/samples/export-from-internal-module/_config.js +++ b/test/function/samples/export-from-internal-module/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports from an internal module', exports(exports) { assert.equal(exports.foo, 42); } -}; +}); diff --git a/test/function/samples/export-from-multiple-no-default-conflict/_config.js b/test/function/samples/export-from-multiple-no-default-conflict/_config.js index 65ea8861425..099230571ab 100644 --- a/test/function/samples/export-from-multiple-no-default-conflict/_config.js +++ b/test/function/samples/export-from-multiple-no-default-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'export from does not cause erroneous warning if multiple modules export default', warnings: [], exports: exports => { @@ -9,4 +9,4 @@ module.exports = { bar: 'bar' }); } -}; +}); diff --git a/test/function/samples/export-from-no-local-binding-var/_config.js b/test/function/samples/export-from-no-local-binding-var/_config.js index b5ae9aebe6a..e2376c08bec 100644 --- a/test/function/samples/export-from-no-local-binding-var/_config.js +++ b/test/function/samples/export-from-no-local-binding-var/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'export from does not create a local binding', runtimeError(error) { assert.ok(/foo is not defined/.test(error.message)); } -}; +}); diff --git a/test/function/samples/export-from-no-local-binding/_config.js b/test/function/samples/export-from-no-local-binding/_config.js index 7500be3ac77..bf66df9a15d 100644 --- a/test/function/samples/export-from-no-local-binding/_config.js +++ b/test/function/samples/export-from-no-local-binding/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'export from does not create a local binding' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/export-from diff --git a/test/function/samples/export-from-renamed/_config.js b/test/function/samples/export-from-renamed/_config.js index 333e2a90e96..2d02dbdb691 100644 --- a/test/function/samples/export-from-renamed/_config.js +++ b/test/function/samples/export-from-renamed/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows export { x as y } from ...', exports(exports) { assert.equal(exports.y, 42); assert.ok(!('x' in exports)); } -}; +}); diff --git a/test/function/samples/export-from-with-definition-conflict/_config.js b/test/function/samples/export-from-with-definition-conflict/_config.js index 539e5f0a0b4..e032561e035 100644 --- a/test/function/samples/export-from-with-definition-conflict/_config.js +++ b/test/function/samples/export-from-with-definition-conflict/_config.js @@ -1,12 +1,12 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'ignores conflict between local definitions and export from declaration', exports(exports) { assert.equal(exports.foo, 'a-bar'); assert.equal(exports.bar, 'a-foo'); assert.equal(exports.baz, 'a-baz'); } -}; +}); // https://github.com/rollup/rollup/issues/16 diff --git a/test/function/samples/export-from-with-import-conflict/_config.js b/test/function/samples/export-from-with-import-conflict/_config.js index 1918de16386..2510aeb84bd 100644 --- a/test/function/samples/export-from-with-import-conflict/_config.js +++ b/test/function/samples/export-from-with-import-conflict/_config.js @@ -1,12 +1,12 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'ignores conflict between import declaration and export from declaration', exports(exports) { assert.equal(exports.foo, 'a-bar'); assert.equal(exports.bar, 'a-foo'); assert.equal(exports.baz, 'a-baz'); } -}; +}); // https://github.com/rollup/rollup/issues/16 diff --git a/test/function/samples/export-global/_config.js b/test/function/samples/export-global/_config.js index f67ad67a3a1..f2a7907390f 100644 --- a/test/function/samples/export-global/_config.js +++ b/test/function/samples/export-global/_config.js @@ -5,10 +5,10 @@ const assert = require('node:assert'); // see https://github.com/acornjs/acorn/issues/806 // Consider reverting this change should this become an acorn option -module.exports = { +module.exports = defineRollupTest({ description: '"variables corresponding to globals can be exported"', exports(exports) { assert.equal(exports.Buffer, Buffer); } -}; +}); diff --git a/test/function/samples/export-not-at-top-level-fails/_config.js b/test/function/samples/export-not-at-top-level-fails/_config.js index 8fe22cf09ff..9eba6b8b2ed 100644 --- a/test/function/samples/export-not-at-top-level-fails/_config.js +++ b/test/function/samples/export-not-at-top-level-fails/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'disallows non-top-level exports', error: { cause: { @@ -30,4 +30,4 @@ module.exports = { watchFiles: [ID_MAIN], message: "'import' and 'export' may only appear at the top level" } -}; +}); diff --git a/test/function/samples/export-two-ways-default-b/_config.js b/test/function/samples/export-two-ways-default-b/_config.js index 95e3fb7ac89..f7686b7418d 100644 --- a/test/function/samples/export-two-ways-default-b/_config.js +++ b/test/function/samples/export-two-ways-default-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'side-effects are preserved if subject is exported in multiple ways, even if default export has no direct link to original (#733)' -}; +}); diff --git a/test/function/samples/export-two-ways-default/_config.js b/test/function/samples/export-two-ways-default/_config.js index 88b207f4bca..8d2fb98187e 100644 --- a/test/function/samples/export-two-ways-default/_config.js +++ b/test/function/samples/export-two-ways-default/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'side-effects are preserved if subject is exported in multiple ways (#733)' -}; +}); diff --git a/test/function/samples/export-two-ways-function/_config.js b/test/function/samples/export-two-ways-function/_config.js index 4027382f311..878a2c08e82 100644 --- a/test/function/samples/export-two-ways-function/_config.js +++ b/test/function/samples/export-two-ways-function/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports the same function more than one way (#648)', exports(exports) { assert.equal(exports.foo, exports.bar); assert.equal(exports.foo(), 42); } -}; +}); diff --git a/test/function/samples/export-two-ways/_config.js b/test/function/samples/export-two-ways/_config.js index a25253941ad..ddffc91fca4 100644 --- a/test/function/samples/export-two-ways/_config.js +++ b/test/function/samples/export-two-ways/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports the same binding more than one way', exports(exports) { assert.equal(exports.a, 2); assert.equal(exports.b, 2); assert.equal(exports.c, 2); } -}; +}); diff --git a/test/function/samples/export-type-mismatch-b/_config.js b/test/function/samples/export-type-mismatch-b/_config.js index 163eadf8097..fbddfae62f6 100644 --- a/test/function/samples/export-type-mismatch-b/_config.js +++ b/test/function/samples/export-type-mismatch-b/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'export type must be auto, default, named or none', options: { output: { exports: 'blah' } }, generateError: { @@ -7,4 +7,4 @@ module.exports = { message: '"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "blah".' } -}; +}); diff --git a/test/function/samples/export-type-mismatch-c/_config.js b/test/function/samples/export-type-mismatch-c/_config.js index c2115ab2973..972cca25e58 100644 --- a/test/function/samples/export-type-mismatch-c/_config.js +++ b/test/function/samples/export-type-mismatch-c/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'cannot have named exports if explicit export type is default', options: { output: { exports: 'none' } }, generateError: { @@ -7,4 +7,4 @@ module.exports = { '"none" was specified for "output.exports", but entry module "main.js" has the following exports: "default"', url: 'https://rollupjs.org/configuration-options/#output-exports' } -}; +}); diff --git a/test/function/samples/export-type-mismatch/_config.js b/test/function/samples/export-type-mismatch/_config.js index d407bd29665..c73f83ec68c 100644 --- a/test/function/samples/export-type-mismatch/_config.js +++ b/test/function/samples/export-type-mismatch/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'cannot have named exports if explicit export type is default', options: { output: { exports: 'default' } }, generateError: { @@ -7,4 +7,4 @@ module.exports = { '"default" was specified for "output.exports", but entry module "main.js" has the following exports: "foo"', url: 'https://rollupjs.org/configuration-options/#output-exports' } -}; +}); diff --git a/test/function/samples/exports-flag-allowed-in-options/_config.js b/test/function/samples/exports-flag-allowed-in-options/_config.js index 3d14f61d542..7552aac27a0 100644 --- a/test/function/samples/exports-flag-allowed-in-options/_config.js +++ b/test/function/samples/exports-flag-allowed-in-options/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports flag is passed through to bundle options', options: { output: { exports: 'named' } @@ -9,4 +9,4 @@ module.exports = { assert.equal(exports.y, 42); assert.ok(!('x' in exports)); } -}; +}); diff --git a/test/function/samples/exports-named-values/_config.js b/test/function/samples/exports-named-values/_config.js index 543d0e07458..11d1718f551 100644 --- a/test/function/samples/exports-named-values/_config.js +++ b/test/function/samples/exports-named-values/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'exports named values from the bundle entry module', exports(exports) { assert.equal(exports.answer, 42); } -}; +}); diff --git a/test/function/samples/external-alias-parent/_config.js b/test/function/samples/external-alias-parent/_config.js index ef245b089ef..9394384c818 100644 --- a/test/function/samples/external-alias-parent/_config.js +++ b/test/function/samples/external-alias-parent/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes an external module included dynamically by an alias', options: { input: path.join(__dirname, 'first', 'main.js'), @@ -28,4 +28,4 @@ module.exports = { return 1; } } -}; +}); diff --git a/test/function/samples/external-alias/_config.js b/test/function/samples/external-alias/_config.js index 926b11ca619..c3caecbb970 100644 --- a/test/function/samples/external-alias/_config.js +++ b/test/function/samples/external-alias/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes an external module included dynamically by an alias', options: { input: path.join(__dirname, 'first', 'main.js'), @@ -25,4 +25,4 @@ module.exports = { return 1; } } -}; +}); diff --git a/test/function/samples/external-conflict/_config.js b/test/function/samples/external-conflict/_config.js index fdcb29b8656..d04ff8e652b 100644 --- a/test/function/samples/external-conflict/_config.js +++ b/test/function/samples/external-conflict/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'external paths from custom resolver remain external (#633)', options: { external: (_id, parent) => parent === 'dep', @@ -22,4 +22,4 @@ module.exports = { message: '"dep" is imported as an external by "dep", but is already an existing non-external module id.' } -}; +}); diff --git a/test/function/samples/external-directory-import/_config.js b/test/function/samples/external-directory-import/_config.js index 1a715a7be12..9a622aed456 100644 --- a/test/function/samples/external-directory-import/_config.js +++ b/test/function/samples/external-directory-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles using ../ as external import (#4349)', options: { external() { @@ -8,4 +8,4 @@ module.exports = { context: { require: id => id } -}; +}); diff --git a/test/function/samples/external-dynamic-import-live-binding-compact/_config.js b/test/function/samples/external-dynamic-import-live-binding-compact/_config.js index e1306031240..44f31ea35f7 100644 --- a/test/function/samples/external-dynamic-import-live-binding-compact/_config.js +++ b/test/function/samples/external-dynamic-import-live-binding-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports external dynamic imports with live bindings in compact mode', options: { external() { @@ -75,4 +75,4 @@ module.exports = { assert.strictEqual(results[3].default.otherValue, 4); }); } -}; +}); diff --git a/test/function/samples/external-dynamic-import-live-binding/_config.js b/test/function/samples/external-dynamic-import-live-binding/_config.js index 97f37b77f5b..cf26e171146 100644 --- a/test/function/samples/external-dynamic-import-live-binding/_config.js +++ b/test/function/samples/external-dynamic-import-live-binding/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports external dynamic imports with live bindings', options: { external() { @@ -71,4 +71,4 @@ module.exports = { assert.strictEqual(results[3].default.otherValue, 4); }); } -}; +}); diff --git a/test/function/samples/external-entry-point-object/_config.js b/test/function/samples/external-entry-point-object/_config.js index 5b74aaf2dc9..788c9dac0d9 100644 --- a/test/function/samples/external-entry-point-object/_config.js +++ b/test/function/samples/external-entry-point-object/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for entry points that are resolved as an external object by plugins', options: { plugins: { @@ -11,4 +11,4 @@ module.exports = { code: 'UNRESOLVED_ENTRY', message: 'Entry module "main.js" cannot be external.' } -}; +}); diff --git a/test/function/samples/external-entry-point/_config.js b/test/function/samples/external-entry-point/_config.js index 1e7921b6115..b07a0441922 100644 --- a/test/function/samples/external-entry-point/_config.js +++ b/test/function/samples/external-entry-point/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for entry points that are resolved as false by plugins', options: { plugins: { @@ -11,4 +11,4 @@ module.exports = { code: 'UNRESOLVED_ENTRY', message: 'Entry module "main.js" cannot be external.' } -}; +}); diff --git a/test/function/samples/external-function-always-true/_config.js b/test/function/samples/external-function-always-true/_config.js index b95854bc955..55597cc141a 100644 --- a/test/function/samples/external-function-always-true/_config.js +++ b/test/function/samples/external-function-always-true/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Does not call external for entry point', options: { external(id, parentId) { @@ -6,4 +6,4 @@ module.exports = { return true; } } -}; +}); diff --git a/test/function/samples/external-function/_config.js b/test/function/samples/external-function/_config.js index 05832e1686a..61faaf5d14d 100644 --- a/test/function/samples/external-function/_config.js +++ b/test/function/samples/external-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows external option to be a function (#522)', options: { external: id => id === 'external' @@ -9,4 +9,4 @@ module.exports = { return require(id); } } -}; +}); diff --git a/test/function/samples/external-ids-not-resolved/_config.js b/test/function/samples/external-ids-not-resolved/_config.js index 10982d1af3e..548a101181d 100644 --- a/test/function/samples/external-ids-not-resolved/_config.js +++ b/test/function/samples/external-ids-not-resolved/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not attempt to resolve external IDs', options: { external: ['external'], @@ -12,4 +12,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/external-ignore-reserved-null-marker/_config.js b/test/function/samples/external-ignore-reserved-null-marker/_config.js index cf06a0c0a5b..6029fc86f77 100644 --- a/test/function/samples/external-ignore-reserved-null-marker/_config.js +++ b/test/function/samples/external-ignore-reserved-null-marker/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external function ignores \\0 started ids', options: { external(id) { @@ -26,4 +26,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/external-live-binding-compact/_config.js b/test/function/samples/external-live-binding-compact/_config.js index 3b3d29b06d4..7252ce8b9ad 100644 --- a/test/function/samples/external-live-binding-compact/_config.js +++ b/test/function/samples/external-live-binding-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles external live-bindings', options: { external: ['named', 'star'], @@ -42,4 +42,4 @@ module.exports = { exports.incrementStar(); assert.equal(exports.star, 1, 'star'); } -}; +}); diff --git a/test/function/samples/external-live-binding/_config.js b/test/function/samples/external-live-binding/_config.js index 4b5cad7cfcb..217a46af78c 100644 --- a/test/function/samples/external-live-binding/_config.js +++ b/test/function/samples/external-live-binding/_config.js @@ -4,7 +4,7 @@ let named; let star; let defaulted; -module.exports = { +module.exports = defineRollupTest({ description: 'handles external live-bindings', options: { external: ['named', 'star', 'defaulted'], @@ -57,4 +57,4 @@ module.exports = { // make sure the default is not reexported assert.equal(exports.default, undefined); } -}; +}); diff --git a/test/function/samples/external-normalization/_config.js b/test/function/samples/external-normalization/_config.js index 56ae23974c2..62b57ac1617 100644 --- a/test/function/samples/external-normalization/_config.js +++ b/test/function/samples/external-normalization/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'external paths from custom resolver remain external (#633)', options: { external: ['path'], @@ -17,4 +17,4 @@ module.exports = { exports: exports => { assert.equal(exports, path.resolve); } -}; +}); diff --git a/test/function/samples/external-regex-array/_config.js b/test/function/samples/external-regex-array/_config.js index 44c7fed70dc..ef61c304202 100644 --- a/test/function/samples/external-regex-array/_config.js +++ b/test/function/samples/external-regex-array/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows external option to be an array of regex and strings', options: { external: [/external/, 'other'] @@ -10,4 +10,4 @@ module.exports = { return require(id); } } -}; +}); diff --git a/test/function/samples/external-regex/_config.js b/test/function/samples/external-regex/_config.js index 6be55508350..5ebb6ebd968 100644 --- a/test/function/samples/external-regex/_config.js +++ b/test/function/samples/external-regex/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows external option to be a regex', options: { external: /external/ @@ -9,4 +9,4 @@ module.exports = { return require(id); } } -}; +}); diff --git a/test/function/samples/external-resolve-false/_config.js b/test/function/samples/external-resolve-false/_config.js index ec25513d0ec..ffe8c1aa7a1 100644 --- a/test/function/samples/external-resolve-false/_config.js +++ b/test/function/samples/external-resolve-false/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes an external module with a false resolve return', options: { input: 'main.js', @@ -18,4 +18,4 @@ module.exports = { return 1; } } -}; +}); diff --git a/test/function/samples/external-resolved/_config.js b/test/function/samples/external-resolved/_config.js index 7bd52013841..de01e199aae 100644 --- a/test/function/samples/external-resolved/_config.js +++ b/test/function/samples/external-resolved/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const testedIds = []; -module.exports = { +module.exports = defineRollupTest({ description: 'passes both unresolved and resolved ids to the external option', context: { require() { @@ -53,4 +53,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/externally-reassigned-default-exports/_config.js b/test/function/samples/externally-reassigned-default-exports/_config.js index e753654ccb5..53fe97d0421 100644 --- a/test/function/samples/externally-reassigned-default-exports/_config.js +++ b/test/function/samples/externally-reassigned-default-exports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'calls to externally reassigned methods of default exports must be retained', exports(exports) { let triggered = false; @@ -10,4 +10,4 @@ module.exports = { exports.test(); assert.ok(triggered); } -}; +}); diff --git a/test/function/samples/externally-reassigned-globals/_config.js b/test/function/samples/externally-reassigned-globals/_config.js index 10c9e3ed99b..1683a1c0380 100644 --- a/test/function/samples/externally-reassigned-globals/_config.js +++ b/test/function/samples/externally-reassigned-globals/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'calls to externally reassigned global methods must be retained', exports(exports) { let triggered1 = false; @@ -20,4 +20,4 @@ module.exports = { assert.ok(triggered1); assert.ok(triggered2); } -}; +}); diff --git a/test/function/samples/externally-reassigned-named-exports/_config.js b/test/function/samples/externally-reassigned-named-exports/_config.js index 4ecd09cb041..0afcde3db77 100644 --- a/test/function/samples/externally-reassigned-named-exports/_config.js +++ b/test/function/samples/externally-reassigned-named-exports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'calls to externally reassigned methods of named exports must be retained', exports(exports) { let triggered1 = false; @@ -16,4 +16,4 @@ module.exports = { assert.ok(triggered1); assert.ok(triggered2); } -}; +}); diff --git a/test/function/samples/externally-reassigned-named-reexports/_config.js b/test/function/samples/externally-reassigned-named-reexports/_config.js index 8515722136d..6ffff45daa6 100644 --- a/test/function/samples/externally-reassigned-named-reexports/_config.js +++ b/test/function/samples/externally-reassigned-named-reexports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'calls to externally reassigned methods of named reexports must be retained', exports(exports) { let triggered = false; @@ -10,4 +10,4 @@ module.exports = { exports.test(); assert.ok(triggered); } -}; +}); diff --git a/test/function/samples/externally-reassigned-star-reexports/_config.js b/test/function/samples/externally-reassigned-star-reexports/_config.js index 6016153ed1b..61aef7b4f37 100644 --- a/test/function/samples/externally-reassigned-star-reexports/_config.js +++ b/test/function/samples/externally-reassigned-star-reexports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'calls to externally reassigned methods of namespace reexports must be retained', exports(exports) { let triggered = false; @@ -10,4 +10,4 @@ module.exports = { exports.test(); assert.ok(triggered); } -}; +}); diff --git a/test/function/samples/facade-reexports/_config.js b/test/function/samples/facade-reexports/_config.js index dfbe2cb222e..d60aee59842 100644 --- a/test/function/samples/facade-reexports/_config.js +++ b/test/function/samples/facade-reexports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles reexports when creating a facade chunk and transitive dependencies are not hoisted', options: { @@ -13,4 +13,4 @@ module.exports = { assert.strictEqual(exports.external, true); assert.strictEqual(await exports.dynamic(), 'liblib'); } -}; +}); diff --git a/test/function/samples/fallback-on-warn/_config.js b/test/function/samples/fallback-on-warn/_config.js index ed2796c8ddf..756868384b2 100644 --- a/test/function/samples/fallback-on-warn/_config.js +++ b/test/function/samples/fallback-on-warn/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); let oldConsoleWarn; const warnings = []; -module.exports = { +module.exports = defineRollupTest({ description: 'logs as a fallback if no onwarn handler is provided', options: { onwarn: null @@ -17,4 +17,4 @@ module.exports = { 'Use of eval in "main.js" is strongly discouraged as it poses security risks and may cause issues with minification.' ]); } -}; +}); diff --git a/test/function/samples/file-and-dir/_config.js b/test/function/samples/file-and-dir/_config.js index ebcb5c78b91..836beb038cd 100644 --- a/test/function/samples/file-and-dir/_config.js +++ b/test/function/samples/file-and-dir/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using both the file and the dir option', options: { output: { file: 'bundle.js', dir: 'dist' } @@ -9,4 +9,4 @@ module.exports = { 'Invalid value for option "output.dir" - you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks.', url: 'https://rollupjs.org/configuration-options/#output-dir' } -}; +}); diff --git a/test/function/samples/for-in-accessors/_config.js b/test/function/samples/for-in-accessors/_config.js index 70c608f68b2..80e0bfe2d3f 100644 --- a/test/function/samples/for-in-accessors/_config.js +++ b/test/function/samples/for-in-accessors/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes "this" for accessors triggered by for-in loops' -}; +}); diff --git a/test/function/samples/for-in-loop-head-dependencies/_config.js b/test/function/samples/for-in-loop-head-dependencies/_config.js index cb555be06af..f26516e7b6a 100644 --- a/test/function/samples/for-in-loop-head-dependencies/_config.js +++ b/test/function/samples/for-in-loop-head-dependencies/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses parent scope for right-hand-side in for-in statement (#1480)' -}; +}); diff --git a/test/function/samples/for-loop-head-dependencies/_config.js b/test/function/samples/for-loop-head-dependencies/_config.js index cdd3321626f..054befebc0b 100644 --- a/test/function/samples/for-loop-head-dependencies/_config.js +++ b/test/function/samples/for-loop-head-dependencies/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses correct scope in for statement (#1538)' -}; +}); diff --git a/test/function/samples/for-loop-parameter/_config.js b/test/function/samples/for-loop-parameter/_config.js index faea21cac26..a363f561e99 100644 --- a/test/function/samples/for-loop-parameter/_config.js +++ b/test/function/samples/for-loop-parameter/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes for-loop parameters', exports({ checkObject, checkArray }) { assert.strictEqual(checkObject({ foo: 1 }), 1, 'object'); assert.strictEqual(checkArray([2]), 2, 'array'); } -}; +}); diff --git a/test/function/samples/for-loops-as-assignments/_config.js b/test/function/samples/for-loops-as-assignments/_config.js index 4ba53db414c..317d6a9338c 100644 --- a/test/function/samples/for-loops-as-assignments/_config.js +++ b/test/function/samples/for-loops-as-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'make sure for loops are counted as variable assignments (#2199)' -}; +}); diff --git a/test/function/samples/for-of-accessors/_config.js b/test/function/samples/for-of-accessors/_config.js index e54f1f0ac4c..59af0ced9aa 100644 --- a/test/function/samples/for-of-accessors/_config.js +++ b/test/function/samples/for-of-accessors/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes "this" for accessors triggered by for-of loops' -}; +}); diff --git a/test/function/samples/for-of-loop-head-dependencies/_config.js b/test/function/samples/for-of-loop-head-dependencies/_config.js index 24bba078afc..9c8f8e0f51d 100644 --- a/test/function/samples/for-of-loop-head-dependencies/_config.js +++ b/test/function/samples/for-of-loop-head-dependencies/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses parent scope for right-hand-side in for-of statement (#1539)' -}; +}); diff --git a/test/function/samples/for-of-with-in-operator/_config.js b/test/function/samples/for-of-with-in-operator/_config.js index 721aac80114..eed462dc2ab 100644 --- a/test/function/samples/for-of-with-in-operator/_config.js +++ b/test/function/samples/for-of-with-in-operator/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles using the in operator in the iterator of a for-of loop (#2337)' -}; +}); diff --git a/test/function/samples/function-asm-directive/_config.js b/test/function/samples/function-asm-directive/_config.js index 6160aa97060..240e0df797b 100644 --- a/test/function/samples/function-asm-directive/_config.js +++ b/test/function/samples/function-asm-directive/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: "shouldn't delete use asm from the start of a function body", code(code) { assert.notEqual(code.indexOf('use asm'), -1); } -}; +}); diff --git a/test/function/samples/function-directive-not-first/_config.js b/test/function/samples/function-directive-not-first/_config.js index 8afaeb64093..8d753cb7430 100644 --- a/test/function/samples/function-directive-not-first/_config.js +++ b/test/function/samples/function-directive-not-first/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'should delete use asm from function body if it is not the first expression', code(code) { assert.ok(!code.includes('use asm')); } -}; +}); diff --git a/test/function/samples/function-expressions-simplified-to-statement/_config.js b/test/function/samples/function-expressions-simplified-to-statement/_config.js index 2a43659a713..a879cda01c0 100644 --- a/test/function/samples/function-expressions-simplified-to-statement/_config.js +++ b/test/function/samples/function-expressions-simplified-to-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly handles function expressions which are simplified to statements' -}; +}); diff --git a/test/function/samples/function-getter-side-effects/_config.js b/test/function/samples/function-getter-side-effects/_config.js index 904e3d0e679..10de92c833c 100644 --- a/test/function/samples/function-getter-side-effects/_config.js +++ b/test/function/samples/function-getter-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects getters created on functions' -}; +}); diff --git a/test/function/samples/function-side-effects/_config.js b/test/function/samples/function-side-effects/_config.js index cdbb6090e71..c6515c26ef3 100644 --- a/test/function/samples/function-side-effects/_config.js +++ b/test/function/samples/function-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'assumes functions may mutate objects passed in' -}; +}); diff --git a/test/function/samples/function-use-strict-directive-removed/_config.js b/test/function/samples/function-use-strict-directive-removed/_config.js index fb5a895e896..53aa543994a 100644 --- a/test/function/samples/function-use-strict-directive-removed/_config.js +++ b/test/function/samples/function-use-strict-directive-removed/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'should delete use strict from function body', code(code) { assert.equal(code.lastIndexOf('use strict'), 1); } -}; +}); diff --git a/test/function/samples/functions-renamed-correctly/_config.js b/test/function/samples/functions-renamed-correctly/_config.js index b0719a05d4e..3f38d599a21 100644 --- a/test/function/samples/functions-renamed-correctly/_config.js +++ b/test/function/samples/functions-renamed-correctly/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'renames function expression IDs correctly' -}; +}); diff --git a/test/function/samples/generate-bundle-mutation/_config.js b/test/function/samples/generate-bundle-mutation/_config.js index 04bddc406a6..affdff67041 100644 --- a/test/function/samples/generate-bundle-mutation/_config.js +++ b/test/function/samples/generate-bundle-mutation/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles adding or deleting symbols in generateBundle', options: { plugins: [ @@ -12,4 +12,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/globally-called-modifying-function/_config.js b/test/function/samples/globally-called-modifying-function/_config.js index 86b2f620dbd..4232cc854ca 100644 --- a/test/function/samples/globally-called-modifying-function/_config.js +++ b/test/function/samples/globally-called-modifying-function/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'globally called function should be included if it modifies an exported value (#112)' -}; +}); diff --git a/test/function/samples/handle-calling-uncallable/_config.js b/test/function/samples/handle-calling-uncallable/_config.js index 74b7d983f48..44977d2be35 100644 --- a/test/function/samples/handle-calling-uncallable/_config.js +++ b/test/function/samples/handle-calling-uncallable/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not give cryptic error when calling uncallable things (#1257)' -}; +}); diff --git a/test/function/samples/handle-labels-inside-functions/_config.js b/test/function/samples/handle-labels-inside-functions/_config.js index ca46e3f11ec..9f0ca3e60be 100644 --- a/test/function/samples/handle-labels-inside-functions/_config.js +++ b/test/function/samples/handle-labels-inside-functions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not fail when using labels inside functions (#1706)' -}; +}); diff --git a/test/function/samples/handle-missing-export-source/_config.js b/test/function/samples/handle-missing-export-source/_config.js index 0488306701a..e1437b95d5c 100644 --- a/test/function/samples/handle-missing-export-source/_config.js +++ b/test/function/samples/handle-missing-export-source/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not fail if a pre-generated AST is omitting the source property of an unused named export (#3210)', options: { @@ -12,4 +12,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/handle-object-rest-spread-patterns/_config.js b/test/function/samples/handle-object-rest-spread-patterns/_config.js index 33660506b71..47c1ab57d2b 100644 --- a/test/function/samples/handle-object-rest-spread-patterns/_config.js +++ b/test/function/samples/handle-object-rest-spread-patterns/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles properties created by an object rest spread operator' -}; +}); diff --git a/test/function/samples/handle-object-rest-spread-properties/_config.js b/test/function/samples/handle-object-rest-spread-properties/_config.js index 33660506b71..47c1ab57d2b 100644 --- a/test/function/samples/handle-object-rest-spread-properties/_config.js +++ b/test/function/samples/handle-object-rest-spread-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles properties created by an object rest spread operator' -}; +}); diff --git a/test/function/samples/handle-object-rest-spread-reassigments/_config.js b/test/function/samples/handle-object-rest-spread-reassigments/_config.js index 33660506b71..47c1ab57d2b 100644 --- a/test/function/samples/handle-object-rest-spread-reassigments/_config.js +++ b/test/function/samples/handle-object-rest-spread-reassigments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles properties created by an object rest spread operator' -}; +}); diff --git a/test/function/samples/handle-statically-resolvable-if-statements/_config.js b/test/function/samples/handle-statically-resolvable-if-statements/_config.js index bf7be5e68c6..157cdd349b7 100644 --- a/test/function/samples/handle-statically-resolvable-if-statements/_config.js +++ b/test/function/samples/handle-statically-resolvable-if-statements/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles statically resolvable "if" statements (#2134)', context: { value: 1 @@ -8,4 +8,4 @@ module.exports = { exports({ x }) { assert.equal(x, 1); } -}; +}); diff --git a/test/function/samples/handles-double-declarations/_config.js b/test/function/samples/handles-double-declarations/_config.js index bbeffbcd1d1..c642f78485c 100644 --- a/test/function/samples/handles-double-declarations/_config.js +++ b/test/function/samples/handles-double-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not fail for double declarations with initializers from other modules' -}; +}); diff --git a/test/function/samples/handles-empty-string-sourcemap-mappings/_config.js b/test/function/samples/handles-empty-string-sourcemap-mappings/_config.js index 764c77a324a..1233b4410ff 100644 --- a/test/function/samples/handles-empty-string-sourcemap-mappings/_config.js +++ b/test/function/samples/handles-empty-string-sourcemap-mappings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles transforms that return sourcemap with empty mappings', options: { @@ -15,4 +15,4 @@ module.exports = { // ensure source maps are generated output: { sourcemap: true } } -}; +}); diff --git a/test/function/samples/handles-stringified-sourcemaps/_config.js b/test/function/samples/handles-stringified-sourcemaps/_config.js index cf7ff1e18c1..8a4b5209c2e 100644 --- a/test/function/samples/handles-stringified-sourcemaps/_config.js +++ b/test/function/samples/handles-stringified-sourcemaps/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles transforms that return stringified source maps (#377)', options: { @@ -16,4 +16,4 @@ module.exports = { // ensure source maps are generated output: { sourcemap: true } } -}; +}); diff --git a/test/function/samples/has-default-export/_config.js b/test/function/samples/has-default-export/_config.js index 9f99c50b9f4..437e0d0db43 100644 --- a/test/function/samples/has-default-export/_config.js +++ b/test/function/samples/has-default-export/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'reports if a module has a default export', options: { plugins: [ @@ -42,4 +42,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/has-modules-array/_config.js b/test/function/samples/has-modules-array/_config.js index c56b1cc9d2a..974947aaa94 100644 --- a/test/function/samples/has-modules-array/_config.js +++ b/test/function/samples/has-modules-array/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'user-facing bundle has modules array', bundle(bundle) { assert.ok(bundle.cache.modules); @@ -9,4 +9,4 @@ module.exports = { assert.equal(path.relative(bundle.cache.modules[0].id, path.join(__dirname, 'foo.js')), ''); assert.equal(path.relative(bundle.cache.modules[1].id, path.join(__dirname, 'main.js')), ''); } -}; +}); diff --git a/test/function/samples/hashing/length-at-non-hash/_config.js b/test/function/samples/hashing/length-at-non-hash/_config.js index be57051eb69..ce196bbbb71 100644 --- a/test/function/samples/hashing/length-at-non-hash/_config.js +++ b/test/function/samples/hashing/length-at-non-hash/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when configuring a length for placeholder other than "hash"', options: { output: { chunkFileNames: '[name:3].js' } }, generateError: { code: 'VALIDATION_ERROR', message: '"[name:3]" is not a valid placeholder in the "output.chunkFileNames" pattern.' } -}; +}); diff --git a/test/function/samples/hashing/maximum-hash-size/_config.js b/test/function/samples/hashing/maximum-hash-size/_config.js index 4818302d041..9739d1cc165 100644 --- a/test/function/samples/hashing/maximum-hash-size/_config.js +++ b/test/function/samples/hashing/maximum-hash-size/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when the maximum hash size is exceeded', options: { output: { chunkFileNames: '[hash:65].js' } }, generateError: { @@ -6,4 +6,4 @@ module.exports = { message: 'Hashes cannot be longer than 64 characters, received 65. Check the "output.chunkFileNames" option.' } -}; +}); diff --git a/test/function/samples/hashing/minimum-hash-size/_config.js b/test/function/samples/hashing/minimum-hash-size/_config.js index 9ef9dfcf253..985b64d125a 100644 --- a/test/function/samples/hashing/minimum-hash-size/_config.js +++ b/test/function/samples/hashing/minimum-hash-size/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when the maximum hash size is exceeded', options: { output: { chunkFileNames: '[hash:3].js' } }, generateError: { @@ -6,4 +6,4 @@ module.exports = { message: 'To generate hashes for this number of chunks (currently 1), you need a minimum hash size of 6, received 3. Check the "output.chunkFileNames" option.' } -}; +}); diff --git a/test/function/samples/hidden-directories/_config.js b/test/function/samples/hidden-directories/_config.js index 80cd78429a6..75981479263 100644 --- a/test/function/samples/hidden-directories/_config.js +++ b/test/function/samples/hidden-directories/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows imports from directories with leading "." character' -}; +}); diff --git a/test/function/samples/hoisted-variable-if-else/_config.js b/test/function/samples/hoisted-variable-if-else/_config.js index fac4e9a21f7..44dfa1e02a2 100644 --- a/test/function/samples/hoisted-variable-if-else/_config.js +++ b/test/function/samples/hoisted-variable-if-else/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles hoisted variables in chained if statements', exports(exports) { exports.test(true); @@ -10,4 +10,4 @@ module.exports = { exports.test('loop'); assert.strictEqual(exports.result, 'fourth'); } -}; +}); diff --git a/test/function/samples/identifiers-in-template-literals/_config.js b/test/function/samples/identifiers-in-template-literals/_config.js index 8b031cdab65..b84d9006a8c 100644 --- a/test/function/samples/identifiers-in-template-literals/_config.js +++ b/test/function/samples/identifiers-in-template-literals/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'identifiers in template literals are rendered correctly' -}; +}); diff --git a/test/function/samples/if-statement-insert-whitespace/_config.js b/test/function/samples/if-statement-insert-whitespace/_config.js index 22b005eccbd..5d543e0a324 100644 --- a/test/function/samples/if-statement-insert-whitespace/_config.js +++ b/test/function/samples/if-statement-insert-whitespace/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'inserts necessary white-space when simplifying if-statements (#3419)', options: { external: 'external' @@ -8,4 +8,4 @@ module.exports = { return false; } } -}; +}); diff --git a/test/function/samples/if-statement-with-assignment/_config.js b/test/function/samples/if-statement-with-assignment/_config.js index 6c573d5e7bf..3237d776476 100644 --- a/test/function/samples/if-statement-with-assignment/_config.js +++ b/test/function/samples/if-statement-with-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'update assignments to names are preserved (#930)' -}; +}); diff --git a/test/function/samples/if-statement-with-false-condition/_config.js b/test/function/samples/if-statement-with-false-condition/_config.js index b7eda7a022f..6c3671e6ef0 100644 --- a/test/function/samples/if-statement-with-false-condition/_config.js +++ b/test/function/samples/if-statement-with-false-condition/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'if statements with false condition do not break render (#973)' -}; +}); diff --git a/test/function/samples/if-statement-with-update/_config.js b/test/function/samples/if-statement-with-update/_config.js index 8601e12f716..e641f7d7cbe 100644 --- a/test/function/samples/if-statement-with-update/_config.js +++ b/test/function/samples/if-statement-with-update/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'updates to names are preserved (#930)' -}; +}); diff --git a/test/function/samples/iife-code-splitting/_config.js b/test/function/samples/iife-code-splitting/_config.js index 0387086aeff..54be7005e73 100644 --- a/test/function/samples/iife-code-splitting/_config.js +++ b/test/function/samples/iife-code-splitting/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when generating multiple chunks for an IIFE build', options: { output: { format: 'iife' } @@ -9,4 +9,4 @@ module.exports = { 'Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.', url: 'https://rollupjs.org/configuration-options/#output-format' } -}; +}); diff --git a/test/function/samples/iife-comments/_config.js b/test/function/samples/iife-comments/_config.js index 05b3fd9eaf0..87b230a6fd5 100644 --- a/test/function/samples/iife-comments/_config.js +++ b/test/function/samples/iife-comments/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not wrongly append comments', exports(exports) { assert.equal(exports, 42); } -}; +}); diff --git a/test/function/samples/implicit-dependencies/dependant-dynamic-import-no-effects/_config.js b/test/function/samples/implicit-dependencies/dependant-dynamic-import-no-effects/_config.js index a7ef8d81401..904c987e8ad 100644 --- a/test/function/samples/implicit-dependencies/dependant-dynamic-import-no-effects/_config.js +++ b/test/function/samples/implicit-dependencies/dependant-dynamic-import-no-effects/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when a module that is loaded before an emitted chunk is fully tree-shaken', options: { plugins: { @@ -24,4 +24,4 @@ module.exports = { path.join(__dirname, 'main.js') ] } -}; +}); diff --git a/test/function/samples/implicit-dependencies/dependant-dynamic-import-not-included/_config.js b/test/function/samples/implicit-dependencies/dependant-dynamic-import-not-included/_config.js index a9b8c3fe35c..dcdfecc6f20 100644 --- a/test/function/samples/implicit-dependencies/dependant-dynamic-import-not-included/_config.js +++ b/test/function/samples/implicit-dependencies/dependant-dynamic-import-not-included/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when a module that is loaded before an emitted chunk is only linked to the module graph via a tree-shaken dynamic import', options: { @@ -31,4 +31,4 @@ module.exports = { path.join(__dirname, 'main.js') ] } -}; +}); diff --git a/test/function/samples/implicit-dependencies/dependant-not-part-of-graph/_config.js b/test/function/samples/implicit-dependencies/dependant-not-part-of-graph/_config.js index 40c777629af..758e723780c 100644 --- a/test/function/samples/implicit-dependencies/dependant-not-part-of-graph/_config.js +++ b/test/function/samples/implicit-dependencies/dependant-not-part-of-graph/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when a module that is loaded before an emitted chunk is not part of the module graph', options: { @@ -37,4 +37,4 @@ module.exports = { path.join(__dirname, 'main.js') ] } -}; +}); diff --git a/test/function/samples/implicit-dependencies/external-dependant/_config.js b/test/function/samples/implicit-dependencies/external-dependant/_config.js index 4f8b9d9b40c..dd58dc1bca0 100644 --- a/test/function/samples/implicit-dependencies/external-dependant/_config.js +++ b/test/function/samples/implicit-dependencies/external-dependant/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when a module that is loaded before an emitted chunk does not exist', options: { plugins: { @@ -20,4 +20,4 @@ module.exports = { 'Module "does-not-exist" that should be implicitly loaded before "dep.js" could not be resolved.', watchFiles: [path.join(__dirname, 'dep.js'), path.join(__dirname, 'main.js')] } -}; +}); diff --git a/test/function/samples/implicit-dependencies/missing-dependant/_config.js b/test/function/samples/implicit-dependencies/missing-dependant/_config.js index 10de97d4156..0c7bb14aa7f 100644 --- a/test/function/samples/implicit-dependencies/missing-dependant/_config.js +++ b/test/function/samples/implicit-dependencies/missing-dependant/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when a module that is loaded before an emitted chunk is external', options: { plugins: { @@ -25,4 +25,4 @@ module.exports = { 'Module "external" that should be implicitly loaded before "dep.js" cannot be external.', watchFiles: [path.join(__dirname, 'dep.js'), path.join(__dirname, 'main.js')] } -}; +}); diff --git a/test/function/samples/import-as/_config.js b/test/function/samples/import-as/_config.js index 7831d8cd02b..321d260bc33 100644 --- a/test/function/samples/import-as/_config.js +++ b/test/function/samples/import-as/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'renames named and default imports' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/import-as diff --git a/test/function/samples/import-assertions/plugin-assertions-this-resolve/_config.js b/test/function/samples/import-assertions/plugin-assertions-this-resolve/_config.js index 6601996faf3..c6fa3eca5d8 100644 --- a/test/function/samples/import-assertions/plugin-assertions-this-resolve/_config.js +++ b/test/function/samples/import-assertions/plugin-assertions-this-resolve/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows plugins to provide assertions for this.resolve', options: { plugins: [ @@ -46,4 +46,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/import-assertions/warn-assertion-conflicts/_config.js b/test/function/samples/import-assertions/warn-assertion-conflicts/_config.js index 868006d6e99..75d6cb0138a 100644 --- a/test/function/samples/import-assertions/warn-assertion-conflicts/_config.js +++ b/test/function/samples/import-assertions/warn-assertion-conflicts/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns for conflicting import assertions', options: { external: id => id.startsWith('external') @@ -61,4 +61,4 @@ module.exports = { 'Module "other.js" tried to import "dep.js" with "type": "bar" assertions, but it was already imported elsewhere with "type": "foo" assertions. Please ensure that import assertions for the same module are always consistent.' } ] -}; +}); diff --git a/test/function/samples/import-binding/_config.js b/test/function/samples/import-binding/_config.js index d4f7a763af0..3417e291c1d 100644 --- a/test/function/samples/import-binding/_config.js +++ b/test/function/samples/import-binding/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'import binding' -}; +}); diff --git a/test/function/samples/import-chain-as/_config.js b/test/function/samples/import-chain-as/_config.js index 9294fd44fba..7876ede2fcd 100644 --- a/test/function/samples/import-chain-as/_config.js +++ b/test/function/samples/import-chain-as/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports as- chained exports' -}; +}); diff --git a/test/function/samples/import-chain/_config.js b/test/function/samples/import-chain/_config.js index c6c7a1b124a..81190909b32 100644 --- a/test/function/samples/import-chain/_config.js +++ b/test/function/samples/import-chain/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports chained exports' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/import-chain diff --git a/test/function/samples/import-default-and-named-function/_config.js b/test/function/samples/import-default-and-named-function/_config.js index bd54c449dd1..00f509a711b 100644 --- a/test/function/samples/import-default-and-named-function/_config.js +++ b/test/function/samples/import-default-and-named-function/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports default and named exports in same declaration' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/export-default-named-function diff --git a/test/function/samples/import-default-as-named/_config.js b/test/function/samples/import-default-as-named/_config.js index e11a2ea1a4d..3b25c3e301a 100644 --- a/test/function/samples/import-default-as-named/_config.js +++ b/test/function/samples/import-default-as-named/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a default export by a name' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/export-default-function diff --git a/test/function/samples/import-default-as-other/_config.js b/test/function/samples/import-default-as-other/_config.js index cb7290bd926..635adbacdd5 100644 --- a/test/function/samples/import-default-as-other/_config.js +++ b/test/function/samples/import-default-as-other/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a default import by another name' -}; +}); diff --git a/test/function/samples/import-default-class/_config.js b/test/function/samples/import-default-class/_config.js index becd71d101f..2865045611c 100644 --- a/test/function/samples/import-default-class/_config.js +++ b/test/function/samples/import-default-class/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a default class' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/export-default-class diff --git a/test/function/samples/import-default-expression/_config.js b/test/function/samples/import-default-expression/_config.js index b43e8e08046..bbe1f3400c1 100644 --- a/test/function/samples/import-default-expression/_config.js +++ b/test/function/samples/import-default-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a default expression' -}; +}); diff --git a/test/function/samples/import-default-from-external/_config.js b/test/function/samples/import-default-from-external/_config.js index 9120a3063c3..4341c0ee3c6 100644 --- a/test/function/samples/import-default-from-external/_config.js +++ b/test/function/samples/import-default-from-external/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports default from external module', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/import-default-function/_config.js b/test/function/samples/import-default-function/_config.js index 77dea2133f8..db34e3a0980 100644 --- a/test/function/samples/import-default-function/_config.js +++ b/test/function/samples/import-default-function/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a default function' -}; +}); diff --git a/test/function/samples/import-dependency-in-other-module/_config.js b/test/function/samples/import-dependency-in-other-module/_config.js index b29eec89fc9..cff131dc485 100644 --- a/test/function/samples/import-dependency-in-other-module/_config.js +++ b/test/function/samples/import-dependency-in-other-module/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a dependency from a separate module' -}; +}); diff --git a/test/function/samples/import-dependency-in-same-module/_config.js b/test/function/samples/import-dependency-in-same-module/_config.js index a08ff3cdab7..7f9cc3c9a7c 100644 --- a/test/function/samples/import-dependency-in-same-module/_config.js +++ b/test/function/samples/import-dependency-in-same-module/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a dependency from the same module' -}; +}); diff --git a/test/function/samples/import-empty-from-external/_config.js b/test/function/samples/import-empty-from-external/_config.js index 80c91ae85a9..d9a0c2ad980 100644 --- a/test/function/samples/import-empty-from-external/_config.js +++ b/test/function/samples/import-empty-from-external/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports external module for side effects', context: { // override require here, making "foo" appear as a global module @@ -12,4 +12,4 @@ module.exports = { options: { external: ['foo'] } -}; +}); diff --git a/test/function/samples/import-meta-url/_config.js b/test/function/samples/import-meta-url/_config.js index 5e9754545a9..472bc4adfac 100644 --- a/test/function/samples/import-meta-url/_config.js +++ b/test/function/samples/import-meta-url/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const URL = require('node:url').URL; -module.exports = { +module.exports = defineRollupTest({ description: 'resolves import.meta.url', context: { __filename: path.join(__dirname, 'main.js') @@ -10,4 +10,4 @@ module.exports = { exports(exports) { assert.strictEqual(exports, new URL('file:' + path.join(__dirname, 'main.js')).href); } -}; +}); diff --git a/test/function/samples/import-named-class/_config.js b/test/function/samples/import-named-class/_config.js index 60ebeda4bf6..c96404ca8c8 100644 --- a/test/function/samples/import-named-class/_config.js +++ b/test/function/samples/import-named-class/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a named class' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/export-named-class diff --git a/test/function/samples/import-named-from-external/_config.js b/test/function/samples/import-named-from-external/_config.js index de235679722..000c289389e 100644 --- a/test/function/samples/import-named-from-external/_config.js +++ b/test/function/samples/import-named-from-external/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports names from an external module', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/import-named-function-as-other/_config.js b/test/function/samples/import-named-function-as-other/_config.js index 6a949fda9a7..1902fdc0c2a 100644 --- a/test/function/samples/import-named-function-as-other/_config.js +++ b/test/function/samples/import-named-function-as-other/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a named function by another name' -}; +}); diff --git a/test/function/samples/import-named-function/_config.js b/test/function/samples/import-named-function/_config.js index 56c1faf6f76..cf3ba361163 100644 --- a/test/function/samples/import-named-function/_config.js +++ b/test/function/samples/import-named-function/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a named function' -}; +}); diff --git a/test/function/samples/import-nameless-class-expression/_config.js b/test/function/samples/import-nameless-class-expression/_config.js index a001faaa2c3..4b489907533 100644 --- a/test/function/samples/import-nameless-class-expression/_config.js +++ b/test/function/samples/import-nameless-class-expression/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a nameless class expression' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/export-class-expression diff --git a/test/function/samples/import-namespace-from-external-module-renamed/_config.js b/test/function/samples/import-namespace-from-external-module-renamed/_config.js index 99b31818dfa..2072ac656f2 100644 --- a/test/function/samples/import-namespace-from-external-module-renamed/_config.js +++ b/test/function/samples/import-namespace-from-external-module-renamed/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a namespace from an external module and renames it', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/import-namespace-from-external-module/_config.js b/test/function/samples/import-namespace-from-external-module/_config.js index 72d81d042e6..24fc2f099d8 100644 --- a/test/function/samples/import-namespace-from-external-module/_config.js +++ b/test/function/samples/import-namespace-from-external-module/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a namespace from an external module', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/import-namespace-from-internal-module-renamed/_config.js b/test/function/samples/import-namespace-from-internal-module-renamed/_config.js index 77f908af9e8..eb32960e7c7 100644 --- a/test/function/samples/import-namespace-from-internal-module-renamed/_config.js +++ b/test/function/samples/import-namespace-from-internal-module-renamed/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly exports x as y inside a bundle' -}; +}); diff --git a/test/function/samples/import-namespace-from-internal-module/_config.js b/test/function/samples/import-namespace-from-internal-module/_config.js index d6d0671ffc4..fc9bacec8e8 100644 --- a/test/function/samples/import-namespace-from-internal-module/_config.js +++ b/test/function/samples/import-namespace-from-internal-module/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a namespace from an internal module' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/namespaces diff --git a/test/function/samples/import-not-at-top-level-fails/_config.js b/test/function/samples/import-not-at-top-level-fails/_config.js index ada39cdee18..b27f40a73ee 100644 --- a/test/function/samples/import-not-at-top-level-fails/_config.js +++ b/test/function/samples/import-not-at-top-level-fails/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'disallows non-top-level imports', error: { cause: { @@ -30,4 +30,4 @@ module.exports = { watchFiles: [ID_MAIN], message: "'import' and 'export' may only appear at the top level" } -}; +}); diff --git a/test/function/samples/import-of-unexported-fails/_config.js b/test/function/samples/import-of-unexported-fails/_config.js index 83b7d1a97ce..95400bc24d3 100644 --- a/test/function/samples/import-of-unexported-fails/_config.js +++ b/test/function/samples/import-of-unexported-fails/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_EMPTY = path.join(__dirname, 'empty.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'marking an imported, but unexported, identifier should throw', error: { binding: 'default', @@ -25,4 +25,4 @@ module.exports = { watchFiles: [ID_EMPTY, ID_MAIN], message: '"default" is not exported by "empty.js", imported by "main.js".' } -}; +}); diff --git a/test/function/samples/import-var-declaration/_config.js b/test/function/samples/import-var-declaration/_config.js index f0f30a4e1c8..05b39fe19b4 100644 --- a/test/function/samples/import-var-declaration/_config.js +++ b/test/function/samples/import-var-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'imports a variable declaration' -}; +}); diff --git a/test/function/samples/imports-are-deconflicted-b/_config.js b/test/function/samples/imports-are-deconflicted-b/_config.js index f89a1b06c1c..5f70992aff6 100644 --- a/test/function/samples/imports-are-deconflicted-b/_config.js +++ b/test/function/samples/imports-are-deconflicted-b/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts imports (redux)', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/imports-are-deconflicted-c/_config.js b/test/function/samples/imports-are-deconflicted-c/_config.js index b33a03f5ce6..fe9f119dc88 100644 --- a/test/function/samples/imports-are-deconflicted-c/_config.js +++ b/test/function/samples/imports-are-deconflicted-c/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts imports, again' -}; +}); diff --git a/test/function/samples/imports-are-deconflicted/_config.js b/test/function/samples/imports-are-deconflicted/_config.js index b6b364ff345..bf746cc2548 100644 --- a/test/function/samples/imports-are-deconflicted/_config.js +++ b/test/function/samples/imports-are-deconflicted/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts imports', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/includes-internally-used-default-export/_config.js b/test/function/samples/includes-internally-used-default-export/_config.js index 3eab34086ad..62b173a492a 100644 --- a/test/function/samples/includes-internally-used-default-export/_config.js +++ b/test/function/samples/includes-internally-used-default-export/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes default exports that are only used internally' -}; +}); diff --git a/test/function/samples/includes-reassignments/_config.js b/test/function/samples/includes-reassignments/_config.js index 1d66654e7d1..29ac4443583 100644 --- a/test/function/samples/includes-reassignments/_config.js +++ b/test/function/samples/includes-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes reassignments that are ignored on an initial pass' -}; +}); diff --git a/test/function/samples/includes-superclass/_config.js b/test/function/samples/includes-superclass/_config.js index 7baf3857813..023343f9b78 100644 --- a/test/function/samples/includes-superclass/_config.js +++ b/test/function/samples/includes-superclass/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes superclass (#932)' -}; +}); diff --git a/test/function/samples/inline-dynamic-imports-bundle/_config.js b/test/function/samples/inline-dynamic-imports-bundle/_config.js index 94df96d2f5a..94b7da54831 100644 --- a/test/function/samples/inline-dynamic-imports-bundle/_config.js +++ b/test/function/samples/inline-dynamic-imports-bundle/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'ignores non-bundled modules when inlining dynamic imports', options: { output: { inlineDynamicImports: true }, @@ -14,4 +14,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/inline-dynamic-no-treeshake/_config.js b/test/function/samples/inline-dynamic-no-treeshake/_config.js index 326238d2f61..015e3b43f09 100644 --- a/test/function/samples/inline-dynamic-no-treeshake/_config.js +++ b/test/function/samples/inline-dynamic-no-treeshake/_config.js @@ -1,6 +1,6 @@ const MAGIC_ENTRY = 'main'; -module.exports = { +module.exports = defineRollupTest({ description: 'handles inlining dynamic imports when treeshaking is disabled for modules (#4098)', options: { input: MAGIC_ENTRY, @@ -26,4 +26,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/inline-imports-with-manual/_config.js b/test/function/samples/inline-imports-with-manual/_config.js index fe0df8a84d6..e5be54ca54d 100644 --- a/test/function/samples/inline-imports-with-manual/_config.js +++ b/test/function/samples/inline-imports-with-manual/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Manual chunks are not supported when inlining dynamic imports', options: { input: ['main.js'], @@ -15,4 +15,4 @@ module.exports = { 'Invalid value for option "output.manualChunks" - this option is not supported for "output.inlineDynamicImports".', url: 'https://rollupjs.org/configuration-options/#output-manualchunks' } -}; +}); diff --git a/test/function/samples/inline-imports-with-multiple-array/_config.js b/test/function/samples/inline-imports-with-multiple-array/_config.js index bbff9c82769..57c205ea934 100644 --- a/test/function/samples/inline-imports-with-multiple-array/_config.js +++ b/test/function/samples/inline-imports-with-multiple-array/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Having multiple inputs in an array is not supported when inlining dynamic imports', options: { input: ['main.js', 'lib.js'], @@ -10,4 +10,4 @@ module.exports = { 'Invalid value for option "output.inlineDynamicImports" - multiple inputs are not supported when "output.inlineDynamicImports" is true.', url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } -}; +}); diff --git a/test/function/samples/inline-imports-with-multiple-object/_config.js b/test/function/samples/inline-imports-with-multiple-object/_config.js index 7cd02ba69e3..adc9cdaf474 100644 --- a/test/function/samples/inline-imports-with-multiple-object/_config.js +++ b/test/function/samples/inline-imports-with-multiple-object/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Having multiple inputs in an object is not supported when inlining dynamic imports', options: { input: { main: 'main.js', lib: 'lib.js' }, @@ -10,4 +10,4 @@ module.exports = { 'Invalid value for option "output.inlineDynamicImports" - multiple inputs are not supported when "output.inlineDynamicImports" is true.', url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } -}; +}); diff --git a/test/function/samples/inlined-dynamic-namespace-compact/_config.js b/test/function/samples/inlined-dynamic-namespace-compact/_config.js index 7a59aab0960..b7f1ca97b3e 100644 --- a/test/function/samples/inlined-dynamic-namespace-compact/_config.js +++ b/test/function/samples/inlined-dynamic-namespace-compact/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'properly resolves inlined dynamic namespaces in compact mode', options: { output: { compact: true } }, exports(exports) { return exports.then(result => assert.strictEqual(result, 42 * 3)); } -}; +}); diff --git a/test/function/samples/input-name-validation/_config.js b/test/function/samples/input-name-validation/_config.js index e080d4098c9..5aa7f4bcc4f 100644 --- a/test/function/samples/input-name-validation/_config.js +++ b/test/function/samples/input-name-validation/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for absolute paths as input names', options: { input: { '/test': 'main.js' } @@ -8,4 +8,4 @@ module.exports = { message: 'Invalid substitution "/test" for placeholder "[name]" in "output.entryFileNames" pattern, can be neither absolute nor relative path.' } -}; +}); diff --git a/test/function/samples/input-name-validation2/_config.js b/test/function/samples/input-name-validation2/_config.js index 66b864ccf6c..56b159f2c18 100644 --- a/test/function/samples/input-name-validation2/_config.js +++ b/test/function/samples/input-name-validation2/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for relative paths as input names', options: { input: { './test': 'main.js' } @@ -8,4 +8,4 @@ module.exports = { message: 'Invalid substitution "./test" for placeholder "[name]" in "output.entryFileNames" pattern, can be neither absolute nor relative path.' } -}; +}); diff --git a/test/function/samples/input-name-validation3/_config.js b/test/function/samples/input-name-validation3/_config.js index 5c40d5fb728..0158d42408c 100644 --- a/test/function/samples/input-name-validation3/_config.js +++ b/test/function/samples/input-name-validation3/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for relative paths as input names', options: { input: { '../test': 'main.js' } @@ -8,4 +8,4 @@ module.exports = { message: 'Invalid substitution "../test" for placeholder "[name]" in "output.entryFileNames" pattern, can be neither absolute nor relative path.' } -}; +}); diff --git a/test/function/samples/instanceof/left-hand-effect/_config.js b/test/function/samples/instanceof/left-hand-effect/_config.js index edadb884deb..cce3575e143 100644 --- a/test/function/samples/instanceof/left-hand-effect/_config.js +++ b/test/function/samples/instanceof/left-hand-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains side effects in the left hand side of instanceof' -}; +}); diff --git a/test/function/samples/instanceof/right-hand-effect/_config.js b/test/function/samples/instanceof/right-hand-effect/_config.js index 466922bcd67..f82459f7dee 100644 --- a/test/function/samples/instanceof/right-hand-effect/_config.js +++ b/test/function/samples/instanceof/right-hand-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains side effects in the right hand side of instanceof' -}; +}); diff --git a/test/function/samples/instanceof/used-parameter/_config.js b/test/function/samples/instanceof/used-parameter/_config.js index 1312a923985..3d2c6be0724 100644 --- a/test/function/samples/instanceof/used-parameter/_config.js +++ b/test/function/samples/instanceof/used-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains instanceof for function parameters' -}; +}); diff --git a/test/function/samples/instanceof/used/_config.js b/test/function/samples/instanceof/used/_config.js index fe5faa35411..2ff79ad83a2 100644 --- a/test/function/samples/instanceof/used/_config.js +++ b/test/function/samples/instanceof/used/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains instanceof if it is true' -}; +}); diff --git a/test/function/samples/inter-chunk-execution-order/_config.js b/test/function/samples/inter-chunk-execution-order/_config.js index c8fe5823947..4984e742b9a 100644 --- a/test/function/samples/inter-chunk-execution-order/_config.js +++ b/test/function/samples/inter-chunk-execution-order/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const execution = { index: 0 }; -module.exports = { +module.exports = defineRollupTest({ description: 'sorts imports between chunks to closely match the actual execution order', context: { execution }, options: { @@ -10,4 +10,4 @@ module.exports = { exports() { assert.equal(execution.index, 4); } -}; +}); diff --git a/test/function/samples/internal-reexports-from-external/_config.js b/test/function/samples/internal-reexports-from-external/_config.js index 7956f81e137..f9a0658afc5 100644 --- a/test/function/samples/internal-reexports-from-external/_config.js +++ b/test/function/samples/internal-reexports-from-external/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const fs = require('node:fs'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports namespaces with external star reexports', options: { external: ['fs', 'path'], @@ -27,4 +27,4 @@ module.exports = { assert.strictEqual(exports.fsOverride.readFileSync, fs.readFileSync); assert.strictEqual(exports.fsOverride.dirname, path.dirname); } -}; +}); diff --git a/test/function/samples/interop-auto-live-bindings/_config.js b/test/function/samples/interop-auto-live-bindings/_config.js index a9b033a4419..a3016f299ab 100644 --- a/test/function/samples/interop-auto-live-bindings/_config.js +++ b/test/function/samples/interop-auto-live-bindings/_config.js @@ -4,7 +4,7 @@ let barCjs = 'bar'; let fooDefault = 'foo'; let barDefault = 'bar'; -module.exports = { +module.exports = defineRollupTest({ description: 'handles interop "auto" with live-bindings support', options: { external: id => id.startsWith('external') || id === 'update', @@ -62,4 +62,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/interop-auto-no-live-bindings/_config.js b/test/function/samples/interop-auto-no-live-bindings/_config.js index 59b9aff39bb..6b58af07863 100644 --- a/test/function/samples/interop-auto-no-live-bindings/_config.js +++ b/test/function/samples/interop-auto-no-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles interop "auto" without live-bindings support', options: { external: id => id.startsWith('external') || id === 'update', @@ -48,4 +48,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/interop-default-conflict/_config.js b/test/function/samples/interop-default-conflict/_config.js index 56becebcb73..e9244ca4ead 100644 --- a/test/function/samples/interop-default-conflict/_config.js +++ b/test/function/samples/interop-default-conflict/_config.js @@ -3,7 +3,7 @@ const assert = require('node:assert'); let bar = 'initial bar'; let defaultValue = 'initial foo'; -module.exports = { +module.exports = defineRollupTest({ description: 'handles conflicts with added interop default variables and supports default live bindings', options: { @@ -39,4 +39,4 @@ module.exports = { external__default: 2 }); } -}; +}); diff --git a/test/function/samples/interop-default-only-named-import/_config.js b/test/function/samples/interop-default-only-named-import/_config.js index 7b74466cbab..264beef3fac 100644 --- a/test/function/samples/interop-default-only-named-import/_config.js +++ b/test/function/samples/interop-default-only-named-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using a named import with interop "defaultOnly"', options: { external: 'external', @@ -13,4 +13,4 @@ module.exports = { message: 'The named export "foo" was imported from the external module "external" even though its interop type is "defaultOnly". Either remove or change this import or change the value of the "output.interop" option.' } -}; +}); diff --git a/test/function/samples/interop-default-only-named-namespace-reexport/_config.js b/test/function/samples/interop-default-only-named-namespace-reexport/_config.js index 458b0256710..f9f2678b8e1 100644 --- a/test/function/samples/interop-default-only-named-namespace-reexport/_config.js +++ b/test/function/samples/interop-default-only-named-namespace-reexport/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows reexporting a namespace as a name when interop is "defaultOnly"', options: { external: 'external', @@ -11,4 +11,4 @@ module.exports = { exports(exports) { assert.deepStrictEqual(exports, { foo: { __proto__: null, default: { external: true } } }); } -}; +}); diff --git a/test/function/samples/interop-default-only-named-reexport/_config.js b/test/function/samples/interop-default-only-named-reexport/_config.js index 8e98270f279..85b5eb54d0e 100644 --- a/test/function/samples/interop-default-only-named-reexport/_config.js +++ b/test/function/samples/interop-default-only-named-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when reexporting a namespace with interop "defaultOnly"', options: { external: 'external', @@ -13,4 +13,4 @@ module.exports = { message: 'The named export "foo" was reexported from the external module "external" even though its interop type is "defaultOnly". Either remove or change this reexport or change the value of the "output.interop" option.' } -}; +}); diff --git a/test/function/samples/interop-default-only-namespace-import/_config.js b/test/function/samples/interop-default-only-namespace-import/_config.js index 754c3628c0b..fd02835cfc8 100644 --- a/test/function/samples/interop-default-only-namespace-import/_config.js +++ b/test/function/samples/interop-default-only-namespace-import/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows importing a namespace when interop is "defaultOnly"', options: { external: 'external', @@ -6,4 +6,4 @@ module.exports = { interop: 'defaultOnly' } } -}; +}); diff --git a/test/function/samples/interop-default-only-namespace-reexport/_config.js b/test/function/samples/interop-default-only-namespace-reexport/_config.js index 9d84671476f..9b033100e1c 100644 --- a/test/function/samples/interop-default-only-namespace-reexport/_config.js +++ b/test/function/samples/interop-default-only-namespace-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns when reexporting a namespace with interop "defaultOnly"', options: { external: 'external', @@ -15,4 +15,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-interop' } ] -}; +}); diff --git a/test/function/samples/interop-default-only/_config.js b/test/function/samples/interop-default-only/_config.js index a1a8529c58e..a7511b7f961 100644 --- a/test/function/samples/interop-default-only/_config.js +++ b/test/function/samples/interop-default-only/_config.js @@ -4,7 +4,7 @@ let barCjs = 'bar'; let fooDefault = 'foo'; let barDefault = 'bar'; -module.exports = { +module.exports = defineRollupTest({ description: 'handles interop "defaultOnly"', options: { external: id => id.startsWith('external') || id === 'update', @@ -62,4 +62,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/interop-default/_config.js b/test/function/samples/interop-default/_config.js index 021c2117d32..33252c147c3 100644 --- a/test/function/samples/interop-default/_config.js +++ b/test/function/samples/interop-default/_config.js @@ -4,7 +4,7 @@ let barCjs = 'bar'; let fooDefault = 'foo'; let barDefault = 'bar'; -module.exports = { +module.exports = defineRollupTest({ description: 'handles interop "default" with live-bindings support', options: { external: id => id.startsWith('external') || id === 'update', @@ -62,4 +62,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/interop-esmodule/_config.js b/test/function/samples/interop-esmodule/_config.js index d901354150c..763e093bdb0 100644 --- a/test/function/samples/interop-esmodule/_config.js +++ b/test/function/samples/interop-esmodule/_config.js @@ -4,7 +4,7 @@ let barCjs = 'bar'; let fooDefault = 'foo'; let barDefault = 'bar'; -module.exports = { +module.exports = defineRollupTest({ description: 'handles interop "esModule" with live-bindings support', options: { external: id => id.startsWith('external') || id === 'update', @@ -64,4 +64,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/invalid-addon-hook/_config.js b/test/function/samples/invalid-addon-hook/_config.js index beb5cdea593..8720d49e17f 100644 --- a/test/function/samples/invalid-addon-hook/_config.js +++ b/test/function/samples/invalid-addon-hook/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when providing a non-string value for an addon hook', options: { plugins: { @@ -10,4 +10,4 @@ module.exports = { message: 'Could not retrieve "intro". Check configuration of plugin "at position 1".\n\tError Message: Error running plugin hook "intro" for plugin "at position 1", expected a string, a function hook or an object with a "handler" string or function.' } -}; +}); diff --git a/test/function/samples/invalid-default-export-mode/_config.js b/test/function/samples/invalid-default-export-mode/_config.js index de89dd3899c..d682f9db7c1 100644 --- a/test/function/samples/invalid-default-export-mode/_config.js +++ b/test/function/samples/invalid-default-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throw for invalid default export mode', options: { output: { @@ -11,4 +11,4 @@ module.exports = { '"default" was specified for "output.exports", but entry module "main.js" has the following exports: "default" and "foo"', url: 'https://rollupjs.org/configuration-options/#output-exports' } -}; +}); diff --git a/test/function/samples/invalid-ignore-list-function/_config.js b/test/function/samples/invalid-ignore-list-function/_config.js index b6d47edd563..fdc15a12619 100644 --- a/test/function/samples/invalid-ignore-list-function/_config.js +++ b/test/function/samples/invalid-ignore-list-function/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throw descriptive error if sourcemapIgnoreList-function does not return a boolean', options: { output: { @@ -14,4 +14,4 @@ module.exports = { code: 'VALIDATION_ERROR', message: 'sourcemapIgnoreList function must return a boolean.' } -}; +}); diff --git a/test/function/samples/invalid-interop/_config.js b/test/function/samples/invalid-interop/_config.js index b341e7dbff6..181cc80f899 100644 --- a/test/function/samples/invalid-interop/_config.js +++ b/test/function/samples/invalid-interop/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid interop values', options: { external: 'external', @@ -12,4 +12,4 @@ module.exports = { 'Invalid value "true" for option "output.interop" - use one of "compat", "auto", "esModule", "default", "defaultOnly".', url: 'https://rollupjs.org/configuration-options/#output-interop' } -}; +}); diff --git a/test/function/samples/invalid-pattern-replacement/_config.js b/test/function/samples/invalid-pattern-replacement/_config.js index 09ec57507ca..a75e72afbca 100644 --- a/test/function/samples/invalid-pattern-replacement/_config.js +++ b/test/function/samples/invalid-pattern-replacement/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid placeholders in patterns', options: { output: { entryFileNames: '[invalid].js' } @@ -7,4 +7,4 @@ module.exports = { code: 'VALIDATION_ERROR', message: '"[invalid]" is not a valid placeholder in the "output.entryFileNames" pattern.' } -}; +}); diff --git a/test/function/samples/invalid-pattern/_config.js b/test/function/samples/invalid-pattern/_config.js index 9fefd4d5be0..55961ef090f 100644 --- a/test/function/samples/invalid-pattern/_config.js +++ b/test/function/samples/invalid-pattern/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid patterns', options: { output: { entryFileNames: '../main.js' } @@ -8,4 +8,4 @@ module.exports = { message: 'Invalid pattern "../main.js" for "output.entryFileNames", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.' } -}; +}); diff --git a/test/function/samples/invalid-property-assignments/_config.js b/test/function/samples/invalid-property-assignments/_config.js index 77c1bcbb785..cf323ac0105 100644 --- a/test/function/samples/invalid-property-assignments/_config.js +++ b/test/function/samples/invalid-property-assignments/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes invalid property assignments', context: { globalOther: 'other' }, options: { @@ -8,4 +8,4 @@ module.exports = { unknownGlobalSideEffects: false } } -}; +}); diff --git a/test/function/samples/invalid-property-calls/_config.js b/test/function/samples/invalid-property-calls/_config.js index b9a1c9c33f3..68014c8566a 100644 --- a/test/function/samples/invalid-property-calls/_config.js +++ b/test/function/samples/invalid-property-calls/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes invalid property calls', context: { globalFirst: 'first', globalOther: 'other' }, options: { @@ -8,4 +8,4 @@ module.exports = { unknownGlobalSideEffects: false } } -}; +}); diff --git a/test/function/samples/invalid-top-level-await/_config.js b/test/function/samples/invalid-top-level-await/_config.js index 182cf1a1a1c..9ce8b2aa36c 100644 --- a/test/function/samples/invalid-top-level-await/_config.js +++ b/test/function/samples/invalid-top-level-await/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid top-level-await format', generateError: { code: 'INVALID_TLA_FORMAT', @@ -9,4 +9,4 @@ module.exports = { message: 'Module format "cjs" does not support top-level await. Use the "es" or "system" output formats rather.' } -}; +}); diff --git a/test/function/samples/invalid-transform-source-function/_config.js b/test/function/samples/invalid-transform-source-function/_config.js index 4e5f4b99d8e..a447b2481b3 100644 --- a/test/function/samples/invalid-transform-source-function/_config.js +++ b/test/function/samples/invalid-transform-source-function/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throw descriptive error if sourcemapPathTransform-function does not return a string (#3484)', options: { @@ -15,4 +15,4 @@ module.exports = { code: 'VALIDATION_ERROR', message: 'sourcemapPathTransform function must return a string.' } -}; +}); diff --git a/test/function/samples/keep-cjs-dynamic-import/_config.js b/test/function/samples/keep-cjs-dynamic-import/_config.js index 3d9a5e0ff86..36950461898 100644 --- a/test/function/samples/keep-cjs-dynamic-import/_config.js +++ b/test/function/samples/keep-cjs-dynamic-import/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'keeps dynamic imports in CJS output by default', options: { external: ['external-esm'] }, async exports({ result }) { @@ -11,4 +11,4 @@ module.exports = { Object.defineProperty(expected, Symbol.toStringTag, { value: 'Module' }); assert.deepStrictEqual(await result, expected); } -}; +}); diff --git a/test/function/samples/keep-used-imports-from-pure-external-modules/_config.js b/test/function/samples/keep-used-imports-from-pure-external-modules/_config.js index 468f4707138..b54b40d7213 100644 --- a/test/function/samples/keep-used-imports-from-pure-external-modules/_config.js +++ b/test/function/samples/keep-used-imports-from-pure-external-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'imports from pure external modules that are used should not be omitted', options: { external: ['warning'], @@ -14,4 +14,4 @@ module.exports = { throw new Error('Unexpected import', id); } } -}; +}); diff --git a/test/function/samples/labeled-statement-conditional-break/_config.js b/test/function/samples/labeled-statement-conditional-break/_config.js index 01c552f861b..e5a4e9a4d01 100644 --- a/test/function/samples/labeled-statement-conditional-break/_config.js +++ b/test/function/samples/labeled-statement-conditional-break/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles conditional control flow due to labeled statements' -}; +}); diff --git a/test/function/samples/legal-import-modification/_config.js b/test/function/samples/legal-import-modification/_config.js index 37928575c6b..58029c62520 100644 --- a/test/function/samples/legal-import-modification/_config.js +++ b/test/function/samples/legal-import-modification/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'assigning to properties of imported bindings is permitted' -}; +}); diff --git a/test/function/samples/legal-suggested-names/_config.js b/test/function/samples/legal-suggested-names/_config.js index d68f4e75b25..06c96bb3229 100644 --- a/test/function/samples/legal-suggested-names/_config.js +++ b/test/function/samples/legal-suggested-names/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'illegal name suggestions are ignored' -}; +}); diff --git a/test/function/samples/load-module-error/buildEnd/_config.js b/test/function/samples/load-module-error/buildEnd/_config.js index 0f3c27d4143..51ff22c84ba 100644 --- a/test/function/samples/load-module-error/buildEnd/_config.js +++ b/test/function/samples/load-module-error/buildEnd/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'buildEnd' } -}; +}); diff --git a/test/function/samples/load-module-error/buildStart/_config.js b/test/function/samples/load-module-error/buildStart/_config.js index 47657147100..0d4cf41a697 100644 --- a/test/function/samples/load-module-error/buildStart/_config.js +++ b/test/function/samples/load-module-error/buildStart/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'buildStart' } -}; +}); diff --git a/test/function/samples/load-module-error/generateBundle/_config.js b/test/function/samples/load-module-error/generateBundle/_config.js index 27ca00e7e9d..238e5a609e1 100644 --- a/test/function/samples/load-module-error/generateBundle/_config.js +++ b/test/function/samples/load-module-error/generateBundle/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'generateBundle' } -}; +}); diff --git a/test/function/samples/load-module-error/load/_config.js b/test/function/samples/load-module-error/load/_config.js index db842763132..1fd437e13c1 100644 --- a/test/function/samples/load-module-error/load/_config.js +++ b/test/function/samples/load-module-error/load/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws when a module cannot be loaded', options: { plugins: [ @@ -26,4 +26,4 @@ module.exports = { plugin: 'test', watchFiles: [path.join(__dirname, 'main.js'), 'broken'] } -}; +}); diff --git a/test/function/samples/load-module-error/renderChunk/_config.js b/test/function/samples/load-module-error/renderChunk/_config.js index 3cf2fb6ad5c..7effb36e1b9 100644 --- a/test/function/samples/load-module-error/renderChunk/_config.js +++ b/test/function/samples/load-module-error/renderChunk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'renderChunk' } -}; +}); diff --git a/test/function/samples/load-module-error/renderStart/_config.js b/test/function/samples/load-module-error/renderStart/_config.js index 5c7f9551f4f..dd2e0519641 100644 --- a/test/function/samples/load-module-error/renderStart/_config.js +++ b/test/function/samples/load-module-error/renderStart/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'renderStart' } -}; +}); diff --git a/test/function/samples/load-module-error/resolveId/_config.js b/test/function/samples/load-module-error/resolveId/_config.js index 640b704e011..20f0cdf0ed7 100644 --- a/test/function/samples/load-module-error/resolveId/_config.js +++ b/test/function/samples/load-module-error/resolveId/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'resolveId' } -}; +}); diff --git a/test/function/samples/load-module-error/transform/_config.js b/test/function/samples/load-module-error/transform/_config.js index 378d7602c05..8e3bdf9933c 100644 --- a/test/function/samples/load-module-error/transform/_config.js +++ b/test/function/samples/load-module-error/transform/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'plugin transform hooks can use `this.error({...}, char)` (#1140)', options: { plugins: [ @@ -30,4 +30,4 @@ module.exports = { ^ ` } -}; +}); diff --git a/test/function/samples/load-resolve-dependencies/_config.js b/test/function/samples/load-resolve-dependencies/_config.js index 941c4e6bdef..709e47cb097 100644 --- a/test/function/samples/load-resolve-dependencies/_config.js +++ b/test/function/samples/load-resolve-dependencies/_config.js @@ -6,7 +6,7 @@ const ID_THIRD = path.join(__dirname, 'third.js'); const DYNAMIC_IMPORT_PROXY_PREFIX = '\0dynamic-import:'; const chunks = []; -module.exports = { +module.exports = defineRollupTest({ description: 'allows to wait for dependency resolution in this.load to scan dependency trees', context: { chunks }, async exports(exports) { @@ -90,4 +90,4 @@ module.exports = { message: 'Circular dependency: second.js -> third.js -> second.js' } ] -}; +}); diff --git a/test/function/samples/load-returns-empty-string/_config.js b/test/function/samples/load-returns-empty-string/_config.js index 206f19d0f8e..03cc33756e4 100644 --- a/test/function/samples/load-returns-empty-string/_config.js +++ b/test/function/samples/load-returns-empty-string/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'loaders are permitted to return the empty string', options: { plugins: [ @@ -18,4 +18,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/load-returns-string-or-null/_config.js b/test/function/samples/load-returns-string-or-null/_config.js index 5e09d3fbe6a..7bc4a8462ba 100644 --- a/test/function/samples/load-returns-string-or-null/_config.js +++ b/test/function/samples/load-returns-string-or-null/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws error if load returns something wacky', options: { plugins: [ @@ -19,4 +19,4 @@ module.exports = { message: 'Error loading "main.js": plugin load hook should return a string, a { code, map } object, or nothing/null.' } -}; +}); diff --git a/test/function/samples/long-path-deopt/_config.js b/test/function/samples/long-path-deopt/_config.js index 37d8fd1f405..f3a702dd506 100644 --- a/test/function/samples/long-path-deopt/_config.js +++ b/test/function/samples/long-path-deopt/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes getting return expression for long property paths' -}; +}); diff --git a/test/function/samples/manual-chunks-conflict/_config.js b/test/function/samples/manual-chunks-conflict/_config.js index 4773d7a0fad..3e6ba986e9b 100644 --- a/test/function/samples/manual-chunks-conflict/_config.js +++ b/test/function/samples/manual-chunks-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Throws for conflicts between manual chunks', options: { input: ['main.js'], @@ -13,4 +13,4 @@ module.exports = { code: 'INVALID_CHUNK', message: 'Cannot assign "dep.js" to the "dep2" chunk as it is already in the "dep1" chunk.' } -}; +}); diff --git a/test/function/samples/manual-chunks-info/_config.js b/test/function/samples/manual-chunks-info/_config.js index 8bbf3c7a25a..604ba8bd5d8 100644 --- a/test/function/samples/manual-chunks-info/_config.js +++ b/test/function/samples/manual-chunks-info/_config.js @@ -6,7 +6,7 @@ function getId(name) { return path.join(__dirname, `${name}.js`); } -module.exports = { +module.exports = defineRollupTest({ description: 'provides additional chunk information to a manualChunks function', options: { external: 'external', @@ -316,4 +316,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/mark-namespace-members/_config.js b/test/function/samples/mark-namespace-members/_config.js index 455a6c6c9e5..673c83cc555 100644 --- a/test/function/samples/mark-namespace-members/_config.js +++ b/test/function/samples/mark-namespace-members/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'marks namespace members' -}; +}); diff --git a/test/function/samples/max-parallel-file-operations/default/_config.js b/test/function/samples/max-parallel-file-operations/default/_config.js index 8917cef5851..ea0b8ab2c2f 100644 --- a/test/function/samples/max-parallel-file-operations/default/_config.js +++ b/test/function/samples/max-parallel-file-operations/default/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileOps not set', before() { fs.readFile = async (path, options) => { @@ -22,4 +22,4 @@ module.exports = { fs.readFile = fsReadFile; assert.strictEqual(maxReads, 5, 'Wrong number of parallel file reads: ' + maxReads); } -}; +}); diff --git a/test/function/samples/max-parallel-file-operations/error/_config.js b/test/function/samples/max-parallel-file-operations/error/_config.js index 055c8228f75..c291b5de73e 100644 --- a/test/function/samples/max-parallel-file-operations/error/_config.js +++ b/test/function/samples/max-parallel-file-operations/error/_config.js @@ -4,7 +4,7 @@ const { loader } = require('../../../../utils.js'); const fsReadFile = fs.readFile; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileOps: fileRead error is forwarded', options: { input: 'main', @@ -28,4 +28,4 @@ module.exports = { message: `Could not load ${join(__dirname, 'dep.js')} (imported by main): broken`, watchFiles: [join(__dirname, 'dep.js'), 'main'] } -}; +}); diff --git a/test/function/samples/max-parallel-file-operations/infinity/_config.js b/test/function/samples/max-parallel-file-operations/infinity/_config.js index 05b62ffe20a..837c3184dbc 100644 --- a/test/function/samples/max-parallel-file-operations/infinity/_config.js +++ b/test/function/samples/max-parallel-file-operations/infinity/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileOps set to infinity', options: { maxParallelFileOps: 0 @@ -25,4 +25,4 @@ module.exports = { fs.readFile = fsReadFile; assert.strictEqual(maxReads, 5, 'Wrong number of parallel file reads: ' + maxReads); } -}; +}); diff --git a/test/function/samples/max-parallel-file-operations/set/_config.js b/test/function/samples/max-parallel-file-operations/set/_config.js index b17b4abc10c..bfed552f07d 100644 --- a/test/function/samples/max-parallel-file-operations/set/_config.js +++ b/test/function/samples/max-parallel-file-operations/set/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileOps set to 3', options: { maxParallelFileOps: 3 @@ -25,4 +25,4 @@ module.exports = { fs.readFile = fsReadFile; assert.strictEqual(maxReads, 3, 'Wrong number of parallel file reads: ' + maxReads); } -}; +}); diff --git a/test/function/samples/max-parallel-file-operations/with-plugin/_config.js b/test/function/samples/max-parallel-file-operations/with-plugin/_config.js index 9d85fcfce8f..1abddd357d0 100644 --- a/test/function/samples/max-parallel-file-operations/with-plugin/_config.js +++ b/test/function/samples/max-parallel-file-operations/with-plugin/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = { +module.exports = defineRollupTest({ description: 'maxParallelFileOps with plugin', options: { maxParallelFileOps: 3, @@ -32,4 +32,4 @@ module.exports = { fs.readFile = fsReadFile; assert.strictEqual(maxReads, 3, 'Wrong number of parallel file reads: ' + maxReads); } -}; +}); diff --git a/test/function/samples/member-expression-assignment-in-function/_config.js b/test/function/samples/member-expression-assignment-in-function/_config.js index 35edb1ab4a5..6a1cc72eda3 100644 --- a/test/function/samples/member-expression-assignment-in-function/_config.js +++ b/test/function/samples/member-expression-assignment-in-function/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'detect side effect in member expression assignment when not top level', code(code) { assert.ok(code.includes('function set(key, value) { foo[key] = value; }'), code); assert.ok(code.includes('set("bar", 2);'), code); assert.ok(code.includes('set("qux", 3);'), code); } -}; +}); diff --git a/test/function/samples/merged-namespace-live-bindings/_config.js b/test/function/samples/merged-namespace-live-bindings/_config.js index 88fda1bf919..b4fce6aeb3c 100644 --- a/test/function/samples/merged-namespace-live-bindings/_config.js +++ b/test/function/samples/merged-namespace-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects getters when accessing properties of an instance', context: { require(id) { @@ -19,4 +19,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/method-call-mutates-this/_config.js b/test/function/samples/method-call-mutates-this/_config.js index 66fe25b0716..a9e611fb247 100644 --- a/test/function/samples/method-call-mutates-this/_config.js +++ b/test/function/samples/method-call-mutates-this/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'method calls are assumed to mutate the owner' -}; +}); diff --git a/test/function/samples/method-call-side-effects/_config.js b/test/function/samples/method-call-side-effects/_config.js index 56b01c9e9e6..b3798c2c48b 100644 --- a/test/function/samples/method-call-side-effects/_config.js +++ b/test/function/samples/method-call-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'assumes methods may mutate objects passed in, and self' -}; +}); diff --git a/test/function/samples/missing-spaces-after-simplification/_config.js b/test/function/samples/missing-spaces-after-simplification/_config.js index 49540bde635..0a3c4dd73e8 100644 --- a/test/function/samples/missing-spaces-after-simplification/_config.js +++ b/test/function/samples/missing-spaces-after-simplification/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handle situations where the simplification of an expression can lead to issues due to missing white-space', options: { treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/function/samples/mixed-external-paths/_config.js b/test/function/samples/mixed-external-paths/_config.js index 813b9de3e9d..1db8169568f 100644 --- a/test/function/samples/mixed-external-paths/_config.js +++ b/test/function/samples/mixed-external-paths/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows using the path option selectively', options: { external: ['dep-a', 'dep-b'], @@ -19,4 +19,4 @@ module.exports = { throw new Error(`Unexpected dependency ${id}`); } } -}; +}); diff --git a/test/function/samples/modify-assumed-global/_config.js b/test/function/samples/modify-assumed-global/_config.js index 4ea98a2cdd5..40b22b513e9 100644 --- a/test/function/samples/modify-assumed-global/_config.js +++ b/test/function/samples/modify-assumed-global/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const Math = {}; -module.exports = { +module.exports = defineRollupTest({ description: 'side-effects to assumed globals are included', context: { Math @@ -11,4 +11,4 @@ module.exports = { assert.equal(Math.square(3), 9); assert.equal(Math.cube(3), 27); } -}; +}); diff --git a/test/function/samples/modify-meta/_config.js b/test/function/samples/modify-meta/_config.js index 3b1a6320615..65db5c50649 100644 --- a/test/function/samples/modify-meta/_config.js +++ b/test/function/samples/modify-meta/_config.js @@ -4,7 +4,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); let initialMeta; -module.exports = { +module.exports = defineRollupTest({ description: 'allows to freely modify moduleInfo.meta and maintain object identity', options: { plugins: [ @@ -63,4 +63,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/modify-object-via-this-a/_config.js b/test/function/samples/modify-object-via-this-a/_config.js index 0c4423de923..1b75dd84020 100644 --- a/test/function/samples/modify-object-via-this-a/_config.js +++ b/test/function/samples/modify-object-via-this-a/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks object modification via "this"' -}; +}); diff --git a/test/function/samples/modify-object-via-this-b/_config.js b/test/function/samples/modify-object-via-this-b/_config.js index 0c4423de923..1b75dd84020 100644 --- a/test/function/samples/modify-object-via-this-b/_config.js +++ b/test/function/samples/modify-object-via-this-b/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks object modification via "this"' -}; +}); diff --git a/test/function/samples/modify-object-via-this-c/_config.js b/test/function/samples/modify-object-via-this-c/_config.js index 0c4423de923..1b75dd84020 100644 --- a/test/function/samples/modify-object-via-this-c/_config.js +++ b/test/function/samples/modify-object-via-this-c/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks object modification via "this"' -}; +}); diff --git a/test/function/samples/modify-object-via-this-d/_config.js b/test/function/samples/modify-object-via-this-d/_config.js index 0c4423de923..1b75dd84020 100644 --- a/test/function/samples/modify-object-via-this-d/_config.js +++ b/test/function/samples/modify-object-via-this-d/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks object modification via "this"' -}; +}); diff --git a/test/function/samples/modify-this-via-getter/deoptimized-props-with-getter/_config.js b/test/function/samples/modify-this-via-getter/deoptimized-props-with-getter/_config.js index d5d93d31690..5f7161b237a 100644 --- a/test/function/samples/modify-this-via-getter/deoptimized-props-with-getter/_config.js +++ b/test/function/samples/modify-this-via-getter/deoptimized-props-with-getter/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles fully deoptimized objects', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/modify-this-via-getter/getter-in-assignment/_config.js b/test/function/samples/modify-this-via-getter/getter-in-assignment/_config.js index 4f3496ac6bc..5d16fb52b8a 100644 --- a/test/function/samples/modify-this-via-getter/getter-in-assignment/_config.js +++ b/test/function/samples/modify-this-via-getter/getter-in-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles known getters that are triggered via an assignment' -}; +}); diff --git a/test/function/samples/modify-this-via-getter/getters-on-this/_config.js b/test/function/samples/modify-this-via-getter/getters-on-this/_config.js index 6b29d1bcdfd..d14379cfe76 100644 --- a/test/function/samples/modify-this-via-getter/getters-on-this/_config.js +++ b/test/function/samples/modify-this-via-getter/getters-on-this/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles calling getters on "this"' -}; +}); diff --git a/test/function/samples/modify-this-via-getter/known-getter/_config.js b/test/function/samples/modify-this-via-getter/known-getter/_config.js index b608017f8e2..b485fdbbe0f 100644 --- a/test/function/samples/modify-this-via-getter/known-getter/_config.js +++ b/test/function/samples/modify-this-via-getter/known-getter/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles known getters that modify "this"' -}; +}); diff --git a/test/function/samples/modify-this-via-getter/known-super-prop/_config.js b/test/function/samples/modify-this-via-getter/known-super-prop/_config.js index a5508ce20b8..a1603bf6659 100644 --- a/test/function/samples/modify-this-via-getter/known-super-prop/_config.js +++ b/test/function/samples/modify-this-via-getter/known-super-prop/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles getters that modify "this" on prototypes for known properties' -}; +}); diff --git a/test/function/samples/modify-this-via-getter/unknown-prop-getter/_config.js b/test/function/samples/modify-this-via-getter/unknown-prop-getter/_config.js index 44d6ebe0fc6..a586f8eede4 100644 --- a/test/function/samples/modify-this-via-getter/unknown-prop-getter/_config.js +++ b/test/function/samples/modify-this-via-getter/unknown-prop-getter/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles unknown getters that modify "this"', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/modify-this-via-getter/unknown-prop-unknown-access/_config.js b/test/function/samples/modify-this-via-getter/unknown-prop-unknown-access/_config.js index f7ad11093ff..e9139e609a0 100644 --- a/test/function/samples/modify-this-via-getter/unknown-prop-unknown-access/_config.js +++ b/test/function/samples/modify-this-via-getter/unknown-prop-unknown-access/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles unknown getters that modify "this" for unknown property access', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/modify-this-via-getter/unknown-property-access/_config.js b/test/function/samples/modify-this-via-getter/unknown-property-access/_config.js index 5b8bf4cebb8..6817e6dc5a9 100644 --- a/test/function/samples/modify-this-via-getter/unknown-property-access/_config.js +++ b/test/function/samples/modify-this-via-getter/unknown-property-access/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles getters that modify "this" for unknown property access', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/modify-this-via-getter/unknown-super-prop/_config.js b/test/function/samples/modify-this-via-getter/unknown-super-prop/_config.js index aadb521b9c2..ede9627fe77 100644 --- a/test/function/samples/modify-this-via-getter/unknown-super-prop/_config.js +++ b/test/function/samples/modify-this-via-getter/unknown-super-prop/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles getters that modify "this" on prototypes for unknown properties', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/modify-this-via-setter/deoptimized-props-with-setter/_config.js b/test/function/samples/modify-this-via-setter/deoptimized-props-with-setter/_config.js index d5d93d31690..5f7161b237a 100644 --- a/test/function/samples/modify-this-via-setter/deoptimized-props-with-setter/_config.js +++ b/test/function/samples/modify-this-via-setter/deoptimized-props-with-setter/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles fully deoptimized objects', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/modify-this-via-setter/known-setter/_config.js b/test/function/samples/modify-this-via-setter/known-setter/_config.js index 449c895ba6d..80ee37e878a 100644 --- a/test/function/samples/modify-this-via-setter/known-setter/_config.js +++ b/test/function/samples/modify-this-via-setter/known-setter/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles known setters that modify "this"' -}; +}); diff --git a/test/function/samples/modify-this-via-setter/known-super-prop/_config.js b/test/function/samples/modify-this-via-setter/known-super-prop/_config.js index 82c65bfeb09..270e6b6a361 100644 --- a/test/function/samples/modify-this-via-setter/known-super-prop/_config.js +++ b/test/function/samples/modify-this-via-setter/known-super-prop/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles setters that modify "this" on prototypes for known properties' -}; +}); diff --git a/test/function/samples/modify-this-via-setter/unknown-prop-setter/_config.js b/test/function/samples/modify-this-via-setter/unknown-prop-setter/_config.js index ada935cacc5..4ab8018bb92 100644 --- a/test/function/samples/modify-this-via-setter/unknown-prop-setter/_config.js +++ b/test/function/samples/modify-this-via-setter/unknown-prop-setter/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles unknown setters that modify "this"', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/modify-this-via-setter/unknown-prop-unknown-access/_config.js b/test/function/samples/modify-this-via-setter/unknown-prop-unknown-access/_config.js index e3522b87aa3..65bd3d2e1bd 100644 --- a/test/function/samples/modify-this-via-setter/unknown-prop-unknown-access/_config.js +++ b/test/function/samples/modify-this-via-setter/unknown-prop-unknown-access/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles unknown setters that modify "this" for unknown property access', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/modify-this-via-setter/unknown-super-prop/_config.js b/test/function/samples/modify-this-via-setter/unknown-super-prop/_config.js index cabfbba9c53..934ee7de7c4 100644 --- a/test/function/samples/modify-this-via-setter/unknown-super-prop/_config.js +++ b/test/function/samples/modify-this-via-setter/unknown-super-prop/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles setters that modify "this" on prototypes for unknown properties', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/module-level-directive/_config.js b/test/function/samples/module-level-directive/_config.js index bb8fd854756..98a7799c30b 100644 --- a/test/function/samples/module-level-directive/_config.js +++ b/test/function/samples/module-level-directive/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'module level directives should produce warnings', warnings: [ { @@ -22,4 +22,4 @@ module.exports = { 3: export default 1;` } ] -}; +}); diff --git a/test/function/samples/module-parsed-hook/_config.js b/test/function/samples/module-parsed-hook/_config.js index 72b0f1e0d4d..1946f7d35e2 100644 --- a/test/function/samples/module-parsed-hook/_config.js +++ b/test/function/samples/module-parsed-hook/_config.js @@ -6,7 +6,7 @@ const parsedModules = []; const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'calls the moduleParsedHook once a module is parsed', options: { plugins: { @@ -134,4 +134,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/module-parsed-imported-ids/_config.js b/test/function/samples/module-parsed-imported-ids/_config.js index 00722e42e23..0a6d7983ba7 100644 --- a/test/function/samples/module-parsed-imported-ids/_config.js +++ b/test/function/samples/module-parsed-imported-ids/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'provides full importedIds and dynamicallyImportedIds in the moduleParsed hook', options: { plugins: [ @@ -28,4 +28,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/module-side-effect-reexport/_config.js b/test/function/samples/module-side-effect-reexport/_config.js index 7d057eec2bd..849bd0b3400 100644 --- a/test/function/samples/module-side-effect-reexport/_config.js +++ b/test/function/samples/module-side-effect-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes side effects of re-exporters unless they have moduleSideEffects: false', options: { plugins: [ @@ -10,4 +10,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/module-side-effects/array/_config.js b/test/function/samples/module-side-effects/array/_config.js index 2d0d94c6fc3..f92d30cff89 100644 --- a/test/function/samples/module-side-effects/array/_config.js +++ b/test/function/samples/module-side-effects/array/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'supports setting module side effects via an array', context: { require(id) { @@ -53,4 +53,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/module-side-effects/external-false/_config.js b/test/function/samples/module-side-effects/external-false/_config.js index 57fbbf10d8a..8115ef32cb9 100644 --- a/test/function/samples/module-side-effects/external-false/_config.js +++ b/test/function/samples/module-side-effects/external-false/_config.js @@ -4,7 +4,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'supports setting module side effects to false for external modules', context: { require(id) { @@ -54,4 +54,4 @@ module.exports = { url: 'https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency' } ] -}; +}); diff --git a/test/function/samples/module-side-effects/global-false/_config.js b/test/function/samples/module-side-effects/global-false/_config.js index 3e139d48e66..6dd1a5d24e2 100644 --- a/test/function/samples/module-side-effects/global-false/_config.js +++ b/test/function/samples/module-side-effects/global-false/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'supports setting module side effects to false for all modules', context: { require(id) { @@ -37,4 +37,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/module-side-effects/invalid-option/_config.js b/test/function/samples/module-side-effects/invalid-option/_config.js index 9509eafdb73..7fa29e8302e 100644 --- a/test/function/samples/module-side-effects/invalid-option/_config.js +++ b/test/function/samples/module-side-effects/invalid-option/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns for invalid options', options: { treeshake: { @@ -11,4 +11,4 @@ module.exports = { 'Invalid value for option "treeshake.moduleSideEffects" - please use one of false, "no-external", a function or an array.', url: 'https://rollupjs.org/configuration-options/#treeshake-modulesideeffects' } -}; +}); diff --git a/test/function/samples/module-side-effects/load/_config.js b/test/function/samples/module-side-effects/load/_config.js index cb81b6ed80a..f51b7d9036a 100644 --- a/test/function/samples/module-side-effects/load/_config.js +++ b/test/function/samples/module-side-effects/load/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'handles setting moduleSideEffects in the load hook', context: { sideEffects @@ -41,4 +41,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/module-side-effects/reexport-from-external/_config.js b/test/function/samples/module-side-effects/reexport-from-external/_config.js index 7f5ae2cbea4..1368cda215a 100644 --- a/test/function/samples/module-side-effects/reexport-from-external/_config.js +++ b/test/function/samples/module-side-effects/reexport-from-external/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles reexporting external values when module side-effects are false', context: { require(id) { @@ -21,4 +21,4 @@ module.exports = { moduleSideEffects: false } } -}; +}); diff --git a/test/function/samples/module-side-effects/reexports/_config.js b/test/function/samples/module-side-effects/reexports/_config.js index de396cc1eb0..9b69404f32f 100644 --- a/test/function/samples/module-side-effects/reexports/_config.js +++ b/test/function/samples/module-side-effects/reexports/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'handles reexporting values when module side-effects are false', context: { sideEffects @@ -14,4 +14,4 @@ module.exports = { moduleSideEffects: false } } -}; +}); diff --git a/test/function/samples/module-side-effects/resolve-id-external/_config.js b/test/function/samples/module-side-effects/resolve-id-external/_config.js index d56f083fd40..034bb519478 100644 --- a/test/function/samples/module-side-effects/resolve-id-external/_config.js +++ b/test/function/samples/module-side-effects/resolve-id-external/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const sideEffects = []; const { getObject } = require('../../../../utils'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not include modules without used exports if moduleSideEffect is false', context: { require(id) { @@ -82,4 +82,4 @@ module.exports = { assert.strictEqual(warning.code, 'UNUSED_EXTERNAL_IMPORT'); } } -}; +}); diff --git a/test/function/samples/module-side-effects/resolve-id/_config.js b/test/function/samples/module-side-effects/resolve-id/_config.js index fdd7927489f..fbb8d5f72c1 100644 --- a/test/function/samples/module-side-effects/resolve-id/_config.js +++ b/test/function/samples/module-side-effects/resolve-id/_config.js @@ -4,7 +4,7 @@ const { getObject } = require('../../../../utils'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'does not include modules without used exports if moduleSideEffect is false', context: { sideEffects @@ -86,4 +86,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/module-side-effects/transform/_config.js b/test/function/samples/module-side-effects/transform/_config.js index a6af08f31cf..0cfa5ebfe7e 100644 --- a/test/function/samples/module-side-effects/transform/_config.js +++ b/test/function/samples/module-side-effects/transform/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'handles setting moduleSideEffects in the transform hook', context: { sideEffects @@ -69,4 +69,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/module-side-effects/writable/_config.js b/test/function/samples/module-side-effects/writable/_config.js index 1a21c1ee4a4..f2b945161fc 100644 --- a/test/function/samples/module-side-effects/writable/_config.js +++ b/test/function/samples/module-side-effects/writable/_config.js @@ -3,7 +3,7 @@ const POLYFILL_ID = '\0polyfill'; const PROXY_SUFFIX = '?inject-polyfill-proxy'; -module.exports = { +module.exports = defineRollupTest({ description: 'ModuleInfo.moduleSideEffects should be writable during build time', options: { treeshake: { moduleSideEffects: false }, @@ -66,4 +66,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/module-sort-order/_config.js b/test/function/samples/module-sort-order/_config.js index 9b7f002d0d3..79090ed69e5 100644 --- a/test/function/samples/module-sort-order/_config.js +++ b/test/function/samples/module-sort-order/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'module sorter is not confused by top-level call expressions' -}; +}); diff --git a/test/function/samples/module-tree/_config.js b/test/function/samples/module-tree/_config.js index dc987119efa..d57af7d7c44 100644 --- a/test/function/samples/module-tree/_config.js +++ b/test/function/samples/module-tree/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'bundle.modules includes dependencies (#903)', bundle(bundle) { const modules = bundle.cache.modules.map(module => ({ @@ -39,4 +39,4 @@ module.exports = { names: ['main'] } ] -}; +}); diff --git a/test/function/samples/name-conflict-object/_config.js b/test/function/samples/name-conflict-object/_config.js index 24501c04295..ee8f7f8aad2 100644 --- a/test/function/samples/name-conflict-object/_config.js +++ b/test/function/samples/name-conflict-object/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'avoids name conflicts with local variables named Object', options: { external: 'external', @@ -17,4 +17,4 @@ module.exports = { assert.strictEqual(exports.foo.foo, 'foo'); assert.strictEqual(exports.foo.default.foo, 'foo'); } -}; +}); diff --git a/test/function/samples/name-conflict-promise/_config.js b/test/function/samples/name-conflict-promise/_config.js index baa6dad3472..bc3596713d6 100644 --- a/test/function/samples/name-conflict-promise/_config.js +++ b/test/function/samples/name-conflict-promise/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'avoids name conflicts with local variables named Promise', async exports(exports) { assert.strictEqual(exports.Promise, 'bar'); assert.strictEqual((await exports.promised).Promise, 'foo'); } -}; +}); diff --git a/test/function/samples/name-conflict-symbol/_config.js b/test/function/samples/name-conflict-symbol/_config.js index 8f3ecadeff8..2e021c02fa0 100644 --- a/test/function/samples/name-conflict-symbol/_config.js +++ b/test/function/samples/name-conflict-symbol/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'avoids name conflicts with local variables named Symbol', options: { output: { @@ -11,4 +11,4 @@ module.exports = { assert.strictEqual(exports.Symbol, null); assert.strictEqual(exports.toString(), '[object Module]'); } -}; +}); diff --git a/test/function/samples/named-external-method-in-prototype/_config.js b/test/function/samples/named-external-method-in-prototype/_config.js index bb26af2864c..b1d5501a2c7 100644 --- a/test/function/samples/named-external-method-in-prototype/_config.js +++ b/test/function/samples/named-external-method-in-prototype/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'method of external named import used inside prototype method (#68)', context: { // override require here, making "foo" appear as a global module @@ -12,4 +12,4 @@ module.exports = { options: { external: ['bar'] } -}; +}); diff --git a/test/function/samples/namespace-keys-are-sorted/_config.js b/test/function/samples/namespace-keys-are-sorted/_config.js index 0e48cf4e368..aa453cd30eb 100644 --- a/test/function/samples/namespace-keys-are-sorted/_config.js +++ b/test/function/samples/namespace-keys-are-sorted/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'supports sorted namespace keys' -}; +}); diff --git a/test/function/samples/namespace-literal-value/_config.js b/test/function/samples/namespace-literal-value/_config.js index 8ad52a0cd78..3869242edad 100644 --- a/test/function/samples/namespace-literal-value/_config.js +++ b/test/function/samples/namespace-literal-value/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not simplify accessing unknown properties from namespaces', exports({ isNull }) { assert.strictEqual(isNull('a'), true); assert.strictEqual(isNull('b'), false); } -}; +}); diff --git a/test/function/samples/namespace-member-side-effects/assignment/_config.js b/test/function/samples/namespace-member-side-effects/assignment/_config.js index 21a61ce1cf2..c7ba5fa8e28 100644 --- a/test/function/samples/namespace-member-side-effects/assignment/_config.js +++ b/test/function/samples/namespace-member-side-effects/assignment/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'checks side effects when reassigning namespace members', options: { treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/function/samples/namespace-member-side-effects/call/_config.js b/test/function/samples/namespace-member-side-effects/call/_config.js index 379e790ec86..c9d9ca9d31e 100644 --- a/test/function/samples/namespace-member-side-effects/call/_config.js +++ b/test/function/samples/namespace-member-side-effects/call/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'checks side effects when calling a namespace', options: { treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/function/samples/namespace-member-side-effects/member-call/_config.js b/test/function/samples/namespace-member-side-effects/member-call/_config.js index 5bb38b65bd7..1c3cb0ab100 100644 --- a/test/function/samples/namespace-member-side-effects/member-call/_config.js +++ b/test/function/samples/namespace-member-side-effects/member-call/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects side effects when namespace members are called' -}; +}); diff --git a/test/function/samples/namespace-member-side-effects/missing-access/_config.js b/test/function/samples/namespace-member-side-effects/missing-access/_config.js index 918d8568f1e..d2680d73fbc 100644 --- a/test/function/samples/namespace-member-side-effects/missing-access/_config.js +++ b/test/function/samples/namespace-member-side-effects/missing-access/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects side effects when accessing missing namespace members', options: { treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/function/samples/namespace-member-side-effects/unknown-access/_config.js b/test/function/samples/namespace-member-side-effects/unknown-access/_config.js index ca30e0cb585..0370e32d52d 100644 --- a/test/function/samples/namespace-member-side-effects/unknown-access/_config.js +++ b/test/function/samples/namespace-member-side-effects/unknown-access/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respects side effects when accessing unknown namespace members', options: { external: ['external'], treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/function/samples/namespace-missing-export/_config.js b/test/function/samples/namespace-missing-export/_config.js index 2fda1374d59..2fc56078ce9 100644 --- a/test/function/samples/namespace-missing-export/_config.js +++ b/test/function/samples/namespace-missing-export/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_EMPTY = path.join(__dirname, 'empty.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'replaces missing namespace members with undefined and warns about them', warnings: [ { @@ -25,4 +25,4 @@ module.exports = { ^` } ] -}; +}); diff --git a/test/function/samples/namespace-override/_config.js b/test/function/samples/namespace-override/_config.js index e8fd15a1f05..581ef99f4c3 100644 --- a/test/function/samples/namespace-override/_config.js +++ b/test/function/samples/namespace-override/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not warn when overriding namespace reexports with explicit ones' -}; +}); diff --git a/test/function/samples/namespace-reassign-import-fails/_config.js b/test/function/samples/namespace-reassign-import-fails/_config.js index 0a94bdf085c..8cb09b94db1 100644 --- a/test/function/samples/namespace-reassign-import-fails/_config.js +++ b/test/function/samples/namespace-reassign-import-fails/_config.js @@ -4,7 +4,7 @@ const { assertIncludes } = require('../../../utils.js'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns for reassignments to namespace exports', code(code) { assertIncludes(code, 'foo = 2'); @@ -67,6 +67,6 @@ module.exports = { runtimeError(error) { assert.strictEqual(error.message, 'Assignment to constant variable.'); } -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/namespace-reassign-import-fails diff --git a/test/function/samples/namespace-tostring/dynamic-import-default-mode/_config.js b/test/function/samples/namespace-tostring/dynamic-import-default-mode/_config.js index 1eb89a23f4a..75508156f5b 100644 --- a/test/function/samples/namespace-tostring/dynamic-import-default-mode/_config.js +++ b/test/function/samples/namespace-tostring/dynamic-import-default-mode/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', options: { @@ -15,4 +15,4 @@ module.exports = { assert.strictEqual(Object.prototype.toString.call(foo), '[object Module]'); assert.strictEqual(foo.default, 42); } -}; +}); diff --git a/test/function/samples/namespace-tostring/dynamic-import/_config.js b/test/function/samples/namespace-tostring/dynamic-import/_config.js index 4aed81c65a9..9b06740e5c0 100644 --- a/test/function/samples/namespace-tostring/dynamic-import/_config.js +++ b/test/function/samples/namespace-tostring/dynamic-import/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to dynamic imports', options: { output: { @@ -18,4 +18,4 @@ module.exports = { assert.strictEqual(Object.prototype.toString.call(copied), '[object Object]'); assert.strictEqual(copied[Symbol.toStringTag], undefined); } -}; +}); diff --git a/test/function/samples/namespace-tostring/entry-default/_config.js b/test/function/samples/namespace-tostring/entry-default/_config.js index e4c1791fc8b..c4e4b386223 100644 --- a/test/function/samples/namespace-tostring/entry-default/_config.js +++ b/test/function/samples/namespace-tostring/entry-default/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not add Symbol.toStringTag property to entry chunks with default export mode', options: { output: { @@ -13,4 +13,4 @@ module.exports = { assert.strictEqual(Object.prototype.toString.call(exports), '[object Object]'); assert.strictEqual(exports.foo, 42); } -}; +}); diff --git a/test/function/samples/namespace-tostring/entry-named/_config.js b/test/function/samples/namespace-tostring/entry-named/_config.js index 93a5a4c2072..629c5ddcb34 100644 --- a/test/function/samples/namespace-tostring/entry-named/_config.js +++ b/test/function/samples/namespace-tostring/entry-named/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to entry chunks with named exports', options: { output: { @@ -18,4 +18,4 @@ module.exports = { assert.strictEqual(Object.prototype.toString.call(copied), '[object Object]'); assert.strictEqual(copied[Symbol.toStringTag], undefined); } -}; +}); diff --git a/test/function/samples/namespace-tostring/external-namespaces/_config.js b/test/function/samples/namespace-tostring/external-namespaces/_config.js index ea2e29dfe04..1ff06d11eaf 100644 --- a/test/function/samples/namespace-tostring/external-namespaces/_config.js +++ b/test/function/samples/namespace-tostring/external-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to external namespaces', options: { external(id) { @@ -29,4 +29,4 @@ module.exports = { return { foo: 42 }; } } -}; +}); diff --git a/test/function/samples/namespace-tostring/inlined-namespace/_config.js b/test/function/samples/namespace-tostring/inlined-namespace/_config.js index 4e489178028..34c95be1857 100644 --- a/test/function/samples/namespace-tostring/inlined-namespace/_config.js +++ b/test/function/samples/namespace-tostring/inlined-namespace/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds Symbol.toStringTag property to inlined namespaces', options: { output: { generatedCode: { symbols: true } } } -}; +}); diff --git a/test/function/samples/namespace-tostring/interop-property-descriptor/_config.js b/test/function/samples/namespace-tostring/interop-property-descriptor/_config.js index 0aa022a9925..5d34a5d1a3e 100644 --- a/test/function/samples/namespace-tostring/interop-property-descriptor/_config.js +++ b/test/function/samples/namespace-tostring/interop-property-descriptor/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'generated interop namespaces should have correct Symbol.toStringTag', context: { require() { @@ -16,4 +16,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/namespace-tostring/property-descriptor/_config.js b/test/function/samples/namespace-tostring/property-descriptor/_config.js index fd8251ad12d..7a10631e006 100644 --- a/test/function/samples/namespace-tostring/property-descriptor/_config.js +++ b/test/function/samples/namespace-tostring/property-descriptor/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'namespace export should have @@toStringTag with correct property descriptors #4336', options: { output: { generatedCode: { symbols: true } } } -}; +}); diff --git a/test/function/samples/namespace-update-import-fails/_config.js b/test/function/samples/namespace-update-import-fails/_config.js index e03bf89bb28..f6c427625bb 100644 --- a/test/function/samples/namespace-update-import-fails/_config.js +++ b/test/function/samples/namespace-update-import-fails/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const { assertIncludes } = require('../../../utils.js'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'disallows updates to namespace exports', code(code) { assertIncludes(code, 'foo++'); @@ -29,6 +29,6 @@ module.exports = { runtimeError(error) { assert.strictEqual(error.message, 'Assignment to constant variable.'); } -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/namespace-update-import-fails diff --git a/test/function/samples/namespaces-are-frozen/_config.js b/test/function/samples/namespaces-are-frozen/_config.js index 891965e91f6..919051385b4 100644 --- a/test/function/samples/namespaces-are-frozen/_config.js +++ b/test/function/samples/namespaces-are-frozen/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'namespaces should be non-extensible and its properties immutatable and non-configurable', @@ -19,7 +19,7 @@ module.exports = { mutate(ns); }); } -}; +}); function extend(object) { 'use strict'; diff --git a/test/function/samples/namespaces-have-null-prototype/_config.js b/test/function/samples/namespaces-have-null-prototype/_config.js index d64597e0b9f..08a9d4afaac 100644 --- a/test/function/samples/namespaces-have-null-prototype/_config.js +++ b/test/function/samples/namespaces-have-null-prototype/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates namespaces with null prototypes' -}; +}); diff --git a/test/function/samples/namespacing-collisions-2/_config.js b/test/function/samples/namespacing-collisions-2/_config.js index 6c17bcfc876..6e1b82a682e 100644 --- a/test/function/samples/namespacing-collisions-2/_config.js +++ b/test/function/samples/namespacing-collisions-2/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly namespaces when using * exports, take two (#910)', exports(exports) { assert.deepEqual(exports, ['Material', 'MaterialAgain', 'Something', 'SomethingAgain']); } -}; +}); diff --git a/test/function/samples/namespacing-collisions/_config.js b/test/function/samples/namespacing-collisions/_config.js index cc6eeba6aa7..34ff766153c 100644 --- a/test/function/samples/namespacing-collisions/_config.js +++ b/test/function/samples/namespacing-collisions/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly namespaces when using * exports (#910)', exports(exports) { assert.deepStrictEqual(exports, ['Material', 'Something']); } -}; +}); diff --git a/test/function/samples/namespacing-in-sub-functions/_config.js b/test/function/samples/namespacing-in-sub-functions/_config.js index 2c984d987bd..b16770c4cc4 100644 --- a/test/function/samples/namespacing-in-sub-functions/_config.js +++ b/test/function/samples/namespacing-in-sub-functions/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly namespaces sub-functions (#910)', exports(exports) { assert.equal(exports, 'foobar'); } -}; +}); diff --git a/test/function/samples/nested-and-async-plugin/_config.js b/test/function/samples/nested-and-async-plugin/_config.js index 414bab3cf72..6a5515cd4cb 100644 --- a/test/function/samples/nested-and-async-plugin/_config.js +++ b/test/function/samples/nested-and-async-plugin/_config.js @@ -15,10 +15,10 @@ const pluginB = Promise.resolve({ } }); -module.exports = { +module.exports = defineRollupTest({ description: 'works when nested plugin', options: { // eslint-disable-next-line no-sparse-arrays plugins: [[Promise.resolve(pluginA)], [undefined, Promise.resolve([null])], ,] } -}; +}); diff --git a/test/function/samples/nested-foreach/_config.js b/test/function/samples/nested-foreach/_config.js index 5ef1bc6afe3..590a0af3a3f 100644 --- a/test/function/samples/nested-foreach/_config.js +++ b/test/function/samples/nested-foreach/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'detects side-effects in nested .forEach calls (#3533)', exports: exports => assert.strictEqual(exports.result, 9) -}; +}); diff --git a/test/function/samples/nested-inlined-dynamic-import-1/_config.js b/test/function/samples/nested-inlined-dynamic-import-1/_config.js index 377d3c43e4b..f6010d56c43 100644 --- a/test/function/samples/nested-inlined-dynamic-import-1/_config.js +++ b/test/function/samples/nested-inlined-dynamic-import-1/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts variables when nested dynamic imports are inlined via inlineDynamicImports', options: { @@ -9,4 +9,4 @@ module.exports = { exports(exports) { return exports().then(result => assert.strictEqual(result, 43)); } -}; +}); diff --git a/test/function/samples/nested-inlined-dynamic-import-2/_config.js b/test/function/samples/nested-inlined-dynamic-import-2/_config.js index 6b77e36a93f..ea06c16938c 100644 --- a/test/function/samples/nested-inlined-dynamic-import-2/_config.js +++ b/test/function/samples/nested-inlined-dynamic-import-2/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_LIB1 = path.join(__dirname, 'lib1.js'); const ID_LIB2 = path.join(__dirname, 'lib2.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts variables when nested dynamic imports are inlined', warnings: [ { @@ -15,4 +15,4 @@ module.exports = { exports(exports) { return exports().then(result => assert.strictEqual(result, 43)); } -}; +}); diff --git a/test/function/samples/nested-namespace-member-expression/_config.js b/test/function/samples/nested-namespace-member-expression/_config.js index df019ed1c45..ad7cea11060 100644 --- a/test/function/samples/nested-namespace-member-expression/_config.js +++ b/test/function/samples/nested-namespace-member-expression/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles accessing members of namespaces correctly', exports(exports) { assert.strictEqual(exports, false); } -}; +}); diff --git a/test/function/samples/nested-property-call-performance/_config.js b/test/function/samples/nested-property-call-performance/_config.js index 31df4ed7615..2ed2a52c3ef 100644 --- a/test/function/samples/nested-property-call-performance/_config.js +++ b/test/function/samples/nested-property-call-performance/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles nested property calls with acceptable performance' -}; +}); diff --git a/test/function/samples/new-target-meta/_config.js b/test/function/samples/new-target-meta/_config.js index 3f2fb6ea8fb..c7ed494aab9 100644 --- a/test/function/samples/new-target-meta/_config.js +++ b/test/function/samples/new-target-meta/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not change new.target usages' -}; +}); diff --git a/test/function/samples/newline-after-comment/_config.js b/test/function/samples/newline-after-comment/_config.js index 658abe5c263..01aac33eae8 100644 --- a/test/function/samples/newline-after-comment/_config.js +++ b/test/function/samples/newline-after-comment/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'inserts newline after comment', exports(exports) { assert.equal(exports(), 42); } -}; +}); diff --git a/test/function/samples/no-external-live-bindings-compact/_config.js b/test/function/samples/no-external-live-bindings-compact/_config.js index 665849c4f47..9a46a24e581 100644 --- a/test/function/samples/no-external-live-bindings-compact/_config.js +++ b/test/function/samples/no-external-live-bindings-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Allows omitting the code that handles external live bindings', options: { external: () => true, @@ -35,4 +35,4 @@ module.exports = { }) ); } -}; +}); diff --git a/test/function/samples/no-external-live-bindings/_config.js b/test/function/samples/no-external-live-bindings/_config.js index 42d4a8a6bde..446a9ab09d7 100644 --- a/test/function/samples/no-external-live-bindings/_config.js +++ b/test/function/samples/no-external-live-bindings/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Allows omitting the code that handles external live bindings', options: { external: () => true, @@ -34,4 +34,4 @@ module.exports = { }) ); } -}; +}); diff --git a/test/function/samples/no-imports/_config.js b/test/function/samples/no-imports/_config.js index be6c448555e..f0fa4c62268 100644 --- a/test/function/samples/no-imports/_config.js +++ b/test/function/samples/no-imports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'creates a bundle from a module with no imports' -}; +}); diff --git a/test/function/samples/no-relative-external/_config.js b/test/function/samples/no-relative-external/_config.js index cff5507aa2c..72911b7e769 100644 --- a/test/function/samples/no-relative-external/_config.js +++ b/test/function/samples/no-relative-external/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'missing relative imports are an error, not a warning', error: { code: 'UNRESOLVED_IMPORT', @@ -10,4 +10,4 @@ module.exports = { watchFiles: [ID_MAIN], message: 'Could not resolve "./missing.js" from "main.js"' } -}; +}); diff --git a/test/function/samples/non-extension-dot/_config.js b/test/function/samples/non-extension-dot/_config.js index 3f29d797da9..77f338f8039 100644 --- a/test/function/samples/non-extension-dot/_config.js +++ b/test/function/samples/non-extension-dot/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds .js to module paths with non-extension dots in them' -}; +}); diff --git a/test/function/samples/non-function-hook-async/_config.js b/test/function/samples/non-function-hook-async/_config.js index 800df0aaa90..806243313ec 100644 --- a/test/function/samples/non-function-hook-async/_config.js +++ b/test/function/samples/non-function-hook-async/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when providing a value for an async function hook', options: { plugins: { @@ -12,4 +12,4 @@ module.exports = { 'Error running plugin hook "resolveId" for plugin "at position 1", expected a function hook or an object with a "handler" function.', plugin: 'at position 1' } -}; +}); diff --git a/test/function/samples/non-function-hook-sync/_config.js b/test/function/samples/non-function-hook-sync/_config.js index 78f9af86212..e0da651f595 100644 --- a/test/function/samples/non-function-hook-sync/_config.js +++ b/test/function/samples/non-function-hook-sync/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when providing a value for a sync function hook', options: { plugins: { @@ -12,4 +12,4 @@ module.exports = { 'Error running plugin hook "outputOptions" for plugin "at position 1", expected a function hook or an object with a "handler" function.', plugin: 'at position 1' } -}; +}); diff --git a/test/function/samples/non-js-extensions/_config.js b/test/function/samples/non-js-extensions/_config.js index b83a8751be0..d8b974b20af 100644 --- a/test/function/samples/non-js-extensions/_config.js +++ b/test/function/samples/non-js-extensions/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'non .js extensions are preserved', options: { plugins: [ @@ -13,4 +13,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/object-deep-access-effect/_config.js b/test/function/samples/object-deep-access-effect/_config.js index 458e437cea9..267c308dcde 100644 --- a/test/function/samples/object-deep-access-effect/_config.js +++ b/test/function/samples/object-deep-access-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when an nested property of an unknown object property is accessed', context: { require() { @@ -8,4 +8,4 @@ module.exports = { options: { external: ['external'] } -}; +}); diff --git a/test/function/samples/object-destructuring-renaming/_config.js b/test/function/samples/object-destructuring-renaming/_config.js index c5baa0f7f26..60de63b8e0d 100644 --- a/test/function/samples/object-destructuring-renaming/_config.js +++ b/test/function/samples/object-destructuring-renaming/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'renaming destructured object properties should request the correct property (#527)', exports(exports) { assert.equal(exports.env, process.env); } -}; +}); diff --git a/test/function/samples/object-dynamic-properties/_config.js b/test/function/samples/object-dynamic-properties/_config.js index 1bcd2fa3611..c0af78c6b77 100644 --- a/test/function/samples/object-dynamic-properties/_config.js +++ b/test/function/samples/object-dynamic-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'dynamic object assignments should be imported' -}; +}); diff --git a/test/function/samples/object-expression-shadowed-properties/_config.js b/test/function/samples/object-expression-shadowed-properties/_config.js index 96c70b08662..d2369b66f20 100644 --- a/test/function/samples/object-expression-shadowed-properties/_config.js +++ b/test/function/samples/object-expression-shadowed-properties/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not remove calls to object expression methods that may have side-effects when properties may be shadowed', context: { unknownA: 'a', unknownB: 'b' } -}; +}); diff --git a/test/function/samples/object-properties/_config.js b/test/function/samples/object-properties/_config.js index 46d096af44a..cea7a01faac 100644 --- a/test/function/samples/object-properties/_config.js +++ b/test/function/samples/object-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes object properties in definitions' -}; +}); diff --git a/test/function/samples/object-prototype-properties/_config.js b/test/function/samples/object-prototype-properties/_config.js index 258727cc3bb..228d870660e 100644 --- a/test/function/samples/object-prototype-properties/_config.js +++ b/test/function/samples/object-prototype-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles names conflicting with Object.prototype properties' -}; +}); diff --git a/test/function/samples/object-spread-side-effect/_config.js b/test/function/samples/object-spread-side-effect/_config.js index bf01828fab0..4e5d8ebd85c 100644 --- a/test/function/samples/object-spread-side-effect/_config.js +++ b/test/function/samples/object-spread-side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'triggers getter side effects when spreading objects' -}; +}); diff --git a/test/function/samples/optional-catch-binding/_config.js b/test/function/samples/optional-catch-binding/_config.js index 2c4566b70f5..bd8914c0a25 100644 --- a/test/function/samples/optional-catch-binding/_config.js +++ b/test/function/samples/optional-catch-binding/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows optional catch binding with appropriate acorn settings', exports(exports) { assert.equal(exports.foo, true); } -}; +}); diff --git a/test/function/samples/optional-chaining-side-effect/_config.js b/test/function/samples/optional-chaining-side-effect/_config.js index 99be03b8def..3f3f1038e84 100644 --- a/test/function/samples/optional-chaining-side-effect/_config.js +++ b/test/function/samples/optional-chaining-side-effect/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles side effects in optional chaining (#4806)', exports({ get, set }) { set(['test']); assert.strictEqual(get('test'), 't'); } -}; +}); diff --git a/test/function/samples/options-async-hook/_config.js b/test/function/samples/options-async-hook/_config.js index 78bb869f19f..7af90619598 100644 --- a/test/function/samples/options-async-hook/_config.js +++ b/test/function/samples/options-async-hook/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { promises: fs } = require('node:fs'); -module.exports = { +module.exports = defineRollupTest({ description: 'resolves promises between sequential options hooks', options: { input: 'super-unused', @@ -28,4 +28,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/options-hook/_config.js b/test/function/samples/options-hook/_config.js index 60ac9ec0e00..283394fbe12 100644 --- a/test/function/samples/options-hook/_config.js +++ b/test/function/samples/options-hook/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows to read and modify options in the options hook', options: { input: 'unused', @@ -51,4 +51,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/options-in-renderstart/_config.js b/test/function/samples/options-in-renderstart/_config.js index 3d7049e2b16..c6c6b0edc00 100644 --- a/test/function/samples/options-in-renderstart/_config.js +++ b/test/function/samples/options-in-renderstart/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const checkedOptions = []; -module.exports = { +module.exports = defineRollupTest({ description: 'makes input and output options available in renderStart', options: { context: 'global', @@ -30,4 +30,4 @@ module.exports = { 'global' ]); } -}; +}); diff --git a/test/function/samples/output-options-hook/_config.js b/test/function/samples/output-options-hook/_config.js index d4083e94e07..b7e3a4a40e6 100644 --- a/test/function/samples/output-options-hook/_config.js +++ b/test/function/samples/output-options-hook/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows to read and modify options in the options hook', exports(exports) { assert.deepStrictEqual(exports, { @@ -76,4 +76,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/override-external-namespace/_config.js b/test/function/samples/override-external-namespace/_config.js index a3116ed463a..cb736f3f813 100644 --- a/test/function/samples/override-external-namespace/_config.js +++ b/test/function/samples/override-external-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows overriding imports of external namespace reexports', options: { external: 'path' @@ -13,4 +13,4 @@ module.exports = { exports.reassign(); assert.strictEqual(exports.resolve, 'defined'); } -}; +}); diff --git a/test/function/samples/override-static-external-namespace/_config.js b/test/function/samples/override-static-external-namespace/_config.js index 320f89f1e5e..b4f5e6e4aef 100644 --- a/test/function/samples/override-static-external-namespace/_config.js +++ b/test/function/samples/override-static-external-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows overriding imports of external namespace reexports without external live-bindings', options: { @@ -17,4 +17,4 @@ module.exports = { exports.reassign(); assert.strictEqual(exports.resolve, 'defined'); } -}; +}); diff --git a/test/function/samples/parameter-defaults/arrays/_config.js b/test/function/samples/parameter-defaults/arrays/_config.js index 22ea9b87836..f92e447619a 100644 --- a/test/function/samples/parameter-defaults/arrays/_config.js +++ b/test/function/samples/parameter-defaults/arrays/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps parameter defaults for array elements' -}; +}); diff --git a/test/function/samples/parameter-defaults/class-fields/_config.js b/test/function/samples/parameter-defaults/class-fields/_config.js index 88efb89a967..957b98f82c0 100644 --- a/test/function/samples/parameter-defaults/class-fields/_config.js +++ b/test/function/samples/parameter-defaults/class-fields/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps parameter defaults for class fields' -}; +}); diff --git a/test/function/samples/parameter-defaults/exported/_config.js b/test/function/samples/parameter-defaults/exported/_config.js index a58bbadeced..5f892fd74de 100644 --- a/test/function/samples/parameter-defaults/exported/_config.js +++ b/test/function/samples/parameter-defaults/exported/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes default parameters for exported functions', exports({ funDecl, funExp, arrow }) { assert.strictEqual(funDecl(), 'defaultValue', 'function declaration'); assert.strictEqual(funExp(), 'defaultValue', 'function expression'); assert.strictEqual(arrow(), 'defaultValue', 'arrow function'); } -}; +}); diff --git a/test/function/samples/parameter-defaults/function-as-default/_config.js b/test/function/samples/parameter-defaults/function-as-default/_config.js index 5a1f0628785..831f48b9d18 100644 --- a/test/function/samples/parameter-defaults/function-as-default/_config.js +++ b/test/function/samples/parameter-defaults/function-as-default/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes functions supplied as default values' -}; +}); diff --git a/test/function/samples/parameter-defaults/function-return/_config.js b/test/function/samples/parameter-defaults/function-return/_config.js index d9edae38255..d0cb38a8b83 100644 --- a/test/function/samples/parameter-defaults/function-return/_config.js +++ b/test/function/samples/parameter-defaults/function-return/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks parameter defaults for returned functions' -}; +}); diff --git a/test/function/samples/parameter-defaults/logical-expressions/_config.js b/test/function/samples/parameter-defaults/logical-expressions/_config.js index 69d69853719..b5ac742e500 100644 --- a/test/function/samples/parameter-defaults/logical-expressions/_config.js +++ b/test/function/samples/parameter-defaults/logical-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes default parameters in logical expressios' -}; +}); diff --git a/test/function/samples/parameter-defaults/module-side-effects/_config.js b/test/function/samples/parameter-defaults/module-side-effects/_config.js index 39e073d8c7d..b08b44b5bf4 100644 --- a/test/function/samples/parameter-defaults/module-side-effects/_config.js +++ b/test/function/samples/parameter-defaults/module-side-effects/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not tree-shake necessary parameter defaults when modulesSideEffects are disabled', options: { treeshake: { moduleSideEffects: false } } -}; +}); diff --git a/test/function/samples/parameter-defaults/objects/_config.js b/test/function/samples/parameter-defaults/objects/_config.js index d0715d225bc..1f1845a75f6 100644 --- a/test/function/samples/parameter-defaults/objects/_config.js +++ b/test/function/samples/parameter-defaults/objects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps parameter defaults for methods in objects' -}; +}); diff --git a/test/function/samples/parameter-defaults/return-expressions/_config.js b/test/function/samples/parameter-defaults/return-expressions/_config.js index 3f3dcca5c3b..fc248ff4082 100644 --- a/test/function/samples/parameter-defaults/return-expressions/_config.js +++ b/test/function/samples/parameter-defaults/return-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps parameter defaults for returned expressions' -}; +}); diff --git a/test/function/samples/parameter-defaults/super-classes/_config.js b/test/function/samples/parameter-defaults/super-classes/_config.js index 290793fd4de..ed6a8b43ef9 100644 --- a/test/function/samples/parameter-defaults/super-classes/_config.js +++ b/test/function/samples/parameter-defaults/super-classes/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps parameter defaults for super classes' -}; +}); diff --git a/test/function/samples/parameter-defaults/tagged-templates/_config.js b/test/function/samples/parameter-defaults/tagged-templates/_config.js index 6e2f4a704b6..a655623dae3 100644 --- a/test/function/samples/parameter-defaults/tagged-templates/_config.js +++ b/test/function/samples/parameter-defaults/tagged-templates/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'includes necessary default parameters for tagged template literals' -}; +}); diff --git a/test/function/samples/parameter-defaults/try-catch/_config.js b/test/function/samples/parameter-defaults/try-catch/_config.js index 6bc80c6b7e9..715224a818c 100644 --- a/test/function/samples/parameter-defaults/try-catch/_config.js +++ b/test/function/samples/parameter-defaults/try-catch/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'keeps parameter defaults when called from try-statement' -}; +}); diff --git a/test/function/samples/parameter-side-effects/_config.js b/test/function/samples/parameter-side-effects/_config.js index a2379c5f5c8..ffbcb85b414 100644 --- a/test/function/samples/parameter-side-effects/_config.js +++ b/test/function/samples/parameter-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'retains calls with parameter side effects' -}; +}); diff --git a/test/function/samples/parenthesised-default-export/_config.js b/test/function/samples/parenthesised-default-export/_config.js index 65de328c187..53e4eeec41d 100644 --- a/test/function/samples/parenthesised-default-export/_config.js +++ b/test/function/samples/parenthesised-default-export/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows default exports to be enclosed in parentheses' -}; +}); diff --git a/test/function/samples/pass-namespace-to-function/_config.js b/test/function/samples/pass-namespace-to-function/_config.js index d93fddb6e6b..229a74d3a2a 100644 --- a/test/function/samples/pass-namespace-to-function/_config.js +++ b/test/function/samples/pass-namespace-to-function/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows a namespace to be passed to a function' -}; +}); diff --git a/test/function/samples/paths-are-case-sensitive/_config.js b/test/function/samples/paths-are-case-sensitive/_config.js index fffd9454364..f02f5b5556d 100644 --- a/test/function/samples/paths-are-case-sensitive/_config.js +++ b/test/function/samples/paths-are-case-sensitive/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'insists on correct casing for imports', error: { code: 'UNRESOLVED_IMPORT', @@ -10,4 +10,4 @@ module.exports = { watchFiles: [ID_MAIN], message: 'Could not resolve "./foo.js" from "main.js"' } -}; +}); diff --git a/test/function/samples/per-output-plugins-warn-hooks/_config.js b/test/function/samples/per-output-plugins-warn-hooks/_config.js index 446269bb422..a584756abc1 100644 --- a/test/function/samples/per-output-plugins-warn-hooks/_config.js +++ b/test/function/samples/per-output-plugins-warn-hooks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns when input hooks are used in output plugins', options: { output: { @@ -74,4 +74,4 @@ module.exports = { 'The "buildStart" hook used by the output plugin at output position 2 is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.' } ] -}; +}); diff --git a/test/function/samples/perf-adds-plugin-context-to-plugins/_config.js b/test/function/samples/perf-adds-plugin-context-to-plugins/_config.js index 92b0d0fddb7..721d5c01a59 100644 --- a/test/function/samples/perf-adds-plugin-context-to-plugins/_config.js +++ b/test/function/samples/perf-adds-plugin-context-to-plugins/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Adds plugin context to plugins with perf=true', options: { perf: true, @@ -24,4 +24,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/perf-supports-object-hooks/_config.js b/test/function/samples/perf-supports-object-hooks/_config.js index 84e0155413e..e665f0366b3 100644 --- a/test/function/samples/perf-supports-object-hooks/_config.js +++ b/test/function/samples/perf-supports-object-hooks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Supports object hooks with perf=true', options: { perf: true, @@ -13,4 +13,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/plugin-cache/anonymous-delete/_config.js b/test/function/samples/plugin-cache/anonymous-delete/_config.js index 8d9a9ef6e1a..99f47d675de 100644 --- a/test/function/samples/plugin-cache/anonymous-delete/_config.js +++ b/test/function/samples/plugin-cache/anonymous-delete/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for anonymous plugins deleting from the cache', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { plugin: 'at position 1', pluginCode: 'ANONYMOUS_PLUGIN_CACHE' } -}; +}); diff --git a/test/function/samples/plugin-cache/anonymous-get/_config.js b/test/function/samples/plugin-cache/anonymous-get/_config.js index 9a25655aa12..d2a913f0e1f 100644 --- a/test/function/samples/plugin-cache/anonymous-get/_config.js +++ b/test/function/samples/plugin-cache/anonymous-get/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for anonymous plugins reading the cache', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { plugin: 'at position 1', pluginCode: 'ANONYMOUS_PLUGIN_CACHE' } -}; +}); diff --git a/test/function/samples/plugin-cache/anonymous-has/_config.js b/test/function/samples/plugin-cache/anonymous-has/_config.js index f6d37f0485e..a6721785259 100644 --- a/test/function/samples/plugin-cache/anonymous-has/_config.js +++ b/test/function/samples/plugin-cache/anonymous-has/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for anonymous plugins checking the cache', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { plugin: 'at position 1', pluginCode: 'ANONYMOUS_PLUGIN_CACHE' } -}; +}); diff --git a/test/function/samples/plugin-cache/anonymous-set/_config.js b/test/function/samples/plugin-cache/anonymous-set/_config.js index c12e533586c..31b44a3b4ee 100644 --- a/test/function/samples/plugin-cache/anonymous-set/_config.js +++ b/test/function/samples/plugin-cache/anonymous-set/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for anonymous plugins adding to the cache', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { plugin: 'at position 1', pluginCode: 'ANONYMOUS_PLUGIN_CACHE' } -}; +}); diff --git a/test/function/samples/plugin-cache/duplicate-names-no-cache/_config.js b/test/function/samples/plugin-cache/duplicate-names-no-cache/_config.js index 780240d100b..1407865f154 100644 --- a/test/function/samples/plugin-cache/duplicate-names-no-cache/_config.js +++ b/test/function/samples/plugin-cache/duplicate-names-no-cache/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows plugins to have the same name if they do not access the cache', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/plugin-cache/duplicate-names/_config.js b/test/function/samples/plugin-cache/duplicate-names/_config.js index bf9f5a7af39..4f6d841f64d 100644 --- a/test/function/samples/plugin-cache/duplicate-names/_config.js +++ b/test/function/samples/plugin-cache/duplicate-names/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws if two plugins with the same name and no cache key access the cache', options: { plugins: [ @@ -24,4 +24,4 @@ module.exports = { plugin: 'test-plugin', pluginCode: 'DUPLICATE_PLUGIN_NAME' } -}; +}); diff --git a/test/function/samples/plugin-error-loc-instead-pos/_config.js b/test/function/samples/plugin-error-loc-instead-pos/_config.js index a1f33e5ae6d..9e961138ef2 100644 --- a/test/function/samples/plugin-error-loc-instead-pos/_config.js +++ b/test/function/samples/plugin-error-loc-instead-pos/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: '`this.error(...)` accepts { line, column } object as second parameter (#1265)', options: { plugins: [ @@ -29,4 +29,4 @@ module.exports = { ^ ` } -}; +}); diff --git a/test/function/samples/plugin-error-module-parsed/_config.js b/test/function/samples/plugin-error-module-parsed/_config.js index 81f0f542ec6..e1e9cec3b32 100644 --- a/test/function/samples/plugin-error-module-parsed/_config.js +++ b/test/function/samples/plugin-error-module-parsed/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'errors in moduleParsed abort the build', options: { plugins: [ @@ -19,4 +19,4 @@ module.exports = { plugin: 'testPlugin', watchFiles: [path.join(__dirname, 'main.js')] } -}; +}); diff --git a/test/function/samples/plugin-error-only-first-render-chunk/_config.js b/test/function/samples/plugin-error-only-first-render-chunk/_config.js index 00579cfa684..26b82ddc220 100644 --- a/test/function/samples/plugin-error-only-first-render-chunk/_config.js +++ b/test/function/samples/plugin-error-only-first-render-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws error only with first plugin renderChunk', options: { plugins: [ @@ -22,4 +22,4 @@ module.exports = { hook: 'renderChunk', message: `Something happened 1` } -}; +}); diff --git a/test/function/samples/plugin-error-only-first-transform/_config.js b/test/function/samples/plugin-error-only-first-transform/_config.js index 64a343ff699..b8830a124b4 100644 --- a/test/function/samples/plugin-error-only-first-transform/_config.js +++ b/test/function/samples/plugin-error-only-first-transform/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws error only with first plugin transform', options: { plugins: [ @@ -26,4 +26,4 @@ module.exports = { id: path.join(__dirname, 'main.js'), watchFiles: [path.join(__dirname, 'main.js')] } -}; +}); diff --git a/test/function/samples/plugin-error-should-transform/_config.js b/test/function/samples/plugin-error-should-transform/_config.js index 69372cfd53a..572669f7d97 100644 --- a/test/function/samples/plugin-error-should-transform/_config.js +++ b/test/function/samples/plugin-error-should-transform/_config.js @@ -4,7 +4,7 @@ const acorn = require('acorn'); const code = 'export default 42;\n'; const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'errors in shouldTransformCachedModule abort the build', options: { cache: { @@ -41,4 +41,4 @@ module.exports = { plugin: 'test', watchFiles: [ID_MAIN] } -}; +}); diff --git a/test/function/samples/plugin-error/buildEnd/_config.js b/test/function/samples/plugin-error/buildEnd/_config.js index 0f3c27d4143..51ff22c84ba 100644 --- a/test/function/samples/plugin-error/buildEnd/_config.js +++ b/test/function/samples/plugin-error/buildEnd/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'buildEnd' } -}; +}); diff --git a/test/function/samples/plugin-error/buildStart/_config.js b/test/function/samples/plugin-error/buildStart/_config.js index 47657147100..0d4cf41a697 100644 --- a/test/function/samples/plugin-error/buildStart/_config.js +++ b/test/function/samples/plugin-error/buildStart/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'buildStart' } -}; +}); diff --git a/test/function/samples/plugin-error/generateBundle/_config.js b/test/function/samples/plugin-error/generateBundle/_config.js index 27ca00e7e9d..238e5a609e1 100644 --- a/test/function/samples/plugin-error/generateBundle/_config.js +++ b/test/function/samples/plugin-error/generateBundle/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'generateBundle' } -}; +}); diff --git a/test/function/samples/plugin-error/load/_config.js b/test/function/samples/plugin-error/load/_config.js index 6f6ed0b8a1a..5f25731c9ef 100644 --- a/test/function/samples/plugin-error/load/_config.js +++ b/test/function/samples/plugin-error/load/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -19,4 +19,4 @@ module.exports = { hook: 'load', watchFiles: [path.join(__dirname, 'main.js')] } -}; +}); diff --git a/test/function/samples/plugin-error/renderChunk/_config.js b/test/function/samples/plugin-error/renderChunk/_config.js index 3cf2fb6ad5c..7effb36e1b9 100644 --- a/test/function/samples/plugin-error/renderChunk/_config.js +++ b/test/function/samples/plugin-error/renderChunk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'renderChunk' } -}; +}); diff --git a/test/function/samples/plugin-error/renderStart/_config.js b/test/function/samples/plugin-error/renderStart/_config.js index 5c7f9551f4f..dd2e0519641 100644 --- a/test/function/samples/plugin-error/renderStart/_config.js +++ b/test/function/samples/plugin-error/renderStart/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'renderStart' } -}; +}); diff --git a/test/function/samples/plugin-error/resolveId/_config.js b/test/function/samples/plugin-error/resolveId/_config.js index 640b704e011..20f0cdf0ed7 100644 --- a/test/function/samples/plugin-error/resolveId/_config.js +++ b/test/function/samples/plugin-error/resolveId/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { message: 'nope', hook: 'resolveId' } -}; +}); diff --git a/test/function/samples/plugin-error/transform/_config.js b/test/function/samples/plugin-error/transform/_config.js index 378d7602c05..8e3bdf9933c 100644 --- a/test/function/samples/plugin-error/transform/_config.js +++ b/test/function/samples/plugin-error/transform/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'plugin transform hooks can use `this.error({...}, char)` (#1140)', options: { plugins: [ @@ -30,4 +30,4 @@ module.exports = { ^ ` } -}; +}); diff --git a/test/function/samples/plugin-module-information-early-access/_config.js b/test/function/samples/plugin-module-information-early-access/_config.js index 334f7941f0b..9d69f53c744 100644 --- a/test/function/samples/plugin-module-information-early-access/_config.js +++ b/test/function/samples/plugin-module-information-early-access/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles accessing module information via plugins early in a graceful way', options: { external: ['path'], @@ -16,4 +16,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/plugin-module-information-no-cache/_config.js b/test/function/samples/plugin-module-information-no-cache/_config.js index 70ed68986c3..b84b8e87f36 100644 --- a/test/function/samples/plugin-module-information-no-cache/_config.js +++ b/test/function/samples/plugin-module-information-no-cache/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles accessing module information via plugins with cache disabled', options: { cache: false, @@ -62,4 +62,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/plugin-module-information/_config.js b/test/function/samples/plugin-module-information/_config.js index 907d4343b97..c63b1bf1231 100644 --- a/test/function/samples/plugin-module-information/_config.js +++ b/test/function/samples/plugin-module-information/_config.js @@ -9,7 +9,7 @@ const ID_PATH = 'path'; let rendered = false; -module.exports = { +module.exports = defineRollupTest({ description: 'provides module information on the plugin context', options: { external: ['path'], @@ -451,4 +451,4 @@ module.exports = { bundle() { assert.ok(rendered); } -}; +}); diff --git a/test/function/samples/plugin-parse-ast-receives-comments/_config.js b/test/function/samples/plugin-parse-ast-receives-comments/_config.js index 8339f2fb1e1..e8d91032219 100644 --- a/test/function/samples/plugin-parse-ast-receives-comments/_config.js +++ b/test/function/samples/plugin-parse-ast-receives-comments/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const comments = []; -module.exports = { +module.exports = defineRollupTest({ description: 'plugin parse ast receives comments', options: { plugins: [ @@ -21,4 +21,4 @@ module.exports = { after() { assert.ok(comments.length > 0); } -}; +}); diff --git a/test/function/samples/plugin-parse-ast-remove-sourcemapping/_config.js b/test/function/samples/plugin-parse-ast-remove-sourcemapping/_config.js index b1d441bd5ae..b72807fcca5 100644 --- a/test/function/samples/plugin-parse-ast-remove-sourcemapping/_config.js +++ b/test/function/samples/plugin-parse-ast-remove-sourcemapping/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'remove source mapping comment even if code is parsed by PluginContext.parse method', options: { plugins: [ @@ -15,4 +15,4 @@ module.exports = { code(code) { assert.ok(code.search(/sourceMappingURL/) === -1); } -}; +}); diff --git a/test/function/samples/plugin-parse/_config.js b/test/function/samples/plugin-parse/_config.js index 051c389f087..097f59b51f3 100644 --- a/test/function/samples/plugin-parse/_config.js +++ b/test/function/samples/plugin-parse/_config.js @@ -1,6 +1,6 @@ const MagicString = require('magic-string'); -module.exports = { +module.exports = defineRollupTest({ description: 'plugin transform hooks can use `this.parse(code, options)`', options: { plugins: [ @@ -14,7 +14,7 @@ module.exports = { } ] } -}; +}); function enforceTheAnswer(ast, magicString) { for (const node of ast.body) { diff --git a/test/function/samples/plugin-warn-loc-instead-pos/_config.js b/test/function/samples/plugin-warn-loc-instead-pos/_config.js index 6815e2055e2..7f58e70d324 100644 --- a/test/function/samples/plugin-warn-loc-instead-pos/_config.js +++ b/test/function/samples/plugin-warn-loc-instead-pos/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: '`this.warn(...)` accepts { line, column } object as second parameter (#1265)', options: { plugins: [ @@ -31,4 +31,4 @@ module.exports = { ` } ] -}; +}); diff --git a/test/function/samples/plugin-warn/_config.js b/test/function/samples/plugin-warn/_config.js index 27e708a5a5a..4065152e570 100644 --- a/test/function/samples/plugin-warn/_config.js +++ b/test/function/samples/plugin-warn/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'plugin transform hooks can use `this.warn({...}, char)` (#1140)', options: { plugins: [ @@ -41,4 +41,4 @@ module.exports = { ` } ] -}; +}); diff --git a/test/function/samples/plugins-can-manipulate-options/_config.js b/test/function/samples/plugins-can-manipulate-options/_config.js index 23ad9ec78b0..3b5e91d705b 100644 --- a/test/function/samples/plugins-can-manipulate-options/_config.js +++ b/test/function/samples/plugins-can-manipulate-options/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'plugins can manipulate the options object', options: { plugins: [ @@ -15,4 +15,4 @@ module.exports = { exports(answer) { assert.equal(answer, 42); } -}; +}); diff --git a/test/function/samples/preload-after-build/_config.js b/test/function/samples/preload-after-build/_config.js index 11faa824341..38e49b24048 100644 --- a/test/function/samples/preload-after-build/_config.js +++ b/test/function/samples/preload-after-build/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports this.load() in buildEnd and renderStart', options: { plugins: [ @@ -20,4 +20,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/preload-cyclic-module/_config.js b/test/function/samples/preload-cyclic-module/_config.js index b647a8dca59..5ee213ed4de 100644 --- a/test/function/samples/preload-cyclic-module/_config.js +++ b/test/function/samples/preload-cyclic-module/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_PROXY = path.join(__dirname, 'main.js?proxy'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles pre-loading a cyclic module in the resolveId hook', warnings: [ { @@ -37,4 +37,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/preload-loading-module/_config.js b/test/function/samples/preload-loading-module/_config.js index 8891fd910aa..2a1c50c31eb 100644 --- a/test/function/samples/preload-loading-module/_config.js +++ b/test/function/samples/preload-loading-module/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); let preloadedCode; -module.exports = { +module.exports = defineRollupTest({ description: 'waits for pre-loaded modules that are currently loading', options: { plugins: [ @@ -17,4 +17,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/preload-module/_config.js b/test/function/samples/preload-module/_config.js index 1be7b15cdb9..9d4d0d992c0 100644 --- a/test/function/samples/preload-module/_config.js +++ b/test/function/samples/preload-module/_config.js @@ -8,7 +8,7 @@ const loadedModules = []; const transformedModules = []; const parsedModules = []; -module.exports = { +module.exports = defineRollupTest({ description: 'allows pre-loading modules via this.load', options: { plugins: [ @@ -105,4 +105,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/preserve-for-of-iterable/_config.js b/test/function/samples/preserve-for-of-iterable/_config.js index d2105b0c09a..b33cebaa6e4 100644 --- a/test/function/samples/preserve-for-of-iterable/_config.js +++ b/test/function/samples/preserve-for-of-iterable/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves for...of loops' -}; +}); diff --git a/test/function/samples/preserve-modules-circular-order/_config.js b/test/function/samples/preserve-modules-circular-order/_config.js index a5b879af247..d087f3c548c 100644 --- a/test/function/samples/preserve-modules-circular-order/_config.js +++ b/test/function/samples/preserve-modules-circular-order/_config.js @@ -5,7 +5,7 @@ const ID_DATA = path.join(__dirname, 'data.js'); const ID_TAG = path.join(__dirname, 'tag.js'); const executionOrder = []; -module.exports = { +module.exports = defineRollupTest({ description: 'preserves execution order for circular dependencies when preserving modules', options: { output: { preserveModules: true } @@ -38,4 +38,4 @@ module.exports = { message: 'Circular dependency: tag.js -> index.js -> tag.js' } ] -}; +}); diff --git a/test/function/samples/preserve-modules-default-mode-namespace/_config.js b/test/function/samples/preserve-modules-default-mode-namespace/_config.js index bac148bbb2d..fbe8e968a22 100644 --- a/test/function/samples/preserve-modules-default-mode-namespace/_config.js +++ b/test/function/samples/preserve-modules-default-mode-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'import namespace from chunks with default export mode when preserving modules', options: { input: ['main', 'lib'], @@ -11,4 +11,4 @@ module.exports = { exports(exports) { assert.deepStrictEqual(exports, { lib: { __proto__: null, default: 'foo' } }); } -}; +}); diff --git a/test/function/samples/preserve-modules/inline-dynamic-imports/_config.js b/test/function/samples/preserve-modules/inline-dynamic-imports/_config.js index 602b68b8840..f58460ada68 100644 --- a/test/function/samples/preserve-modules/inline-dynamic-imports/_config.js +++ b/test/function/samples/preserve-modules/inline-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Inlining dynamic imports is not supported when preserving modules', options: { input: ['main.js'], @@ -13,4 +13,4 @@ module.exports = { 'Invalid value for option "output.inlineDynamicImports" - this option is not supported for "output.preserveModules".', url: 'https://rollupjs.org/configuration-options/#output-inlinedynamicimports' } -}; +}); diff --git a/test/function/samples/preserve-modules/invalid-default-export-mode/_config.js b/test/function/samples/preserve-modules/invalid-default-export-mode/_config.js index 5e3d7bb35c9..a256a9e28e3 100644 --- a/test/function/samples/preserve-modules/invalid-default-export-mode/_config.js +++ b/test/function/samples/preserve-modules/invalid-default-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using default export mode with named exports', options: { input: ['main.js'], @@ -13,4 +13,4 @@ module.exports = { '"default" was specified for "output.exports", but entry module "lib.js" has the following exports: "value"', url: 'https://rollupjs.org/configuration-options/#output-exports' } -}; +}); diff --git a/test/function/samples/preserve-modules/invalid-no-preserve-entry-signatures/_config.js b/test/function/samples/preserve-modules/invalid-no-preserve-entry-signatures/_config.js index c992c00ef3b..be7bf6a01a0 100644 --- a/test/function/samples/preserve-modules/invalid-no-preserve-entry-signatures/_config.js +++ b/test/function/samples/preserve-modules/invalid-no-preserve-entry-signatures/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when setting preserveEntrySignatures to false', options: { input: ['main.js'], @@ -11,4 +11,4 @@ module.exports = { 'Invalid value for option "preserveEntrySignatures" - setting this option to false is not supported for "output.preserveModules".', url: 'https://rollupjs.org/configuration-options/#preserveentrysignatures' } -}; +}); diff --git a/test/function/samples/preserve-modules/invalid-none-export-mode/_config.js b/test/function/samples/preserve-modules/invalid-none-export-mode/_config.js index 59ad7a17c87..299228ebea7 100644 --- a/test/function/samples/preserve-modules/invalid-none-export-mode/_config.js +++ b/test/function/samples/preserve-modules/invalid-none-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws when using none export mode with named exports', options: { input: ['main.js'], @@ -13,4 +13,4 @@ module.exports = { '"none" was specified for "output.exports", but entry module "lib.js" has the following exports: "value"', url: 'https://rollupjs.org/configuration-options/#output-exports' } -}; +}); diff --git a/test/function/samples/preserve-modules/manual-chunks/_config.js b/test/function/samples/preserve-modules/manual-chunks/_config.js index cae5edd2cda..51fd43adc8a 100644 --- a/test/function/samples/preserve-modules/manual-chunks/_config.js +++ b/test/function/samples/preserve-modules/manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Assigning manual chunks fails when preserving modules', options: { input: ['main.js'], @@ -15,4 +15,4 @@ module.exports = { 'Invalid value for option "output.manualChunks" - this option is not supported for "output.preserveModules".', url: 'https://rollupjs.org/configuration-options/#output-manualchunks' } -}; +}); diff --git a/test/function/samples/preserve-modules/mixed-exports/_config.js b/test/function/samples/preserve-modules/mixed-exports/_config.js index b2acf6ec5bc..8ef37964527 100644 --- a/test/function/samples/preserve-modules/mixed-exports/_config.js +++ b/test/function/samples/preserve-modules/mixed-exports/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB1 = path.join(__dirname, 'lib1.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns for mixed exports in all chunks when preserving modules', options: { input: ['main.js'], @@ -24,4 +24,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-exports' } ] -}; +}); diff --git a/test/function/samples/preserve-modules/virtual-modules-conflict/_config.js b/test/function/samples/preserve-modules/virtual-modules-conflict/_config.js index 847a2fd9e62..da99df0d072 100644 --- a/test/function/samples/preserve-modules/virtual-modules-conflict/_config.js +++ b/test/function/samples/preserve-modules/virtual-modules-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { plugins: [ @@ -27,4 +27,4 @@ module.exports = { ) ); } -}; +}); diff --git a/test/function/samples/preserve-modules/virtual-modules/_config.js b/test/function/samples/preserve-modules/virtual-modules/_config.js index 435c86e7cc9..8a15b22e179 100644 --- a/test/function/samples/preserve-modules/virtual-modules/_config.js +++ b/test/function/samples/preserve-modules/virtual-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { plugins: [ @@ -27,4 +27,4 @@ module.exports = { ) ); } -}; +}); diff --git a/test/function/samples/preserve-symlink/_config.js b/test/function/samples/preserve-symlink/_config.js index fa45ed5f2e8..abc9f8c9d15 100644 --- a/test/function/samples/preserve-symlink/_config.js +++ b/test/function/samples/preserve-symlink/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ skip: process.platform === 'win32', description: 'follows symlinks', options: { preserveSymlinks: true } -}; +}); diff --git a/test/function/samples/preserves-catch-argument/_config.js b/test/function/samples/preserves-catch-argument/_config.js index 3ce74663a22..80905337c7f 100644 --- a/test/function/samples/preserves-catch-argument/_config.js +++ b/test/function/samples/preserves-catch-argument/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not replace argument to catch block (#1462)', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/preserves-default-exports-used-locally/_config.js b/test/function/samples/preserves-default-exports-used-locally/_config.js index 98c090b8cb2..fdc38985eac 100644 --- a/test/function/samples/preserves-default-exports-used-locally/_config.js +++ b/test/function/samples/preserves-default-exports-used-locally/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves default exports that are only used locally (#984)' -}; +}); diff --git a/test/function/samples/preserves-function-expression-names/_config.js b/test/function/samples/preserves-function-expression-names/_config.js index a0c61816916..181d3d721c7 100644 --- a/test/function/samples/preserves-function-expression-names/_config.js +++ b/test/function/samples/preserves-function-expression-names/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not rewrite function expression names incorrectly (#1083)', options: { external: ['path'] @@ -9,4 +9,4 @@ module.exports = { assert.ok(!/path/.test(exports.x.name)); assert.equal(exports.y, 'somefile.txt'); } -}; +}); diff --git a/test/function/samples/preserves-var-declarations-in-dead-branches/_config.js b/test/function/samples/preserves-var-declarations-in-dead-branches/_config.js index e0f687ef8fe..55301996a21 100644 --- a/test/function/samples/preserves-var-declarations-in-dead-branches/_config.js +++ b/test/function/samples/preserves-var-declarations-in-dead-branches/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves var declarations in dead branches (#977)' -}; +}); diff --git a/test/function/samples/prevent-asi-with-line-comments/_config.js b/test/function/samples/prevent-asi-with-line-comments/_config.js index d711fe77c68..daa566739d8 100644 --- a/test/function/samples/prevent-asi-with-line-comments/_config.js +++ b/test/function/samples/prevent-asi-with-line-comments/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'prevent semicolon insertion for return statements when there are line comments', exports(exports) { assert.strictEqual(exports(), 1); } -}; +}); diff --git a/test/function/samples/prevent-context-resolve-loop/_config.js b/test/function/samples/prevent-context-resolve-loop/_config.js index 4dd4b7f024f..9a6d0916da5 100644 --- a/test/function/samples/prevent-context-resolve-loop/_config.js +++ b/test/function/samples/prevent-context-resolve-loop/_config.js @@ -8,7 +8,7 @@ const ID_OTHER_4 = path.join(__dirname, 'other4.js'); const thirdPluginCalls = new Set(); -module.exports = { +module.exports = defineRollupTest({ description: 'prevents infinite loops when several plugins are calling this.resolve in resolveId', options: { plugins: [ @@ -59,4 +59,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/prevent-tree-shaking-asi/_config.js b/test/function/samples/prevent-tree-shaking-asi/_config.js index c0ce988a450..aa2192ca35a 100644 --- a/test/function/samples/prevent-tree-shaking-asi/_config.js +++ b/test/function/samples/prevent-tree-shaking-asi/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'prevent automatic semicolon insertion from changing behaviour when tree-shaking', options: { treeshake: { tryCatchDeoptimization: false } } -}; +}); diff --git a/test/function/samples/property-keys-not-renamed/_config.js b/test/function/samples/property-keys-not-renamed/_config.js index d4e1f829b49..5cf551a130b 100644 --- a/test/function/samples/property-keys-not-renamed/_config.js +++ b/test/function/samples/property-keys-not-renamed/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not rename property keys' -}; +}); diff --git a/test/function/samples/propertyReadSideEffects-always/_config.js b/test/function/samples/propertyReadSideEffects-always/_config.js index 8fc38463bc0..e6be3a6232c 100644 --- a/test/function/samples/propertyReadSideEffects-always/_config.js +++ b/test/function/samples/propertyReadSideEffects-always/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'verify property accesses are retained for getters with side effects', options: { treeshake: { propertyReadSideEffects: 'always' } } -}; +}); diff --git a/test/function/samples/protect-cjs-globals/_config.js b/test/function/samples/protect-cjs-globals/_config.js index 26fd141de27..bf9f2f1772b 100644 --- a/test/function/samples/protect-cjs-globals/_config.js +++ b/test/function/samples/protect-cjs-globals/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'prevent conflicts with cjs module globals' -}; +}); diff --git a/test/function/samples/proto-accessors/_config.js b/test/function/samples/proto-accessors/_config.js index cdbdcecf206..57787d9c8c3 100644 --- a/test/function/samples/proto-accessors/_config.js +++ b/test/function/samples/proto-accessors/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles getters and setters on __proto__ properties' -}; +}); diff --git a/test/function/samples/re-export-default-import/_config.js b/test/function/samples/re-export-default-import/_config.js index 287c37f6c9b..fae2914d005 100644 --- a/test/function/samples/re-export-default-import/_config.js +++ b/test/function/samples/re-export-default-import/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exports a default import' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/re-export-default-import diff --git a/test/function/samples/re-export-namespace-import/_config.js b/test/function/samples/re-export-namespace-import/_config.js index f13ec5d8c74..50ee89a11dc 100644 --- a/test/function/samples/re-export-namespace-import/_config.js +++ b/test/function/samples/re-export-namespace-import/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 're-exports a namespace import' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/re-export-namespace-import diff --git a/test/function/samples/reassign-array-literal-elements/_config.js b/test/function/samples/reassign-array-literal-elements/_config.js index cba1867556a..38239028818 100644 --- a/test/function/samples/reassign-array-literal-elements/_config.js +++ b/test/function/samples/reassign-array-literal-elements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure reassignments of array elements are tracked' -}; +}); diff --git a/test/function/samples/reassign-computed-prototype/_config.js b/test/function/samples/reassign-computed-prototype/_config.js index 2af8b68f9aa..ed47228fce6 100644 --- a/test/function/samples/reassign-computed-prototype/_config.js +++ b/test/function/samples/reassign-computed-prototype/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'reassign function prototype via computed property access', context: { proto: 'prototype' } -}; +}); diff --git a/test/function/samples/reassign-constructor-parameter-property/_config.js b/test/function/samples/reassign-constructor-parameter-property/_config.js index c02ad7871b3..6aa7da35768 100644 --- a/test/function/samples/reassign-constructor-parameter-property/_config.js +++ b/test/function/samples/reassign-constructor-parameter-property/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track reassignments of properties of constructor parameters' -}; +}); diff --git a/test/function/samples/reassign-double-declarations/_config.js b/test/function/samples/reassign-double-declarations/_config.js index c2fc7556f9c..23d91ecf1ae 100644 --- a/test/function/samples/reassign-double-declarations/_config.js +++ b/test/function/samples/reassign-double-declarations/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure reassignments of double declared variables and their initializers are tracked' -}; +}); diff --git a/test/function/samples/reassign-empty-objects/_config.js b/test/function/samples/reassign-empty-objects/_config.js index 89f1e63f714..1fc8585285e 100644 --- a/test/function/samples/reassign-empty-objects/_config.js +++ b/test/function/samples/reassign-empty-objects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track reassignments of empty objects (#2306)' -}; +}); diff --git a/test/function/samples/reassign-for-loop-declarations/_config.js b/test/function/samples/reassign-for-loop-declarations/_config.js index ffab3a88067..99b1fbd1630 100644 --- a/test/function/samples/reassign-for-loop-declarations/_config.js +++ b/test/function/samples/reassign-for-loop-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'reassign for-loop declarations' -}; +}); diff --git a/test/function/samples/reassign-import-fails/_config.js b/test/function/samples/reassign-import-fails/_config.js index 59a7bc9a2b6..fa0d4ce3f3e 100644 --- a/test/function/samples/reassign-import-fails/_config.js +++ b/test/function/samples/reassign-import-fails/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'disallows assignments to imported bindings', error: { code: 'ILLEGAL_REASSIGNMENT', @@ -21,6 +21,6 @@ module.exports = { watchFiles: [ID_FOO, ID_MAIN], message: 'Illegal reassignment of import "x" in "main.js".' } -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/reassign-import-fails diff --git a/test/function/samples/reassign-import-not-at-top-level-fails/_config.js b/test/function/samples/reassign-import-not-at-top-level-fails/_config.js index b4b6df55aa6..31202b2d93c 100644 --- a/test/function/samples/reassign-import-not-at-top-level-fails/_config.js +++ b/test/function/samples/reassign-import-not-at-top-level-fails/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'disallows assignments to imported bindings not at the top level', error: { code: 'ILLEGAL_REASSIGNMENT', @@ -22,6 +22,6 @@ module.exports = { watchFiles: [ID_FOO, ID_MAIN], message: 'Illegal reassignment of import "x" in "main.js".' } -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/reassign-import-fails diff --git a/test/function/samples/reassign-namespace/_config.js b/test/function/samples/reassign-namespace/_config.js index 8bff57992fe..5e0ade5adcf 100644 --- a/test/function/samples/reassign-namespace/_config.js +++ b/test/function/samples/reassign-namespace/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'members of namespaces are reassigned when the namespace is passed to a function' -}; +}); diff --git a/test/function/samples/reassign-object-literal-1/_config.js b/test/function/samples/reassign-object-literal-1/_config.js index 12977186e04..5072e984dd3 100644 --- a/test/function/samples/reassign-object-literal-1/_config.js +++ b/test/function/samples/reassign-object-literal-1/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track reassignments through object literals' -}; +}); diff --git a/test/function/samples/reassign-object-literal-2/_config.js b/test/function/samples/reassign-object-literal-2/_config.js index 12977186e04..5072e984dd3 100644 --- a/test/function/samples/reassign-object-literal-2/_config.js +++ b/test/function/samples/reassign-object-literal-2/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track reassignments through object literals' -}; +}); diff --git a/test/function/samples/reassign-parameter-property/_config.js b/test/function/samples/reassign-parameter-property/_config.js index 8d50d4d1fa6..d1e908ba3a4 100644 --- a/test/function/samples/reassign-parameter-property/_config.js +++ b/test/function/samples/reassign-parameter-property/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track reassignments of properties of function parameters' -}; +}); diff --git a/test/function/samples/reassign-parameter/_config.js b/test/function/samples/reassign-parameter/_config.js index 1701a6f8311..54f38031079 100644 --- a/test/function/samples/reassign-parameter/_config.js +++ b/test/function/samples/reassign-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'parameters can be reassigned/updated' -}; +}); diff --git a/test/function/samples/reassign-pattern-defaults/_config.js b/test/function/samples/reassign-pattern-defaults/_config.js index cc6fce1a3e1..fd344882a78 100644 --- a/test/function/samples/reassign-pattern-defaults/_config.js +++ b/test/function/samples/reassign-pattern-defaults/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure reassignments of pattern defaults are tracked' -}; +}); diff --git a/test/function/samples/reassign-return-expression/_config.js b/test/function/samples/reassign-return-expression/_config.js index d9b72ad5e99..de31c267c50 100644 --- a/test/function/samples/reassign-return-expression/_config.js +++ b/test/function/samples/reassign-return-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track reassignments of single function return expressions' -}; +}); diff --git a/test/function/samples/reassign-return-expressions/_config.js b/test/function/samples/reassign-return-expressions/_config.js index 9b5f1416559..0816464c302 100644 --- a/test/function/samples/reassign-return-expressions/_config.js +++ b/test/function/samples/reassign-return-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'track reassignments of multiple function return expressions' -}; +}); diff --git a/test/function/samples/reassigned-return-expression/_config.js b/test/function/samples/reassigned-return-expression/_config.js index 5223fccf634..f6278dda9bf 100644 --- a/test/function/samples/reassigned-return-expression/_config.js +++ b/test/function/samples/reassigned-return-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not bind return expressions before assignments are bound (#3382)' -}; +}); diff --git a/test/function/samples/recursive-parameter-assignments/_config.js b/test/function/samples/recursive-parameter-assignments/_config.js index 80c1cc8f62d..09d2d7c766c 100644 --- a/test/function/samples/recursive-parameter-assignments/_config.js +++ b/test/function/samples/recursive-parameter-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'Avoid maximum call stack error with recursive parameter assignments (#1710).' -}; +}); diff --git a/test/function/samples/recursive-reexports/_config.js b/test/function/samples/recursive-reexports/_config.js index 2ddc66a3bd9..665300697c5 100644 --- a/test/function/samples/recursive-reexports/_config.js +++ b/test/function/samples/recursive-reexports/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_OTHER = path.join(__dirname, 'other.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles recursive namespace reexports', exports(exports) { assert.deepStrictEqual(exports, { main: 'main', other: 'other' }); @@ -15,4 +15,4 @@ module.exports = { message: 'Circular dependency: main.js -> other.js -> main.js' } ] -}; +}); diff --git a/test/function/samples/redeclare-parameter/_config.js b/test/function/samples/redeclare-parameter/_config.js index e3d2ff620b0..bda0919e1a0 100644 --- a/test/function/samples/redeclare-parameter/_config.js +++ b/test/function/samples/redeclare-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'associates redeclared parameters (#2451)' -}; +}); diff --git a/test/function/samples/reexport-from-synthetic/_config.js b/test/function/samples/reexport-from-synthetic/_config.js index 7a0aa62df7a..d6e24fef885 100644 --- a/test/function/samples/reexport-from-synthetic/_config.js +++ b/test/function/samples/reexport-from-synthetic/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles reexporting a synthetic namespace from a non-synthetic module', options: { plugins: [ @@ -9,4 +9,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/reexport-missing-error/_config.js b/test/function/samples/reexport-missing-error/_config.js index 2a2724ff2d0..f39550fdf72 100644 --- a/test/function/samples/reexport-missing-error/_config.js +++ b/test/function/samples/reexport-missing-error/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_EMPTY = path.join(__dirname, 'empty.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'reexporting a missing identifier should print an error', error: { binding: 'foo', @@ -22,4 +22,4 @@ module.exports = { watchFiles: [ID_EMPTY, ID_MAIN], message: '"foo" is not exported by "empty.js", imported by "main.js".' } -}; +}); diff --git a/test/function/samples/reexport-ns/_config.js b/test/function/samples/reexport-ns/_config.js index 91a45186179..9d8ecf5708d 100644 --- a/test/function/samples/reexport-ns/_config.js +++ b/test/function/samples/reexport-ns/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'external namespace reexport', options: { external: ['external'], @@ -13,4 +13,4 @@ module.exports = { assert.strictEqual(exports[Symbol.toStringTag], 'Module'); assert.strictEqual(exports.maths.external, true); } -}; +}); diff --git a/test/function/samples/reexports-from-external/_config.js b/test/function/samples/reexports-from-external/_config.js index c7e67ff1165..d1224e3a156 100644 --- a/test/function/samples/reexports-from-external/_config.js +++ b/test/function/samples/reexports-from-external/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 're-exports * from external module (#791)', options: { external: ['external'] @@ -19,4 +19,4 @@ module.exports = { assert.equal(exports.foo, 1); assert.equal(exports.bar, 2); } -}; +}); diff --git a/test/function/samples/relative-external-include-once-nested/_config.js b/test/function/samples/relative-external-include-once-nested/_config.js index 8e6f664f297..fc861ba5203 100644 --- a/test/function/samples/relative-external-include-once-nested/_config.js +++ b/test/function/samples/relative-external-include-once-nested/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes a relative external module only once (nested version)', options: { external: path.join(__dirname, './first/foo.js') @@ -15,4 +15,4 @@ module.exports = { exports(exports) { assert.equal(exports, 3); } -}; +}); diff --git a/test/function/samples/relative-external-include-once-two-external/_config.js b/test/function/samples/relative-external-include-once-two-external/_config.js index 37b3a4b6168..a74eacfac5f 100644 --- a/test/function/samples/relative-external-include-once-two-external/_config.js +++ b/test/function/samples/relative-external-include-once-two-external/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { join } = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes a relative external module only once (two external deps)', options: { external: [join(__dirname, './foo.js'), join(__dirname, './first/foo.js')] @@ -15,4 +15,4 @@ module.exports = { exports(exports) { assert.ok(exports === 'ab' || exports === 'ba', 'two different modules should be required'); } -}; +}); diff --git a/test/function/samples/relative-external-include-once-up/_config.js b/test/function/samples/relative-external-include-once-up/_config.js index 427402db0d1..4aa6a77ddab 100644 --- a/test/function/samples/relative-external-include-once-up/_config.js +++ b/test/function/samples/relative-external-include-once-up/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes a relative external module only once (from upper directory too)', options: { input: path.join(__dirname, 'first', 'main.js'), @@ -16,4 +16,4 @@ module.exports = { exports(exports) { assert.equal(exports, 3); } -}; +}); diff --git a/test/function/samples/relative-external-include-once/_config.js b/test/function/samples/relative-external-include-once/_config.js index cd581119e47..ad97827c7c4 100644 --- a/test/function/samples/relative-external-include-once/_config.js +++ b/test/function/samples/relative-external-include-once/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes a relative external module only once', options: { external: path.join(__dirname, './foo.js') @@ -15,4 +15,4 @@ module.exports = { exports(exports) { assert.equal(exports, 3); } -}; +}); diff --git a/test/function/samples/relative-outside-external/_config.js b/test/function/samples/relative-outside-external/_config.js index 4c59441887f..520b5cb5aeb 100644 --- a/test/function/samples/relative-outside-external/_config.js +++ b/test/function/samples/relative-outside-external/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const cwd = process.cwd; -module.exports = { +module.exports = defineRollupTest({ description: 'correctly resolves relative external imports from outside directories', options: { external() { @@ -20,4 +20,4 @@ module.exports = { process.cwd = cwd; assert.strictEqual(exports.value, '../../../test.js'); } -}; +}); diff --git a/test/function/samples/removes-empty-exported-vars/_config.js b/test/function/samples/removes-empty-exported-vars/_config.js index 3b464a58d23..012d1d58035 100644 --- a/test/function/samples/removes-empty-exported-vars/_config.js +++ b/test/function/samples/removes-empty-exported-vars/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'removes empty exported var declarations', exports(exports) { assert.equal(exports.foo, 42); } -}; +}); diff --git a/test/function/samples/rename-conditional-expression-children/_config.js b/test/function/samples/rename-conditional-expression-children/_config.js index 7c052c5cd17..0ea4d895a29 100644 --- a/test/function/samples/rename-conditional-expression-children/_config.js +++ b/test/function/samples/rename-conditional-expression-children/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly renders children of ConditionalExpressions' -}; +}); diff --git a/test/function/samples/rename-default-export/_config.js b/test/function/samples/rename-default-export/_config.js index eefafac65b2..2976d6496da 100644 --- a/test/function/samples/rename-default-export/_config.js +++ b/test/function/samples/rename-default-export/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'avoids SyntaxError with default token (#33)', exports(exports) { assert.equal(exports.foo, 42); assert.equal(exports.bar, 42); } -}; +}); diff --git a/test/function/samples/renamed-arguments/_config.js b/test/function/samples/renamed-arguments/_config.js index bb5714c61f3..f3d9fe19ce8 100644 --- a/test/function/samples/renamed-arguments/_config.js +++ b/test/function/samples/renamed-arguments/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'function arguments are renamed as appropriate (#32)', exports(exports) { const object = {}; assert.strictEqual(exports.foo(), 42); assert.strictEqual(exports.bar(object), object); } -}; +}); diff --git a/test/function/samples/render-chunk-async/_config.js b/test/function/samples/render-chunk-async/_config.js index 7fb0f09887c..0f07d73c192 100644 --- a/test/function/samples/render-chunk-async/_config.js +++ b/test/function/samples/render-chunk-async/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'bundle transformers can be asynchronous', options: { plugins: [ @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/resolve-id-object/_config.js b/test/function/samples/resolve-id-object/_config.js index 97bc04d7816..72be759f41d 100644 --- a/test/function/samples/resolve-id-object/_config.js +++ b/test/function/samples/resolve-id-object/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows resolving an id with an object', options: { plugins: { @@ -28,4 +28,4 @@ module.exports = { throw new Error(`Unexpected external id ${id}.`); } } -}; +}); diff --git a/test/function/samples/resolve-relative-external-id/_config.js b/test/function/samples/resolve-relative-external-id/_config.js index f0534f90aad..ac4eb53a4fb 100644 --- a/test/function/samples/resolve-relative-external-id/_config.js +++ b/test/function/samples/resolve-relative-external-id/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'resolves relative external ids', options: { external: [path.join(__dirname, 'external.js'), path.join(__dirname, 'nested', 'external.js')], @@ -31,4 +31,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/resolve-unordered-assignments-2/_config.js b/test/function/samples/resolve-unordered-assignments-2/_config.js index 8de42b92b54..2d0a6967586 100644 --- a/test/function/samples/resolve-unordered-assignments-2/_config.js +++ b/test/function/samples/resolve-unordered-assignments-2/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Assignments should be correctly bound independent of their order', exports(exports) { assert.equal(exports.baz, 'present'); } -}; +}); diff --git a/test/function/samples/resolve-unordered-assignments/_config.js b/test/function/samples/resolve-unordered-assignments/_config.js index 8de42b92b54..2d0a6967586 100644 --- a/test/function/samples/resolve-unordered-assignments/_config.js +++ b/test/function/samples/resolve-unordered-assignments/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Assignments should be correctly bound independent of their order', exports(exports) { assert.equal(exports.baz, 'present'); } -}; +}); diff --git a/test/function/samples/resolveid-is-entry/_config.js b/test/function/samples/resolveid-is-entry/_config.js index 30bdca4bb41..245a8c9b9ff 100644 --- a/test/function/samples/resolveid-is-entry/_config.js +++ b/test/function/samples/resolveid-is-entry/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'sends correct isEntry information to resolveId hooks', options: { plugins: [ @@ -80,4 +80,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/resolves-namespace-default/_config.js b/test/function/samples/resolves-namespace-default/_config.js index 20360805f9c..e03d56dfb63 100644 --- a/test/function/samples/resolves-namespace-default/_config.js +++ b/test/function/samples/resolves-namespace-default/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: "namespace's 'default' properties should be available", exports(exports) { assert.equal(exports, 42); } -}; +}); diff --git a/test/function/samples/respect-default-export-reexporter-side-effects/_config.js b/test/function/samples/respect-default-export-reexporter-side-effects/_config.js index 7ddf180ef45..e1617c00864 100644 --- a/test/function/samples/respect-default-export-reexporter-side-effects/_config.js +++ b/test/function/samples/respect-default-export-reexporter-side-effects/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respect side-effects in reexporting modules even if moduleSideEffects are off', options: { treeshake: { moduleSideEffects: false } } -}; +}); diff --git a/test/function/samples/respect-reexporter-side-effects/_config.js b/test/function/samples/respect-reexporter-side-effects/_config.js index 7ddf180ef45..e1617c00864 100644 --- a/test/function/samples/respect-reexporter-side-effects/_config.js +++ b/test/function/samples/respect-reexporter-side-effects/_config.js @@ -1,8 +1,8 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respect side-effects in reexporting modules even if moduleSideEffects are off', options: { treeshake: { moduleSideEffects: false } } -}; +}); diff --git a/test/function/samples/respect-synthetic-export-reexporter-side-effects/_config.js b/test/function/samples/respect-synthetic-export-reexporter-side-effects/_config.js index 0afd5749ba1..55b000453da 100644 --- a/test/function/samples/respect-synthetic-export-reexporter-side-effects/_config.js +++ b/test/function/samples/respect-synthetic-export-reexporter-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'respect side-effects in reexporting modules even if moduleSideEffects are off', options: { treeshake: { @@ -12,4 +12,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/retain-unknown-prototype-access/_config.js b/test/function/samples/retain-unknown-prototype-access/_config.js index 576db2d0c73..e9019a1fdbe 100644 --- a/test/function/samples/retain-unknown-prototype-access/_config.js +++ b/test/function/samples/retain-unknown-prototype-access/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treats unknown builtin prototype properties as unknown' -}; +}); diff --git a/test/function/samples/retains-sort-order-b/_config.js b/test/function/samples/retains-sort-order-b/_config.js index 60e5e637185..78543944ae9 100644 --- a/test/function/samples/retains-sort-order-b/_config.js +++ b/test/function/samples/retains-sort-order-b/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'sorts statements according to their original order within modules, part 2', exports(exports) { assert.equal(exports.answer, 42); } -}; +}); diff --git a/test/function/samples/retains-sort-order/_config.js b/test/function/samples/retains-sort-order/_config.js index b9f3560eea1..54f71cc95fd 100644 --- a/test/function/samples/retains-sort-order/_config.js +++ b/test/function/samples/retains-sort-order/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'sorts statements according to their original order within modules', exports(exports) { assert.equal(exports, 'GREAT SUCCESS'); } -}; +}); diff --git a/test/function/samples/return-expression-depending-on-conditional/_config.js b/test/function/samples/return-expression-depending-on-conditional/_config.js index 5148fc5f493..ebe8582796d 100644 --- a/test/function/samples/return-expression-depending-on-conditional/_config.js +++ b/test/function/samples/return-expression-depending-on-conditional/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks return expressions that depend on conditional expressions that are deoptimized at some point' -}; +}); diff --git a/test/function/samples/returned-array-mutation/_config.js b/test/function/samples/returned-array-mutation/_config.js index 612a42d2e21..5136218a1d7 100644 --- a/test/function/samples/returned-array-mutation/_config.js +++ b/test/function/samples/returned-array-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks array mutations' -}; +}); diff --git a/test/function/samples/reuse-resolve-meta/_config.js b/test/function/samples/reuse-resolve-meta/_config.js index 9e34916d7de..f403e7814d5 100644 --- a/test/function/samples/reuse-resolve-meta/_config.js +++ b/test/function/samples/reuse-resolve-meta/_config.js @@ -4,7 +4,7 @@ const meta = { plugin: { initial: true } }; const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not modify meta objects passed in resolveId', options: { plugins: [ @@ -26,4 +26,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/rewrite-member-expressions/_config.js b/test/function/samples/rewrite-member-expressions/_config.js index ec5c85601ae..f99a197486b 100644 --- a/test/function/samples/rewrite-member-expressions/_config.js +++ b/test/function/samples/rewrite-member-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'rewrites identifiers at the head of member expressions' -}; +}); diff --git a/test/function/samples/sequence-expression/_config.js b/test/function/samples/sequence-expression/_config.js index fbf4519aace..6bccca5e520 100644 --- a/test/function/samples/sequence-expression/_config.js +++ b/test/function/samples/sequence-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not change context of callable in sequence expressions' -}; +}); diff --git a/test/function/samples/sequence-expressions-template-tag/_config.js b/test/function/samples/sequence-expressions-template-tag/_config.js index 6af722b1760..b234068e3e9 100644 --- a/test/function/samples/sequence-expressions-template-tag/_config.js +++ b/test/function/samples/sequence-expressions-template-tag/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'uses corrrect "this" for tagged template expressions in simplified sequences' -}; +}); diff --git a/test/function/samples/shadowed-external-export/_config.js b/test/function/samples/shadowed-external-export/_config.js index fc9405b32f1..f77f0b80216 100644 --- a/test/function/samples/shadowed-external-export/_config.js +++ b/test/function/samples/shadowed-external-export/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external modules are not shadowed', options: { external: ['path'] } -}; +}); diff --git a/test/function/samples/shadowed-namespace-b/_config.js b/test/function/samples/shadowed-namespace-b/_config.js index fba6d0d98e0..b2f601c3a6a 100644 --- a/test/function/samples/shadowed-namespace-b/_config.js +++ b/test/function/samples/shadowed-namespace-b/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'namespaces are not shadowed (b)' -}; +}); diff --git a/test/function/samples/shadowed-namespace/_config.js b/test/function/samples/shadowed-namespace/_config.js index f0d7f7a4155..0183acad380 100644 --- a/test/function/samples/shadowed-namespace/_config.js +++ b/test/function/samples/shadowed-namespace/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'namespaces are not shadowed' -}; +}); diff --git a/test/function/samples/shadowed-variables/_config.js b/test/function/samples/shadowed-variables/_config.js index d2455d30459..0aeaf4eccd8 100644 --- a/test/function/samples/shadowed-variables/_config.js +++ b/test/function/samples/shadowed-variables/_config.js @@ -1,5 +1,5 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'renames shadowed variables correctly' -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/named-function-expression diff --git a/test/function/samples/shims-missing-exports/_config.js b/test/function/samples/shims-missing-exports/_config.js index 270b5bb401c..8d00b45a22d 100644 --- a/test/function/samples/shims-missing-exports/_config.js +++ b/test/function/samples/shims-missing-exports/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_DEP1 = path.join(__dirname, 'dep1.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'shims missing exports', options: { shimMissingExports: true @@ -14,4 +14,4 @@ module.exports = { message: 'Missing export "missing" has been shimmed in module "dep1.js".' } ] -}; +}); diff --git a/test/function/samples/side-effect-free-module-function/_config.js b/test/function/samples/side-effect-free-module-function/_config.js index 7338de6c86e..001bfc064ce 100644 --- a/test/function/samples/side-effect-free-module-function/_config.js +++ b/test/function/samples/side-effect-free-module-function/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly include functions with side effects from side-effect-free modules (#3942)', options: { @@ -8,4 +8,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/side-effects-only-default-exports/_config.js b/test/function/samples/side-effects-only-default-exports/_config.js index 39cde975727..cbfa848efba 100644 --- a/test/function/samples/side-effects-only-default-exports/_config.js +++ b/test/function/samples/side-effects-only-default-exports/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const mutated = {}; -module.exports = { +module.exports = defineRollupTest({ description: 'Wraps inlined default exports which are rendered for side-effects only', options: { external: ['external'] @@ -15,4 +15,4 @@ module.exports = { assert.ok(mutated.extremelyMutated); assert.ok(mutated.utterlyMutated); } -}; +}); diff --git a/test/function/samples/simplified-nested-if/_config.js b/test/function/samples/simplified-nested-if/_config.js index 6e442a83103..24ea5ba631b 100644 --- a/test/function/samples/simplified-nested-if/_config.js +++ b/test/function/samples/simplified-nested-if/_config.js @@ -1,7 +1,7 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'do not catch else branches from parent if statements when simplifiying if-statements', context: { unknown: true } -}; +}); diff --git a/test/function/samples/simplify-arrow-expression-with-object/_config.js b/test/function/samples/simplify-arrow-expression-with-object/_config.js index bbd7247c0d0..5b12440fb30 100644 --- a/test/function/samples/simplify-arrow-expression-with-object/_config.js +++ b/test/function/samples/simplify-arrow-expression-with-object/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly simplifies arrow expressions where the right hand side becomes an object', exports(exports) { assert.deepStrictEqual(exports.conditional(), { x: 42, y: 43 }); assert.deepStrictEqual(exports.logical(), { x: 42, y: 43 }); } -}; +}); diff --git a/test/function/samples/simplify-class-expression-assignment/_config.js b/test/function/samples/simplify-class-expression-assignment/_config.js index 2e3c44bdbac..ad81fdd37e7 100644 --- a/test/function/samples/simplify-class-expression-assignment/_config.js +++ b/test/function/samples/simplify-class-expression-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'wraps class expressions in call expressions in simplified assignments' -}; +}); diff --git a/test/function/samples/simplify-function-expression-assignment/_config.js b/test/function/samples/simplify-function-expression-assignment/_config.js index 173965d0199..5c1cc70fea6 100644 --- a/test/function/samples/simplify-function-expression-assignment/_config.js +++ b/test/function/samples/simplify-function-expression-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'wraps function expressions in call expressions in simplified assignments' -}; +}); diff --git a/test/function/samples/simplify-object-expression-assignment/_config.js b/test/function/samples/simplify-object-expression-assignment/_config.js index f8c4f0cf135..f0ed50cd89f 100644 --- a/test/function/samples/simplify-object-expression-assignment/_config.js +++ b/test/function/samples/simplify-object-expression-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'wraps object expressions in call expressions in simplified assignments' -}; +}); diff --git a/test/function/samples/simplify-sequence-expressions/_config.js b/test/function/samples/simplify-sequence-expressions/_config.js index cb5578b64ab..eff54bcea10 100644 --- a/test/function/samples/simplify-sequence-expressions/_config.js +++ b/test/function/samples/simplify-sequence-expressions/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly simplify sequence expressions if the new leading element would require parentheses' -}; +}); diff --git a/test/function/samples/simplify-with-destructuring/_config.js b/test/function/samples/simplify-with-destructuring/_config.js index d5bbacc776d..c1065e9e521 100644 --- a/test/function/samples/simplify-with-destructuring/_config.js +++ b/test/function/samples/simplify-with-destructuring/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handle destructuring assignments in simplified sequence expressions' -}; +}); diff --git a/test/function/samples/simplify-with-function-iife/_config.js b/test/function/samples/simplify-with-function-iife/_config.js index 56aecda2893..53321b8ff20 100644 --- a/test/function/samples/simplify-with-function-iife/_config.js +++ b/test/function/samples/simplify-with-function-iife/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly uses parentheses when a simplification would put a function IIFE first' -}; +}); diff --git a/test/function/samples/sourcemap-base-url-invalid/_config.js b/test/function/samples/sourcemap-base-url-invalid/_config.js index f141e56812e..5ccf4b4f4bb 100644 --- a/test/function/samples/sourcemap-base-url-invalid/_config.js +++ b/test/function/samples/sourcemap-base-url-invalid/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for invalid sourcemapBaseUrl', options: { output: { @@ -11,4 +11,4 @@ module.exports = { 'Invalid value for option "output.sourcemapBaseUrl" - must be a valid URL, received "example.com".', url: 'https://rollupjs.org/configuration-options/#output-sourcemapbaseurl' } -}; +}); diff --git a/test/function/samples/sourcemap-inline-generatebundle/_config.js b/test/function/samples/sourcemap-inline-generatebundle/_config.js index bbb66031beb..fb573fef5a0 100644 --- a/test/function/samples/sourcemap-inline-generatebundle/_config.js +++ b/test/function/samples/sourcemap-inline-generatebundle/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'includes inline sourcemap comments in generateBundle hook', options: { plugins: [ @@ -23,4 +23,4 @@ module.exports = main; ], output: { sourcemap: 'inline' } } -}; +}); diff --git a/test/function/samples/sourcemap-true-generatebundle/_config.js b/test/function/samples/sourcemap-true-generatebundle/_config.js index 5d79ab4f58d..ebd6f77ec9d 100644 --- a/test/function/samples/sourcemap-true-generatebundle/_config.js +++ b/test/function/samples/sourcemap-true-generatebundle/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'emits sourcemaps before generateBundle hook', options: { plugins: [ @@ -31,4 +31,4 @@ module.exports = main; ], output: { sourcemap: true } } -}; +}); diff --git a/test/function/samples/sourcemapping-url-comment/_config.js b/test/function/samples/sourcemapping-url-comment/_config.js index 97c94a2bba3..864be257203 100644 --- a/test/function/samples/sourcemapping-url-comment/_config.js +++ b/test/function/samples/sourcemapping-url-comment/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'only removes valid sourcemapping URL comments (#1132)' -}; +}); diff --git a/test/function/samples/sourcemapping-url-multiline/_config.js b/test/function/samples/sourcemapping-url-multiline/_config.js index 466ea613259..54104762f23 100644 --- a/test/function/samples/sourcemapping-url-multiline/_config.js +++ b/test/function/samples/sourcemapping-url-multiline/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not mistakenly recognise sourceMappingURL comment with newline' -}; +}); diff --git a/test/function/samples/spread-arguments-unused/_config.js b/test/function/samples/spread-arguments-unused/_config.js index 4ad21b60eac..0ae9eecf40d 100644 --- a/test/function/samples/spread-arguments-unused/_config.js +++ b/test/function/samples/spread-arguments-unused/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles using the spread operator to add arguments when the first argument is unused (#3652)' -}; +}); diff --git a/test/function/samples/statement-order/_config.js b/test/function/samples/statement-order/_config.js index ed5bd16619b..47057614af4 100644 --- a/test/function/samples/statement-order/_config.js +++ b/test/function/samples/statement-order/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'correct statement order is preserved even in weird edge cases', context: { getAnswer(object) { @@ -10,4 +10,4 @@ module.exports = { exports(exports) { assert.equal(exports, 'right'); } -}; +}); diff --git a/test/function/samples/switch-break/_config.js b/test/function/samples/switch-break/_config.js index 9e60c85325e..6d521d86e64 100644 --- a/test/function/samples/switch-break/_config.js +++ b/test/function/samples/switch-break/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'if switch does not always throw an error, retain the following break' -}; +}); diff --git a/test/function/samples/switch-cases-are-deconflicted/_config.js b/test/function/samples/switch-cases-are-deconflicted/_config.js index 34c51a4f835..689d766c5e5 100644 --- a/test/function/samples/switch-cases-are-deconflicted/_config.js +++ b/test/function/samples/switch-cases-are-deconflicted/_config.js @@ -1,9 +1,9 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'deconflicts variables in switch cases (#1970)', exports(exports) { assert.equal(exports.fn1('1'), 'correct'); assert.equal(exports.fn2('2'), 'correct'); } -}; +}); diff --git a/test/function/samples/switch-statement-nested-continue/_config.js b/test/function/samples/switch-statement-nested-continue/_config.js index 3c0f55f0cc5..136d6ecf53c 100644 --- a/test/function/samples/switch-statement-nested-continue/_config.js +++ b/test/function/samples/switch-statement-nested-continue/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treats continue different from break in switch statements' -}; +}); diff --git a/test/function/samples/switch-statement-out-of-order-default/_config.js b/test/function/samples/switch-statement-out-of-order-default/_config.js index 1b6f9d32087..044cb3ec8c8 100644 --- a/test/function/samples/switch-statement-out-of-order-default/_config.js +++ b/test/function/samples/switch-statement-out-of-order-default/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles side-effects in non-ordered defaults of switch statements' -}; +}); diff --git a/test/function/samples/switch-statements-removed-default/_config.js b/test/function/samples/switch-statements-removed-default/_config.js index 2c58f54526d..73539c2ba35 100644 --- a/test/function/samples/switch-statements-removed-default/_config.js +++ b/test/function/samples/switch-statements-removed-default/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not remove code after a switch statement that should be retained' -}; +}); diff --git a/test/function/samples/symlink/_config.js b/test/function/samples/symlink/_config.js index 561b738fc2d..f631aa5854e 100644 --- a/test/function/samples/symlink/_config.js +++ b/test/function/samples/symlink/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ skip: process.platform === 'win32', description: 'follows symlinks' -}; +}); diff --git a/test/function/samples/synthetic-named-exports-fallback-es2015/_config.js b/test/function/samples/synthetic-named-exports-fallback-es2015/_config.js index a01fdce2095..3cd0b6b5f1c 100644 --- a/test/function/samples/synthetic-named-exports-fallback-es2015/_config.js +++ b/test/function/samples/synthetic-named-exports-fallback-es2015/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds a fallback in case synthetic named exports are falsy', options: { output: { generatedCode: 'es2015' }, @@ -10,4 +10,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/synthetic-named-exports-fallback/_config.js b/test/function/samples/synthetic-named-exports-fallback/_config.js index 36eb5aa7f87..28f0f2b8a44 100644 --- a/test/function/samples/synthetic-named-exports-fallback/_config.js +++ b/test/function/samples/synthetic-named-exports-fallback/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'adds a fallback in case synthetic named exports are falsy', options: { plugins: [ @@ -9,4 +9,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/circular-synthetic-exports/_config.js b/test/function/samples/synthetic-named-exports/circular-synthetic-exports/_config.js index e74521bc895..d9c8d47f23b 100644 --- a/test/function/samples/synthetic-named-exports/circular-synthetic-exports/_config.js +++ b/test/function/samples/synthetic-named-exports/circular-synthetic-exports/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles circular synthetic exports', options: { plugins: [ @@ -21,4 +21,4 @@ module.exports = { message: 'Module "main.js" that is marked with `syntheticNamedExports: "__synthetic"` needs an explicit export named "__synthetic" that does not reexport an unresolved named export of the same module.' } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/circular-synthetic-exports2/_config.js b/test/function/samples/synthetic-named-exports/circular-synthetic-exports2/_config.js index 567171e2695..f335a79a6b5 100644 --- a/test/function/samples/synthetic-named-exports/circular-synthetic-exports2/_config.js +++ b/test/function/samples/synthetic-named-exports/circular-synthetic-exports2/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_DEP1 = path.join(__dirname, 'dep1.js'); const ID_DEP2 = path.join(__dirname, 'dep2.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles circular synthetic exports', warnings: [ { @@ -11,4 +11,4 @@ module.exports = { message: 'Circular dependency: dep1.js -> dep2.js -> dep1.js' } ] -}; +}); diff --git a/test/function/samples/synthetic-named-exports/dynamic-import/_config.js b/test/function/samples/synthetic-named-exports/dynamic-import/_config.js index 9c715b7df7a..f4444577669 100644 --- a/test/function/samples/synthetic-named-exports/dynamic-import/_config.js +++ b/test/function/samples/synthetic-named-exports/dynamic-import/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports dynamically importing a module with synthetic named exports', options: { plugins: [ @@ -25,4 +25,4 @@ module.exports = { assert.strictEqual(namespace.baz, undefined); assert.deepStrictEqual(namespace.default, { foo: 'foo' }); } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/entry/_config.js b/test/function/samples/synthetic-named-exports/entry/_config.js index 4ade590e8c4..bafb85c708c 100644 --- a/test/function/samples/synthetic-named-exports/entry/_config.js +++ b/test/function/samples/synthetic-named-exports/entry/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not expose the synthetic namespace if an entry point uses a string value', options: { plugins: [ @@ -16,4 +16,4 @@ module.exports = { exists: 'exists' }); } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js b/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js index 81b0089ad86..2ef35128f68 100644 --- a/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js +++ b/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'external modules can not have syntheticNamedExports', options: { plugins: [ @@ -27,4 +27,4 @@ module.exports = { return 1; } } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/namespace-object/_config.js b/test/function/samples/synthetic-named-exports/namespace-object/_config.js index bd8757e1c09..e4f47092918 100644 --- a/test/function/samples/synthetic-named-exports/namespace-object/_config.js +++ b/test/function/samples/synthetic-named-exports/namespace-object/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not include named synthetic namespaces in namespace objects', options: { plugins: [ @@ -26,4 +26,4 @@ module.exports = { } }); } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/namespace-overrides/_config.js b/test/function/samples/synthetic-named-exports/namespace-overrides/_config.js index 7e7973d34d4..71390a0d293 100644 --- a/test/function/samples/synthetic-named-exports/namespace-overrides/_config.js +++ b/test/function/samples/synthetic-named-exports/namespace-overrides/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports re-exported synthetic exports in namespace objects with correct export precedence', options: { @@ -41,4 +41,4 @@ module.exports = { } }); } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/non-default-export/_config.js b/test/function/samples/synthetic-named-exports/non-default-export/_config.js index c2e9e237112..031171445cf 100644 --- a/test/function/samples/synthetic-named-exports/non-default-export/_config.js +++ b/test/function/samples/synthetic-named-exports/non-default-export/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'supports providing a named export to generate synthetic exports', options: { plugins: [ @@ -26,4 +26,4 @@ module.exports = { synthetic: 'synthetic' }); } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/preserve-modules/_config.js b/test/function/samples/synthetic-named-exports/preserve-modules/_config.js index 43cef7c4d8b..6ffb06af872 100644 --- a/test/function/samples/synthetic-named-exports/preserve-modules/_config.js +++ b/test/function/samples/synthetic-named-exports/preserve-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles a dynamic import with synthetic named exports in preserveModules mode', options: { output: { @@ -21,4 +21,4 @@ module.exports = { const { foo } = await exports.promise; assert.strictEqual(foo, 'bar'); } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js b/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js index c8e97b9a45f..9545f0b537b 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'synthetic named exports modules need a default export', options: { plugins: [ @@ -20,4 +20,4 @@ module.exports = { message: 'Module "dep.js" that is marked with `syntheticNamedExports: true` needs a default export that does not reexport an unresolved named export of the same module.' } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js b/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js index 824ca9d6549..0fd7d93abcd 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'synthetic named exports modules need their fallback export', options: { plugins: [ @@ -22,4 +22,4 @@ module.exports = { message: 'Module "dep.js" that is marked with `syntheticNamedExports: "__synthetic"` needs an explicit export named "__synthetic" that does not reexport an unresolved named export of the same module.' } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js b/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js index d23377b2df2..8dd2e1ca8ee 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'makes sure default exports of synthetic named exports are snapshots', options: { plugins: { @@ -7,4 +7,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js b/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js index 8c96a84613a..5291b9cc4f4 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js @@ -5,7 +5,7 @@ const ID_OVERRIDE = path.join(__dirname, 'override.js'); const ID_NOOVERRIDE = path.join(__dirname, 'noOverride.js'); const ID_HIDDENNAMESPACE = path.join(__dirname, 'hiddenNamespace.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not expose synthetic named exports on entry points', options: { plugins: [ @@ -40,4 +40,4 @@ module.exports = { synthOverride: 'overridden' }); } -}; +}); diff --git a/test/function/samples/tagged-template-deoptimize/_config.js b/test/function/samples/tagged-template-deoptimize/_config.js index 2f550cae185..14a480ec40b 100644 --- a/test/function/samples/tagged-template-deoptimize/_config.js +++ b/test/function/samples/tagged-template-deoptimize/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly deoptimizes tagged template expressions' -}; +}); diff --git a/test/function/samples/this-not-namespace/_config.js b/test/function/samples/this-not-namespace/_config.js index f2aa437a24d..834b0b0bc7d 100644 --- a/test/function/samples/this-not-namespace/_config.js +++ b/test/function/samples/this-not-namespace/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not treat this.foo as a possible namespace (#1258)', exports: exports => { assert.equal(typeof exports.Foo, 'function'); } -}; +}); diff --git a/test/function/samples/this-side-effect/_config.js b/test/function/samples/this-side-effect/_config.js index 8288a1f6c00..aef87402e01 100644 --- a/test/function/samples/this-side-effect/_config.js +++ b/test/function/samples/this-side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'detects side effects when mutating "this" in a constructor' -}; +}); diff --git a/test/function/samples/throws-not-found-module/_config.js b/test/function/samples/throws-not-found-module/_config.js index 2f6f1fd25a2..16e5426c409 100644 --- a/test/function/samples/throws-not-found-module/_config.js +++ b/test/function/samples/throws-not-found-module/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'throws error if module is not found', error: { code: 'UNRESOLVED_IMPORT', @@ -10,4 +10,4 @@ module.exports = { watchFiles: [ID_MAIN], message: 'Could not resolve "./mod" from "main.js"' } -}; +}); diff --git a/test/function/samples/top-level-arrow-function/_config.js b/test/function/samples/top-level-arrow-function/_config.js index 95d2df90e5a..f7d2ac74c70 100644 --- a/test/function/samples/top-level-arrow-function/_config.js +++ b/test/function/samples/top-level-arrow-function/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles naked return value from top-level arrow function expression (#403)' -}; +}); diff --git a/test/function/samples/top-level-block/_config.js b/test/function/samples/top-level-block/_config.js index 1cc39dbebd1..4943eeceb1c 100644 --- a/test/function/samples/top-level-block/_config.js +++ b/test/function/samples/top-level-block/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'allows top-level block' -}; +}); diff --git a/test/function/samples/top-level-side-effect-on-imported/_config.js b/test/function/samples/top-level-side-effect-on-imported/_config.js index f07d5803f16..a7bfb6c8095 100644 --- a/test/function/samples/top-level-side-effect-on-imported/_config.js +++ b/test/function/samples/top-level-side-effect-on-imported/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'top level function calls are preserved' -}; +}); diff --git a/test/function/samples/top-level-side-effects-are-preserved/_config.js b/test/function/samples/top-level-side-effects-are-preserved/_config.js index 7201d855e32..51b9d3c41ab 100644 --- a/test/function/samples/top-level-side-effects-are-preserved/_config.js +++ b/test/function/samples/top-level-side-effects-are-preserved/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'top level side effects are preserved' -}; +}); diff --git a/test/function/samples/trace-inclusion-of-virtual-literals/_config.js b/test/function/samples/trace-inclusion-of-virtual-literals/_config.js index a9c896b523b..aefc966fd44 100644 --- a/test/function/samples/trace-inclusion-of-virtual-literals/_config.js +++ b/test/function/samples/trace-inclusion-of-virtual-literals/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks the "included" state of virtual literals with regard to mutating oparations' -}; +}); diff --git a/test/function/samples/track-async-arrow-function-return-value/_config.js b/test/function/samples/track-async-arrow-function-return-value/_config.js index 477121a5bee..b607298c30e 100644 --- a/test/function/samples/track-async-arrow-function-return-value/_config.js +++ b/test/function/samples/track-async-arrow-function-return-value/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'tracks object mutations of async arrow function return values', async exports(exports) { assert.strictEqual(exports.toggled, false); await exports.test(); assert.strictEqual(exports.toggled, true); } -}; +}); diff --git a/test/function/samples/track-async-function-return-value/_config.js b/test/function/samples/track-async-function-return-value/_config.js index af8b08ff12f..fa7b58595fd 100644 --- a/test/function/samples/track-async-function-return-value/_config.js +++ b/test/function/samples/track-async-function-return-value/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'tracks object mutations of async function return values', async exports(exports) { assert.strictEqual(exports.toggled, false); await exports.test(); assert.strictEqual(exports.toggled, true); } -}; +}); diff --git a/test/function/samples/track-awaited-object/_config.js b/test/function/samples/track-awaited-object/_config.js index f78fd6dc4ad..5e1de56846a 100644 --- a/test/function/samples/track-awaited-object/_config.js +++ b/test/function/samples/track-awaited-object/_config.js @@ -1,10 +1,10 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'tracks object mutations through await', async exports(exports) { assert.strictEqual(exports.toggled, false); await exports.test(); assert.strictEqual(exports.toggled, true); } -}; +}); diff --git a/test/function/samples/track-conditional-expression-return-reassignments/_config.js b/test/function/samples/track-conditional-expression-return-reassignments/_config.js index 4a727bbfbf5..a8feb8107c2 100644 --- a/test/function/samples/track-conditional-expression-return-reassignments/_config.js +++ b/test/function/samples/track-conditional-expression-return-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks reassignments of return expressions of conditional expressions' -}; +}); diff --git a/test/function/samples/track-logical-expression-return-reassignments/_config.js b/test/function/samples/track-logical-expression-return-reassignments/_config.js index 621b12db34e..b7d741778a4 100644 --- a/test/function/samples/track-logical-expression-return-reassignments/_config.js +++ b/test/function/samples/track-logical-expression-return-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks reassignments of return expressions of logical expressions' -}; +}); diff --git a/test/function/samples/track-multiple-return-expression-reassignments/_config.js b/test/function/samples/track-multiple-return-expression-reassignments/_config.js index cf6ff7bef33..d449156e83f 100644 --- a/test/function/samples/track-multiple-return-expression-reassignments/_config.js +++ b/test/function/samples/track-multiple-return-expression-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks reassignments of return expressions of multiple return expressions' -}; +}); diff --git a/test/function/samples/track-parameter-return-reassignments/_config.js b/test/function/samples/track-parameter-return-reassignments/_config.js index 991743fb8ab..788c348966a 100644 --- a/test/function/samples/track-parameter-return-reassignments/_config.js +++ b/test/function/samples/track-parameter-return-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks reassignments of return expressions of parameters' -}; +}); diff --git a/test/function/samples/track-reassigned-object-expression-return-reassignments/_config.js b/test/function/samples/track-reassigned-object-expression-return-reassignments/_config.js index 9012c4c069e..9f302052bfd 100644 --- a/test/function/samples/track-reassigned-object-expression-return-reassignments/_config.js +++ b/test/function/samples/track-reassigned-object-expression-return-reassignments/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks reassignments of return expressions of members of reassigned object expressions' -}; +}); diff --git a/test/function/samples/track-reassignments/_config.js b/test/function/samples/track-reassignments/_config.js index 5776de3fe6f..b18c8704fca 100644 --- a/test/function/samples/track-reassignments/_config.js +++ b/test/function/samples/track-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'properly track reassignments (#4468)' -}; +}); diff --git a/test/function/samples/tracks-alias-mutations-b/_config.js b/test/function/samples/tracks-alias-mutations-b/_config.js index a06a799c7e0..379ccc88c8b 100644 --- a/test/function/samples/tracks-alias-mutations-b/_config.js +++ b/test/function/samples/tracks-alias-mutations-b/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const foo = {}; -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of aliased objects', context: { foo @@ -10,4 +10,4 @@ module.exports = { exports() { assert.equal(foo.x, 42); } -}; +}); diff --git a/test/function/samples/tracks-alias-mutations/_config.js b/test/function/samples/tracks-alias-mutations/_config.js index f2faaad0e87..1215da48bd9 100644 --- a/test/function/samples/tracks-alias-mutations/_config.js +++ b/test/function/samples/tracks-alias-mutations/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'tracks mutations of aliased objects' -}; +}); diff --git a/test/function/samples/transform-empty-string/_config.js b/test/function/samples/transform-empty-string/_config.js index 72a586be0c9..29fed051b86 100644 --- a/test/function/samples/transform-empty-string/_config.js +++ b/test/function/samples/transform-empty-string/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const sideEffects = []; -module.exports = { +module.exports = defineRollupTest({ description: 'allows transformers to transform code to an empty string', context: { sideEffects }, exports() { @@ -18,4 +18,4 @@ module.exports = { } } } -}; +}); diff --git a/test/function/samples/transform-without-code-warn-ast/_config.js b/test/function/samples/transform-without-code-warn-ast/_config.js index ef751ca124e..503650acac6 100644 --- a/test/function/samples/transform-without-code-warn-ast/_config.js +++ b/test/function/samples/transform-without-code-warn-ast/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns when returning a map but no code from a transform hook', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { 'The plugin "test-plugin" returned a "map" or "ast" without returning a "code". This will be ignored.' } ] -}; +}); diff --git a/test/function/samples/transform-without-code-warn-map/_config.js b/test/function/samples/transform-without-code-warn-map/_config.js index c8e3689ab50..1bc704090ea 100644 --- a/test/function/samples/transform-without-code-warn-map/_config.js +++ b/test/function/samples/transform-without-code-warn-map/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns when returning a map but no code from a transform hook', options: { plugins: { @@ -15,4 +15,4 @@ module.exports = { 'The plugin "test-plugin" returned a "map" or "ast" without returning a "code". This will be ignored.' } ] -}; +}); diff --git a/test/function/samples/transform-without-code/_config.js b/test/function/samples/transform-without-code/_config.js index fc9dfd70e17..07871f0bdd0 100644 --- a/test/function/samples/transform-without-code/_config.js +++ b/test/function/samples/transform-without-code/_config.js @@ -3,7 +3,7 @@ const { readFileSync } = require('node:fs'); const path = require('node:path'); const { SourceMapConsumer } = require('source-map'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows using the transform hook for annotations only without returning a code property and breaking sourcemaps', options: { @@ -38,4 +38,4 @@ module.exports = { sourcemap: true } } -}; +}); diff --git a/test/function/samples/transformer-async/_config.js b/test/function/samples/transformer-async/_config.js index 1457ed86330..b8744b6bfd1 100644 --- a/test/function/samples/transformer-async/_config.js +++ b/test/function/samples/transformer-async/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'transformers can be asynchronous', options: { plugins: [ @@ -19,4 +19,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/transformer-multiple/_config.js b/test/function/samples/transformer-multiple/_config.js index 3e5d98ed043..03ce227edc9 100644 --- a/test/function/samples/transformer-multiple/_config.js +++ b/test/function/samples/transformer-multiple/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'accepts multiple transformer functions', options: { plugins: [ @@ -20,4 +20,4 @@ module.exports = { exports(exports) { assert.equal(exports.magicNumber, 6); } -}; +}); diff --git a/test/function/samples/transformer-single/_config.js b/test/function/samples/transformer-single/_config.js index 1037ac1d409..1f6d7e17972 100644 --- a/test/function/samples/transformer-single/_config.js +++ b/test/function/samples/transformer-single/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'accepts a single transformer function', options: { plugins: [ @@ -14,4 +14,4 @@ module.exports = { exports(exports) { assert.equal(exports.magicNumber, 3); } -}; +}); diff --git a/test/function/samples/transparent-dynamic-inlining/_config.js b/test/function/samples/transparent-dynamic-inlining/_config.js index 8a0844b3a65..8781c8bfe71 100644 --- a/test/function/samples/transparent-dynamic-inlining/_config.js +++ b/test/function/samples/transparent-dynamic-inlining/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'Dynamic import inlining when resolution id is a module in the bundle', code(code) { assert.ok(!code.includes('import(')); @@ -9,4 +9,4 @@ module.exports = { exports(exports) { assert.deepEqual(exports, { y: 42 }); } -}; +}); diff --git a/test/function/samples/tree-shake-object-expression-assignment/_config.js b/test/function/samples/tree-shake-object-expression-assignment/_config.js index 04340104ccd..868fee1a87c 100644 --- a/test/function/samples/tree-shake-object-expression-assignment/_config.js +++ b/test/function/samples/tree-shake-object-expression-assignment/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'renders valid code when the target of an object expression with side-effects is tree-shaken' -}; +}); diff --git a/test/function/samples/tree-shake-variable-declarations-2/_config.js b/test/function/samples/tree-shake-variable-declarations-2/_config.js index 14da162cca0..ae2d2cdc637 100644 --- a/test/function/samples/tree-shake-variable-declarations-2/_config.js +++ b/test/function/samples/tree-shake-variable-declarations-2/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'remove unused variables from declarations (#1831)', code(code) { assert.ok(code.search(/var a = 'test'/) >= 0); } -}; +}); diff --git a/test/function/samples/tree-shake-variable-declarations/_config.js b/test/function/samples/tree-shake-variable-declarations/_config.js index 0cfa1bb96ad..724f95a06db 100644 --- a/test/function/samples/tree-shake-variable-declarations/_config.js +++ b/test/function/samples/tree-shake-variable-declarations/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'remove unused variables from declarations (#1937)', exports(exports) { assert.deepEqual(exports(), [0.07]); } -}; +}); diff --git a/test/function/samples/trim-conditional-branches-in-exports/_config.js b/test/function/samples/trim-conditional-branches-in-exports/_config.js index c084f7edd1b..b5d0692c3b3 100644 --- a/test/function/samples/trim-conditional-branches-in-exports/_config.js +++ b/test/function/samples/trim-conditional-branches-in-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'trims conditional branches with a renamed default export' -}; +}); diff --git a/test/function/samples/try-catch-scoping/_config.js b/test/function/samples/try-catch-scoping/_config.js index 9518d7d678c..a4e7846dca2 100644 --- a/test/function/samples/try-catch-scoping/_config.js +++ b/test/function/samples/try-catch-scoping/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'error parameter in catch clause is correctly scoped' -}; +}); diff --git a/test/function/samples/unknown-for-loop-variables/_config.js b/test/function/samples/unknown-for-loop-variables/_config.js index 3cdd03fec38..8415f8ed27f 100644 --- a/test/function/samples/unknown-for-loop-variables/_config.js +++ b/test/function/samples/unknown-for-loop-variables/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'treat for-in and for-of loop variables as unknown' -}; +}); diff --git a/test/function/samples/unknown-generated-code-preset/_config.js b/test/function/samples/unknown-generated-code-preset/_config.js index 7f6009c536c..d2740e046a5 100644 --- a/test/function/samples/unknown-generated-code-preset/_config.js +++ b/test/function/samples/unknown-generated-code-preset/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for unknown presets for the generatedCode option', options: { output: { @@ -11,4 +11,4 @@ module.exports = { 'Invalid value "some-string" for option "output.generatedCode.preset" - valid values are "es2015" and "es5".', url: 'https://rollupjs.org/configuration-options/#output-generatedcode' } -}; +}); diff --git a/test/function/samples/unknown-generated-code-value/_config.js b/test/function/samples/unknown-generated-code-value/_config.js index 375a6b9055f..faddcdf1462 100644 --- a/test/function/samples/unknown-generated-code-value/_config.js +++ b/test/function/samples/unknown-generated-code-value/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for unknown string values for the generatedCode option', options: { output: { @@ -11,4 +11,4 @@ module.exports = { 'Invalid value "some-string" for option "output.generatedCode" - valid values are "es2015" and "es5". You can also supply an object for more fine-grained control.', url: 'https://rollupjs.org/configuration-options/#output-generatedcode' } -}; +}); diff --git a/test/function/samples/unknown-global-side-effects/_config.js b/test/function/samples/unknown-global-side-effects/_config.js index a69fbb8a562..b4a1a19c85b 100644 --- a/test/function/samples/unknown-global-side-effects/_config.js +++ b/test/function/samples/unknown-global-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not omit side-effects from unknown globals', exports(exports) { let error; @@ -11,4 +11,4 @@ module.exports = { throw new TypeError('Expected a ReferenceError to be thrown.'); } } -}; +}); diff --git a/test/function/samples/unknown-statement/_config.js b/test/function/samples/unknown-statement/_config.js index b52eca19457..df12eb1c9cf 100644 --- a/test/function/samples/unknown-statement/_config.js +++ b/test/function/samples/unknown-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles unknown statements' -}; +}); diff --git a/test/function/samples/unknown-treeshake-preset/_config.js b/test/function/samples/unknown-treeshake-preset/_config.js index 59ef474c558..d5c7361b280 100644 --- a/test/function/samples/unknown-treeshake-preset/_config.js +++ b/test/function/samples/unknown-treeshake-preset/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for unknown presets for the treeshake option', options: { treeshake: { preset: 'some-string' } @@ -9,4 +9,4 @@ module.exports = { 'Invalid value "some-string" for option "treeshake.preset" - valid values are "recommended", "safest" and "smallest".', url: 'https://rollupjs.org/configuration-options/#treeshake' } -}; +}); diff --git a/test/function/samples/unknown-treeshake-value/_config.js b/test/function/samples/unknown-treeshake-value/_config.js index 0311f02d01b..420f5eed196 100644 --- a/test/function/samples/unknown-treeshake-value/_config.js +++ b/test/function/samples/unknown-treeshake-value/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'throws for unknown string values for the treeshake option', options: { treeshake: 'some-string' @@ -9,4 +9,4 @@ module.exports = { 'Invalid value "some-string" for option "treeshake" - valid values are false, true, "recommended", "safest" and "smallest". You can also supply an object for more fine-grained control.', url: 'https://rollupjs.org/configuration-options/#treeshake' } -}; +}); diff --git a/test/function/samples/unused-constructor-argument-fallback/_config.js b/test/function/samples/unused-constructor-argument-fallback/_config.js index 648b74ac149..ec7a335ffdc 100644 --- a/test/function/samples/unused-constructor-argument-fallback/_config.js +++ b/test/function/samples/unused-constructor-argument-fallback/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles unused logical expressions as constructor arguments (#4517)', exports({ create }) { assert.strictEqual(create().foo, 'foo'); } -}; +}); diff --git a/test/function/samples/unused-do-while-loop-declaration/_config.js b/test/function/samples/unused-do-while-loop-declaration/_config.js index 9b51c20745a..628b959abbc 100644 --- a/test/function/samples/unused-do-while-loop-declaration/_config.js +++ b/test/function/samples/unused-do-while-loop-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not partially tree-shake unused declarations with side-effects in do-while loop bodies' -}; +}); diff --git a/test/function/samples/unused-for-in-loop-declaration/_config.js b/test/function/samples/unused-for-in-loop-declaration/_config.js index 9da0091ef68..771966afc3c 100644 --- a/test/function/samples/unused-for-in-loop-declaration/_config.js +++ b/test/function/samples/unused-for-in-loop-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not partially tree-shake unused declarations with side-effects in for-in loop bodies' -}; +}); diff --git a/test/function/samples/unused-for-loop-body-declaration/_config.js b/test/function/samples/unused-for-loop-body-declaration/_config.js index 5912da84ed0..3994d7589cb 100644 --- a/test/function/samples/unused-for-loop-body-declaration/_config.js +++ b/test/function/samples/unused-for-loop-body-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not partially tree-shake unused declarations with side-effects in for loop bodies' -}; +}); diff --git a/test/function/samples/unused-for-loop-init-declaration/_config.js b/test/function/samples/unused-for-loop-init-declaration/_config.js index ed47aec6333..769f89243b2 100644 --- a/test/function/samples/unused-for-loop-init-declaration/_config.js +++ b/test/function/samples/unused-for-loop-init-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not partially tree-shake unused declarations with side-effects in for loops' -}; +}); diff --git a/test/function/samples/unused-for-of-loop-declaration/_config.js b/test/function/samples/unused-for-of-loop-declaration/_config.js index 4741e2c4ceb..f8c43ed3f37 100644 --- a/test/function/samples/unused-for-of-loop-declaration/_config.js +++ b/test/function/samples/unused-for-of-loop-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not partially tree-shake unused declarations with side-effects in for-of loop bodies' -}; +}); diff --git a/test/function/samples/unused-if-statement-declaration/_config.js b/test/function/samples/unused-if-statement-declaration/_config.js index ed47aec6333..769f89243b2 100644 --- a/test/function/samples/unused-if-statement-declaration/_config.js +++ b/test/function/samples/unused-if-statement-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not partially tree-shake unused declarations with side-effects in for loops' -}; +}); diff --git a/test/function/samples/unused-import/_config.js b/test/function/samples/unused-import/_config.js index 912298b0036..8df4ffef2d8 100644 --- a/test/function/samples/unused-import/_config.js +++ b/test/function/samples/unused-import/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns on unused imports ([#595])', options: { external: ['external'] @@ -21,4 +21,4 @@ module.exports = { names: ['notused', 'neverused'] } ] -}; +}); diff --git a/test/function/samples/unused-parameter-side-effects/_config.js b/test/function/samples/unused-parameter-side-effects/_config.js index f8c2ead51f4..0ea30e69778 100644 --- a/test/function/samples/unused-parameter-side-effects/_config.js +++ b/test/function/samples/unused-parameter-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not tree-shake arguments where the corresponding parameters have side-effects' -}; +}); diff --git a/test/function/samples/unused-parenthesed-assignment/_config.js b/test/function/samples/unused-parenthesed-assignment/_config.js index 24d8c766197..edceb4dc544 100644 --- a/test/function/samples/unused-parenthesed-assignment/_config.js +++ b/test/function/samples/unused-parenthesed-assignment/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'correctly simplifies assignments with right-hand-sides in parentheses (#3924)', context: { someObject: { isTrue: true } } -}; +}); diff --git a/test/function/samples/unused-var-a/_config.js b/test/function/samples/unused-var-a/_config.js index 05a2b74ac31..fd1b85b9ee3 100644 --- a/test/function/samples/unused-var-a/_config.js +++ b/test/function/samples/unused-var-a/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'omits unused var declaration (a)' -}; +}); diff --git a/test/function/samples/unused-var-b/_config.js b/test/function/samples/unused-var-b/_config.js index 174d9fec4d5..25cd8171eb2 100644 --- a/test/function/samples/unused-var-b/_config.js +++ b/test/function/samples/unused-var-b/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'omits unused var declaration (b)' -}; +}); diff --git a/test/function/samples/unused-var-c/_config.js b/test/function/samples/unused-var-c/_config.js index e40d968afae..eda3b59d436 100644 --- a/test/function/samples/unused-var-c/_config.js +++ b/test/function/samples/unused-var-c/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'omits unused var declaration (c)' -}; +}); diff --git a/test/function/samples/unused-var-d/_config.js b/test/function/samples/unused-var-d/_config.js index 78379d68b47..e5884001d2f 100644 --- a/test/function/samples/unused-var-d/_config.js +++ b/test/function/samples/unused-var-d/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'omits unused var declaration (d)' -}; +}); diff --git a/test/function/samples/unused-while-loop-declaration/_config.js b/test/function/samples/unused-while-loop-declaration/_config.js index 4f236593d35..987e44d89d5 100644 --- a/test/function/samples/unused-while-loop-declaration/_config.js +++ b/test/function/samples/unused-while-loop-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not partially tree-shake unused declarations with side-effects in while loop bodies' -}; +}); diff --git a/test/function/samples/update-expression-accessors/_config.js b/test/function/samples/update-expression-accessors/_config.js index f271e4ae349..99d720575dc 100644 --- a/test/function/samples/update-expression-accessors/_config.js +++ b/test/function/samples/update-expression-accessors/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'deoptimizes "this" for accessors triggered by update expressions' -}; +}); diff --git a/test/function/samples/update-expression-of-import-fails/_config.js b/test/function/samples/update-expression-of-import-fails/_config.js index e478600076d..23e069568cd 100644 --- a/test/function/samples/update-expression-of-import-fails/_config.js +++ b/test/function/samples/update-expression-of-import-fails/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'disallows updates to imported bindings', error: { code: 'ILLEGAL_REASSIGNMENT', @@ -21,6 +21,6 @@ module.exports = { watchFiles: [ID_FOO, ID_MAIN], message: 'Illegal reassignment of import "a" in "main.js".' } -}; +}); // test copied from https://github.com/esnext/es6-module-transpiler/tree/master/test/examples/update-expression-of-import-fails diff --git a/test/function/samples/use-class-name-in-static-block/_config.js b/test/function/samples/use-class-name-in-static-block/_config.js index 53bc76e249c..053001db5de 100644 --- a/test/function/samples/use-class-name-in-static-block/_config.js +++ b/test/function/samples/use-class-name-in-static-block/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'use the original class name instead of renderName in class body', minNodeVersion: 16 -}; +}); diff --git a/test/function/samples/use-var-before-decl/_config.js b/test/function/samples/use-var-before-decl/_config.js index c39aa3c5730..1920a03d43d 100644 --- a/test/function/samples/use-var-before-decl/_config.js +++ b/test/function/samples/use-var-before-decl/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'exercise `var` variables before their declarations' -}; +}); diff --git a/test/function/samples/uses-supplied-ast/_config.js b/test/function/samples/uses-supplied-ast/_config.js index eff176ea03b..195582af893 100644 --- a/test/function/samples/uses-supplied-ast/_config.js +++ b/test/function/samples/uses-supplied-ast/_config.js @@ -20,7 +20,7 @@ const modules = { }; modules.foo.ast._ignoredProp = {}; -module.exports = { +module.exports = defineRollupTest({ description: 'uses supplied AST', options: { plugins: [ @@ -39,4 +39,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/validate-output/_config.js b/test/function/samples/validate-output/_config.js index 1dff84eda97..14d3c3da8c7 100644 --- a/test/function/samples/validate-output/_config.js +++ b/test/function/samples/validate-output/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles validate failure', options: { onwarn(warning) { @@ -23,4 +23,4 @@ module.exports = { line: 5 } } -}; +}); diff --git a/test/function/samples/validate-resolved-by-logic/_config.js b/test/function/samples/validate-resolved-by-logic/_config.js index e2cc4dbcda8..31887dbce9e 100644 --- a/test/function/samples/validate-resolved-by-logic/_config.js +++ b/test/function/samples/validate-resolved-by-logic/_config.js @@ -6,7 +6,7 @@ const BAR_IMPORTED_PATH = './bar.js'; const OTHER_IMPORTED_PATH = './other.js'; const MAIN_PATH = resolve(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'validate resolvedBy logic', options: { plugins: [ @@ -48,4 +48,4 @@ module.exports = { } ] } -}; +}); diff --git a/test/function/samples/vars-in-for-loop-head/_config.js b/test/function/samples/vars-in-for-loop-head/_config.js index 166d6eea4e8..0702e836c6d 100644 --- a/test/function/samples/vars-in-for-loop-head/_config.js +++ b/test/function/samples/vars-in-for-loop-head/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not break apart vars in for loop head' -}; +}); diff --git a/test/function/samples/vars-not-removed-in-if-block/_config.js b/test/function/samples/vars-not-removed-in-if-block/_config.js index c34bcea62e6..df6d46a3cf8 100644 --- a/test/function/samples/vars-not-removed-in-if-block/_config.js +++ b/test/function/samples/vars-not-removed-in-if-block/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves var declarations in if blocks (#1113)' -}; +}); diff --git a/test/function/samples/vars-not-removed/_config.js b/test/function/samples/vars-not-removed/_config.js index b3daeeff16a..47a079e4bad 100644 --- a/test/function/samples/vars-not-removed/_config.js +++ b/test/function/samples/vars-not-removed/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'does not erroneously remove var/let/const keywords (#390)' -}; +}); diff --git a/test/function/samples/vars-with-init-in-dead-branch/_config.js b/test/function/samples/vars-with-init-in-dead-branch/_config.js index f0b620aaeb2..dd7451c7346 100644 --- a/test/function/samples/vars-with-init-in-dead-branch/_config.js +++ b/test/function/samples/vars-with-init-in-dead-branch/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'handles vars with init in dead branch (#1198)', warnings: [ { @@ -7,4 +7,4 @@ module.exports = { names: ['main'] } ] -}; +}); diff --git a/test/function/samples/warn-missing-iife-name/_config.js b/test/function/samples/warn-missing-iife-name/_config.js index b6a212a74a0..d77444d97e5 100644 --- a/test/function/samples/warn-missing-iife-name/_config.js +++ b/test/function/samples/warn-missing-iife-name/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns if no name is provided for an IIFE bundle', options: { output: { format: 'iife' } }, warnings: [ @@ -9,4 +9,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-name' } ] -}; +}); diff --git a/test/function/samples/warn-on-auto-named-default-exports/_config.js b/test/function/samples/warn-on-auto-named-default-exports/_config.js index a8a0b564a01..35159e970c7 100644 --- a/test/function/samples/warn-on-auto-named-default-exports/_config.js +++ b/test/function/samples/warn-on-auto-named-default-exports/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns if default and named exports are used in auto mode', warnings: [ { @@ -12,4 +12,4 @@ module.exports = { url: 'https://rollupjs.org/configuration-options/#output-exports' } ] -}; +}); diff --git a/test/function/samples/warn-on-empty-bundle/_config.js b/test/function/samples/warn-on-empty-bundle/_config.js index b4416af6431..237811e4722 100644 --- a/test/function/samples/warn-on-empty-bundle/_config.js +++ b/test/function/samples/warn-on-empty-bundle/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns if empty bundle is generated (#444)', warnings: [ { @@ -7,4 +7,4 @@ module.exports = { names: ['main'] } ] -}; +}); diff --git a/test/function/samples/warn-on-eval/_config.js b/test/function/samples/warn-on-eval/_config.js index 892336bae44..95e845ee673 100644 --- a/test/function/samples/warn-on-eval/_config.js +++ b/test/function/samples/warn-on-eval/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns about use of eval', warnings: [ { @@ -21,4 +21,4 @@ module.exports = { ^` } ] -}; +}); diff --git a/test/function/samples/warn-on-namespace-conflict/_config.js b/test/function/samples/warn-on-namespace-conflict/_config.js index ff69ef2b844..443c9cc67f0 100644 --- a/test/function/samples/warn-on-namespace-conflict/_config.js +++ b/test/function/samples/warn-on-namespace-conflict/_config.js @@ -3,7 +3,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); const ID_BAR = path.join(__dirname, 'bar.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns on duplicate export * from', warnings: [ { @@ -15,4 +15,4 @@ module.exports = { reexporter: ID_MAIN } ] -}; +}); diff --git a/test/function/samples/warn-on-top-level-this/_config.js b/test/function/samples/warn-on-top-level-this/_config.js index 8b4aec93fb7..cb1dcf1fc58 100644 --- a/test/function/samples/warn-on-top-level-this/_config.js +++ b/test/function/samples/warn-on-top-level-this/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const { assertIncludes } = require('../../../utils.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns on top-level this (#770)', warnings: [ { @@ -27,4 +27,4 @@ module.exports = { assertIncludes(error.message, 'Cannot set propert'); assertIncludes(error.message, "'foo'"); } -}; +}); diff --git a/test/function/samples/warn-on-unused-missing-imports/_config.js b/test/function/samples/warn-on-unused-missing-imports/_config.js index f93e8accc5a..7bad486701f 100644 --- a/test/function/samples/warn-on-unused-missing-imports/_config.js +++ b/test/function/samples/warn-on-unused-missing-imports/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'warns on missing (but unused) imports', warnings: [ { @@ -25,4 +25,4 @@ module.exports = { 3: assert.equal( a, 42 );` } ] -}; +}); diff --git a/test/function/samples/warning-incorrect-sourcemap-location/_config.js b/test/function/samples/warning-incorrect-sourcemap-location/_config.js index 3dba1354083..a463c26b0eb 100644 --- a/test/function/samples/warning-incorrect-sourcemap-location/_config.js +++ b/test/function/samples/warning-incorrect-sourcemap-location/_config.js @@ -2,7 +2,7 @@ const { join } = require('node:path'); const ID_MAIN = join(__dirname, 'main.js'); const ID_CONSTANTS = join(__dirname, 'constants.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'does not fail if a warning has an incorrect location due to missing sourcemaps', options: { plugins: [ @@ -31,4 +31,4 @@ module.exports = { url: 'https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module' } ] -}; +}); diff --git a/test/function/samples/warning-low-resolution-location/_config.js b/test/function/samples/warning-low-resolution-location/_config.js index 232ec5ea80e..008baece3d3 100644 --- a/test/function/samples/warning-low-resolution-location/_config.js +++ b/test/function/samples/warning-low-resolution-location/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const { encode } = require('@jridgewell/sourcemap-codec'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles when a low resolution sourcemap is used to report an error', options: { plugins: { @@ -34,4 +34,4 @@ module.exports = { url: 'https://rollupjs.org/troubleshooting/#error-this-is-undefined' } ] -}; +}); diff --git a/test/function/samples/warnings-to-string/_config.js b/test/function/samples/warnings-to-string/_config.js index b397e1c5b2f..54b44aed6ff 100644 --- a/test/function/samples/warnings-to-string/_config.js +++ b/test/function/samples/warnings-to-string/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'provides a string conversion for warnings', options: { plugins: { @@ -16,4 +16,4 @@ module.exports = { 'Generated an empty chunk: "main".' ]); } -}; +}); diff --git a/test/function/samples/warns-for-invalid-options/_config.js b/test/function/samples/warns-for-invalid-options/_config.js index d4bdcdbefb7..52750c5d00b 100644 --- a/test/function/samples/warns-for-invalid-options/_config.js +++ b/test/function/samples/warns-for-invalid-options/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'warns for invalid options', options: { myInvalidInputOption: true, @@ -20,4 +20,4 @@ module.exports = { require('../../../misc/optionList').output } ] -}; +}); diff --git a/test/function/samples/watch-option/_config.js b/test/function/samples/watch-option/_config.js index 6c0b780f634..b1f849834b2 100644 --- a/test/function/samples/watch-option/_config.js +++ b/test/function/samples/watch-option/_config.js @@ -1,6 +1,6 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'expects watch option', options: { watch: {} } -}; +}); diff --git a/test/function/samples/wraps-object-expressions-as-statements/_config.js b/test/function/samples/wraps-object-expressions-as-statements/_config.js index 0e64ab19194..501cc73c432 100644 --- a/test/function/samples/wraps-object-expressions-as-statements/_config.js +++ b/test/function/samples/wraps-object-expressions-as-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'wraps object expressions that have become statements' -}; +}); diff --git a/test/function/samples/wraps-simplified-expressions/_config.js b/test/function/samples/wraps-simplified-expressions/_config.js index 8ba4fe8910b..ab8c55707ff 100644 --- a/test/function/samples/wraps-simplified-expressions/_config.js +++ b/test/function/samples/wraps-simplified-expressions/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'wraps simplified expressions that have become callees if necessary', warnings: warnings => { for (const warning of warnings) assert.equal(warning.code, 'EVAL'); } -}; +}); diff --git a/test/hooks/index.js b/test/hooks/index.js index 3ad4fa44503..7c8a4107fea 100644 --- a/test/hooks/index.js +++ b/test/hooks/index.js @@ -1,6 +1,9 @@ const assert = require('node:assert'); const path = require('node:path'); const { outputFile, readdir, remove } = require('fs-extra'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const rollup = require('../../dist/rollup.js'); const { loader, wait } = require('../utils.js'); diff --git a/test/incremental/index.js b/test/incremental/index.js index c10d7840b7d..304b73e4873 100644 --- a/test/incremental/index.js +++ b/test/incremental/index.js @@ -1,5 +1,8 @@ const assert = require('node:assert'); const acorn = require('acorn'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const rollup = require('../../dist/rollup'); const { executeBundle, getObject } = require('../utils.js'); diff --git a/test/leak/index.js b/test/leak/index.js index 094a647f93d..ab15dd12a76 100644 --- a/test/leak/index.js +++ b/test/leak/index.js @@ -1,5 +1,8 @@ const path = require('node:path'); const weak = require('weak-napi'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const rollup = require('../..'); const { wait } = require('../utils'); diff --git a/test/sourcemaps/index.js b/test/sourcemaps/index.js index f1a0c15fad4..ece3af688f2 100644 --- a/test/sourcemaps/index.js +++ b/test/sourcemaps/index.js @@ -1,4 +1,7 @@ const path = require('node:path'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const rollup = require('../../dist/rollup'); const { compareWarnings, runTestSuiteWithSamples } = require('../utils.js'); diff --git a/test/sourcemaps/samples/basic-support/_config.js b/test/sourcemaps/samples/basic-support/_config.js index 4ff9884cf06..e6725e48696 100644 --- a/test/sourcemaps/samples/basic-support/_config.js +++ b/test/sourcemaps/samples/basic-support/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'basic sourcemap support', async test(code, map) { assert.equal(map.version, 3); @@ -36,4 +36,4 @@ module.exports = { assert.equal(originalLoc.column, 1); assert.equal(originalLoc.source, '../bar.js'); } -}; +}); diff --git a/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js b/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js index 641450b80de..a0a20cd4f60 100644 --- a/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js +++ b/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js @@ -5,7 +5,7 @@ const MagicString = require('magic-string'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'get combined sourcemap in transforming with loader', options: { plugins: [ @@ -76,7 +76,7 @@ module.exports = { testFoo(code, smc); testMain(code, smc); } -}; +}); function testFoo(code, smc) { const generatedLoc = getLocation(code, code.indexOf(42)); diff --git a/test/sourcemaps/samples/combined-sourcemap/_config.js b/test/sourcemaps/samples/combined-sourcemap/_config.js index 5c65693d705..ee817b75cc7 100644 --- a/test/sourcemaps/samples/combined-sourcemap/_config.js +++ b/test/sourcemaps/samples/combined-sourcemap/_config.js @@ -3,7 +3,7 @@ const MagicString = require('magic-string'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'get combined sourcemap in transforming', options: { plugins: [ @@ -62,7 +62,7 @@ module.exports = { testFoo(code, smc); testMain(code, smc); } -}; +}); function testFoo(code, smc) { const generatedLoc = getLocation(code, code.indexOf(42)); diff --git a/test/sourcemaps/samples/excludes-plugin-helpers/_config.js b/test/sourcemaps/samples/excludes-plugin-helpers/_config.js index 0dece505534..9b064f2d40b 100644 --- a/test/sourcemaps/samples/excludes-plugin-helpers/_config.js +++ b/test/sourcemaps/samples/excludes-plugin-helpers/_config.js @@ -4,7 +4,7 @@ const path = require('node:path'); const HELPER = '\0helper'; -module.exports = { +module.exports = defineRollupTest({ description: 'excludes plugin helpers from sources', options: { output: { @@ -29,4 +29,4 @@ module.exports = { assert.equal(map.sourcesContent.length, 1); assert.ok(/main/.test(map.sources[0])); } -}; +}); diff --git a/test/sourcemaps/samples/existing-external-sourcemaps-combined/_config.js b/test/sourcemaps/samples/existing-external-sourcemaps-combined/_config.js index d1fafbaa76f..f1283d2dbb1 100644 --- a/test/sourcemaps/samples/existing-external-sourcemaps-combined/_config.js +++ b/test/sourcemaps/samples/existing-external-sourcemaps-combined/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'removes sourcemap comments', async test(code) { assert.ok(!code.includes('sourceMappingURL=main.js.map')); } -}; +}); diff --git a/test/sourcemaps/samples/existing-inline-sourcemaps-combined/_config.js b/test/sourcemaps/samples/existing-inline-sourcemaps-combined/_config.js index cf74a52dfbf..d6120344a22 100644 --- a/test/sourcemaps/samples/existing-inline-sourcemaps-combined/_config.js +++ b/test/sourcemaps/samples/existing-inline-sourcemaps-combined/_config.js @@ -1,8 +1,8 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'removes existing inline sourcemaps', async test(code) { assert.ok(!code.includes('sourceMappingURL=data')); } -}; +}); diff --git a/test/sourcemaps/samples/ignore-list-default/_config.js b/test/sourcemaps/samples/ignore-list-default/_config.js index 08df2ee1427..aeea3abedec 100644 --- a/test/sourcemaps/samples/ignore-list-default/_config.js +++ b/test/sourcemaps/samples/ignore-list-default/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'defaults to adding files within node_modules to the ignore list', options: { output: { @@ -14,4 +14,4 @@ module.exports = { assert.deepEqual(map.sources, ['lib.js', 'main.js']); assert.deepEqual(map.x_google_ignoreList, [0]); } -}; +}); diff --git a/test/sourcemaps/samples/ignore-list-false/_config.js b/test/sourcemaps/samples/ignore-list-false/_config.js index 2e2ba1a411c..c5b73f103ba 100644 --- a/test/sourcemaps/samples/ignore-list-false/_config.js +++ b/test/sourcemaps/samples/ignore-list-false/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'accepts false for `sourcemapIgnoreList` to disable the default ignore-listing of node_modules', options: { @@ -16,4 +16,4 @@ module.exports = { assert.deepEqual(map.sources, ['lib.js', 'main.js']); assert.strictEqual(map.x_google_ignoreList, undefined); } -}; +}); diff --git a/test/sourcemaps/samples/ignore-list-source-files/_config.js b/test/sourcemaps/samples/ignore-list-source-files/_config.js index 9f583194663..07737703756 100644 --- a/test/sourcemaps/samples/ignore-list-source-files/_config.js +++ b/test/sourcemaps/samples/ignore-list-source-files/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'populates ignore list', options: { output: { @@ -15,4 +15,4 @@ module.exports = { assert.deepEqual(map.sources, ['lib1.js', 'lib2.js', 'main.js']); assert.deepEqual(map.x_google_ignoreList, [0, 1]); } -}; +}); diff --git a/test/sourcemaps/samples/ignore-list-sourcemap-path/_config.js b/test/sourcemaps/samples/ignore-list-sourcemap-path/_config.js index a707dfd5c87..1a054f574c7 100644 --- a/test/sourcemaps/samples/ignore-list-sourcemap-path/_config.js +++ b/test/sourcemaps/samples/ignore-list-sourcemap-path/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'correctly passes source map path', options: { output: { @@ -18,4 +18,4 @@ module.exports = { assert.deepEqual(map.sources, ['main.js']); assert.deepEqual(map.x_google_ignoreList, [0]); } -}; +}); diff --git a/test/sourcemaps/samples/loaders/_config.js b/test/sourcemaps/samples/loaders/_config.js index 7ef4e46f14f..6d51a94ea78 100644 --- a/test/sourcemaps/samples/loaders/_config.js +++ b/test/sourcemaps/samples/loaders/_config.js @@ -4,7 +4,7 @@ const buble = require('buble'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'preserves sourcemap chains when transforming', options: { plugins: [ @@ -62,4 +62,4 @@ module.exports = { assert.equal(originalLoc.line, 4); assert.equal(originalLoc.column, 19); } -}; +}); diff --git a/test/sourcemaps/samples/names-transformed-render-chunk/_config.js b/test/sourcemaps/samples/names-transformed-render-chunk/_config.js index 875a7ba55a6..def0c76452f 100644 --- a/test/sourcemaps/samples/names-transformed-render-chunk/_config.js +++ b/test/sourcemaps/samples/names-transformed-render-chunk/_config.js @@ -4,7 +4,7 @@ const { SourceMapConsumer } = require('source-map'); const terser = require('terser'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'names are recovered if transforms are used', options: { plugins: [ @@ -59,4 +59,4 @@ module.exports = { name: 'mangleMe' }); } -}; +}); diff --git a/test/sourcemaps/samples/names/_config.js b/test/sourcemaps/samples/names/_config.js index f81631b0354..90183b04284 100644 --- a/test/sourcemaps/samples/names/_config.js +++ b/test/sourcemaps/samples/names/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'names are recovered (https://github.com/rollup/rollup/issues/101)', options: { output: { @@ -26,4 +26,4 @@ module.exports = { original = smc.originalPositionFor(generatedLoc); assert.equal(original.name, 'Foo'); } -}; +}); diff --git a/test/sourcemaps/samples/reified-namespace/_config.js b/test/sourcemaps/samples/reified-namespace/_config.js index 533aa5a1c73..5cc6056c24d 100644 --- a/test/sourcemaps/samples/reified-namespace/_config.js +++ b/test/sourcemaps/samples/reified-namespace/_config.js @@ -4,7 +4,7 @@ const path = require('node:path'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'generates correct sourcemap with reified namespace (#668)', async test(code, map) { const smc = await new SourceMapConsumer(map); @@ -19,4 +19,4 @@ module.exports = { assert.equal(actual.column, expected.column); assert.equal(actual.source, '../main.js'); } -}; +}); diff --git a/test/sourcemaps/samples/relative-paths/_config.js b/test/sourcemaps/samples/relative-paths/_config.js index f9aea3e1567..a280e1057da 100644 --- a/test/sourcemaps/samples/relative-paths/_config.js +++ b/test/sourcemaps/samples/relative-paths/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'source paths are relative with relative dest (#344)', options: { output: { @@ -12,4 +12,4 @@ module.exports = { test(code, map) { assert.deepEqual(map.sources, ['../main.js']); } -}; +}); diff --git a/test/sourcemaps/samples/render-chunk-babili/_config.js b/test/sourcemaps/samples/render-chunk-babili/_config.js index 8e10d52022a..00560058e2d 100644 --- a/test/sourcemaps/samples/render-chunk-babili/_config.js +++ b/test/sourcemaps/samples/render-chunk-babili/_config.js @@ -3,7 +3,7 @@ const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); const babiliResults = require('./babili-results'); -module.exports = { +module.exports = defineRollupTest({ description: 'generates valid sourcemap when source could not be determined', options: { plugins: [ @@ -33,4 +33,4 @@ module.exports = { assert.equal(originalLoc.line, 1); assert.equal(originalLoc.column, 8); } -}; +}); diff --git a/test/sourcemaps/samples/render-chunk/_config.js b/test/sourcemaps/samples/render-chunk/_config.js index 6ccca22403a..f6d2f20fa3a 100644 --- a/test/sourcemaps/samples/render-chunk/_config.js +++ b/test/sourcemaps/samples/render-chunk/_config.js @@ -3,7 +3,7 @@ const { SourceMapConsumer } = require('source-map'); const terser = require('terser'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'preserves sourcemap chains when transforming', options: { plugins: [ @@ -36,4 +36,4 @@ module.exports = { assert.equal(originalLoc.line, 1); assert.equal(originalLoc.column, 8); } -}; +}); diff --git a/test/sourcemaps/samples/single-length-segments/_config.js b/test/sourcemaps/samples/single-length-segments/_config.js index 5217a6b5b9d..d94ad851c80 100644 --- a/test/sourcemaps/samples/single-length-segments/_config.js +++ b/test/sourcemaps/samples/single-length-segments/_config.js @@ -6,7 +6,7 @@ const getLocation = require('../../getLocation'); const original = readFileSync(path.resolve(__dirname, 'main.js'), 'utf8'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles single-length sourcemap segments', options: { plugins: [ @@ -36,4 +36,4 @@ module.exports = { assert.equal(originalLoc.column, expectedLoc.column); } } -}; +}); diff --git a/test/sourcemaps/samples/sourcemap-base-url/_config.js b/test/sourcemaps/samples/sourcemap-base-url/_config.js index 8157403b8b5..c3c9bc0a63c 100644 --- a/test/sourcemaps/samples/sourcemap-base-url/_config.js +++ b/test/sourcemaps/samples/sourcemap-base-url/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const fs = require('node:fs'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'adds a sourcemap base url', options: { output: { @@ -19,4 +19,4 @@ module.exports = { `//# sourceMappingURL=https://example.com/bundle.${profile.format}.js.map` ); } -}; +}); diff --git a/test/sourcemaps/samples/sourcemap-file-hashed/_config.js b/test/sourcemaps/samples/sourcemap-file-hashed/_config.js index e6645e6a4f5..374ae3878e0 100644 --- a/test/sourcemaps/samples/sourcemap-file-hashed/_config.js +++ b/test/sourcemaps/samples/sourcemap-file-hashed/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'populates file property of sourcemap with final name when using hashes', options: { output: { @@ -12,4 +12,4 @@ module.exports = { test: (code, map, { fileName }) => { assert.strictEqual(map.file, fileName); } -}; +}); diff --git a/test/sourcemaps/samples/sourcemap-file/_config.js b/test/sourcemaps/samples/sourcemap-file/_config.js index c76dbdfe1de..4a28f8a4c78 100644 --- a/test/sourcemaps/samples/sourcemap-file/_config.js +++ b/test/sourcemaps/samples/sourcemap-file/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = { +module.exports = defineRollupTest({ description: 'populates file property of sourcemap when plugins are used (#986)', options: { plugins: [ @@ -14,4 +14,4 @@ module.exports = { test: (code, map, profile) => { assert.equal(map.file, `bundle.${profile.format}.js`); } -}; +}); diff --git a/test/sourcemaps/samples/transform-full-source-paths/_config.js b/test/sourcemaps/samples/transform-full-source-paths/_config.js index 4bfc378a652..0230cb1a901 100644 --- a/test/sourcemaps/samples/transform-full-source-paths/_config.js +++ b/test/sourcemaps/samples/transform-full-source-paths/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'provides the full source map path when transforming source maps', options: { output: { @@ -14,4 +14,4 @@ module.exports = { test(code, map) { assert.deepEqual(map.sources, [path.resolve(__dirname, 'main.js').replace(/\\/g, '/')]); } -}; +}); diff --git a/test/sourcemaps/samples/transform-low-resolution/_config.js b/test/sourcemaps/samples/transform-low-resolution/_config.js index e7daeae10aa..378cb86bbf2 100644 --- a/test/sourcemaps/samples/transform-low-resolution/_config.js +++ b/test/sourcemaps/samples/transform-low-resolution/_config.js @@ -4,7 +4,7 @@ const MagicString = require('magic-string'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'handles combining low-resolution and high-resolution source-maps when transforming', options: { output: { name: 'bundle' }, @@ -44,4 +44,4 @@ module.exports = { assert.strictEqual(originalLoc.line, 1); assert.strictEqual(originalLoc.column, 0); } -}; +}); diff --git a/test/sourcemaps/samples/transform-source-paths/_config.js b/test/sourcemaps/samples/transform-source-paths/_config.js index 3f4f8374e48..5bf186be00f 100644 --- a/test/sourcemaps/samples/transform-source-paths/_config.js +++ b/test/sourcemaps/samples/transform-source-paths/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = { +module.exports = defineRollupTest({ description: 'transform sourcemap paths (#2168)', options: { output: { @@ -13,4 +13,4 @@ module.exports = { test(code, map) { assert.deepEqual(map.sources, ['~/pkg-name/main.js']); } -}; +}); diff --git a/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js b/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js index ce9b3ccb1e9..4be44239227 100644 --- a/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js +++ b/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = { +module.exports = defineRollupTest({ description: 'preserves sourcemap chains when transforming', options: { plugins: [ @@ -27,4 +27,4 @@ module.exports = { url: `https://rollupjs.org/troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect` } ] -}; +}); diff --git a/test/sourcemaps/samples/transforms/_config.js b/test/sourcemaps/samples/transforms/_config.js index 8bc8a012231..107a184aeeb 100644 --- a/test/sourcemaps/samples/transforms/_config.js +++ b/test/sourcemaps/samples/transforms/_config.js @@ -4,7 +4,7 @@ const MagicString = require('magic-string'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = { +module.exports = defineRollupTest({ description: 'preserves sourcemap chains when transforming', options: { plugins: [ @@ -46,4 +46,4 @@ module.exports = { assert.equal(originalLoc.line, 3); assert.equal(originalLoc.column, 8); } -}; +}); diff --git a/test/sourcemaps/samples/untransformed-modules/_config.js b/test/sourcemaps/samples/untransformed-modules/_config.js index c9076b2957a..1d41170d296 100644 --- a/test/sourcemaps/samples/untransformed-modules/_config.js +++ b/test/sourcemaps/samples/untransformed-modules/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const MagicString = require('magic-string'); -module.exports = { +module.exports = defineRollupTest({ description: 'allows sourcemap chains with some untransformed modules (#404)', options: { plugins: [ @@ -24,4 +24,4 @@ module.exports = { test() { assert.ok(true); } -}; +}); diff --git a/test/tsconfig.json b/test/tsconfig.json index 507fca2e1e0..0ef2eed9f8c 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "allowJs": true, + "checkJs": true, "target": "esnext", "lib": ["ES2021"], "moduleResolution": "node", @@ -12,5 +13,8 @@ }, "include": [ "**/_config.js" + ], + "references": [ + "./tsconfig.utils.json" ] } diff --git a/test/tsconfig.utils.json b/test/tsconfig.utils.json new file mode 100644 index 00000000000..dce8e346894 --- /dev/null +++ b/test/tsconfig.utils.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "allowJs": true, + // "checkJs": true, // enable once all files are converted to TS + "target": "esnext", + "lib": ["ES2021"], + "moduleResolution": "node", + "types": [ + "node", + "./types.d.ts" + ], + "strict": true + }, + "include": [ + "./utils.js", + "*/index.js" + ] +} diff --git a/test/types.d.ts b/test/types.d.ts index 640c79b000f..32b3793649d 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -3,16 +3,95 @@ import type { SourceMap } from 'magic-string'; import type { RollupError, RollupOptions } from '../src/rollup/types'; export interface RollupTestConfig { + /** + * Only run this test. Should never be committed. + */ solo?: boolean; + /** + * Skip this test. + */ + skip?: boolean; + + execute?: boolean; + + /** + * Description of the test. + */ description: string; + /** + * The command to run for the test. + */ command?: string; + /** + * Rollup options + */ options?: RollupOptions; - error?: RollupError; + /** + * Bundle formats to test. + */ + formats?: string[]; + /** + * Environment variables to set for the test. + */ + env?: Record; + /** + * The directory to run the test in. + */ + nestedDir?: string; + + /** + * Called before the test is run. + */ + before?: () => void | Promise; + /** + * Called after the test is run. + */ + after?: () => void | Promise; + /** + * Assert the stderr of the build. + */ + stderr?: (stderr: string) => void | Promise; + /** + * Assert the stderr stream, return true to abort the test. + */ + abortOnStderr?: (data: string) => boolean | void | Promise; + + /** + * Execute the AMD module. + */ + runAmd?: + | boolean + | { + exports?: (exportObject: any) => void | Promise; + }; + + /** + * Test the expected error. + */ + error?: RollupError | ((error: RollupError) => boolean | void); + /** + * Test the expected warnings. + */ + warnings?: RollupError[] | ((warnings: RollupError[]) => boolean | void); + /** + * Expected warning codes + */ + expectedWarnings?: string[]; + /** + * Test the output of the build. + */ test?: (code: string, map: SourceMap) => void | Promise; + /** + * Assetions for the exports of the bundle. + */ + exports?: (exportObject: any) => void | Promise; skipIfWindows?: boolean; onlyWindows?: boolean; minNodeVersion?: string; + + options1?: RollupOptions; + options2?: RollupOptions; } declare global { diff --git a/test/utils.d.ts b/test/utils.d.ts new file mode 100644 index 00000000000..afdf35a939c --- /dev/null +++ b/test/utils.d.ts @@ -0,0 +1,17 @@ +import type * as Rollup from '../src/rollup/types'; +import type { RollupTestConfig } from './types'; + +type RunTestFunction = (directory: string, config: RollupTestConfig) => void; + +export const rollup: typeof Rollup; + +export function runTestSuiteWithSamples( + suiteName: string, + samplesDirectory: string, + test: RunTestFunction, + onTeardown: () => void | Promise +): void; + +export function assertIncludes(code: string, snippet: string): void; + +export function atomicWriteFileSync(file: string, content: string): void; diff --git a/test/watch/index.js b/test/watch/index.js index fe4e87920d6..d7994a5e667 100644 --- a/test/watch/index.js +++ b/test/watch/index.js @@ -4,6 +4,9 @@ const { rm, unlink, writeFile } = require('node:fs/promises'); const { resolve } = require('node:path'); const { chdir, cwd, hrtime } = require('node:process'); const { copy } = require('fs-extra'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const rollup = require('../../dist/rollup'); const { atomicWriteFileSync, wait } = require('../utils'); From da519e3d82b21067d660b3f44cf28cdac8ce5a60 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 23 Apr 2023 13:46:49 +0200 Subject: [PATCH 03/15] chore: revert vscode config --- .vscode/settings.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index cf00f88a09e..d84818e43f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,5 @@ "typescript.format.enable": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": true - }, - "references.preferredLocation": "peek" + } } From 15b8f485d042eb3af869726fd6bcc26c6fbe98cf Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 23 Apr 2023 13:49:30 +0200 Subject: [PATCH 04/15] chore: fix syntax error --- test/types.d.ts | 4 ++++ test/utils.js | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test/types.d.ts b/test/types.d.ts index 32b3793649d..bd9a418dbbc 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -95,5 +95,9 @@ export interface RollupTestConfig { } declare global { + /** + * Define configuration for a test. + * This function is available globally in the test files. + */ function defineRollupTest(config: RollupTestConfig): RollupTestConfig; } diff --git a/test/utils.js b/test/utils.js index f2d89371f31..f9e21781f53 100644 --- a/test/utils.js +++ b/test/utils.js @@ -14,6 +14,10 @@ const { basename, join } = require('node:path'); const { platform, version } = require('node:process'); const fixturify = require('fixturify'); +if (!globalThis.defineRollupTest) { + globalThis.defineRollupTest = config => config; +} + exports.wait = function wait(ms) { return new Promise(fulfil => { setTimeout(fulfil, ms); @@ -181,7 +185,6 @@ function getFileNamesAndRemoveOutput(directory) { exports.getFileNamesAndRemoveOutput = getFileNamesAndRemoveOutput; function loadConfigAndRunTest(directory, runTest) { - globalThis.defineRollupTest ||= config => config; const configFile = join(directory, '_config.js'); const config = require(configFile); if (!config || !config.description) { From a62e3ef5b0b894cf65e544d986f51875920c6acd Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 23 Apr 2023 14:18:22 +0200 Subject: [PATCH 05/15] chore: improve typecheck --- .vscode/settings.json | 3 +- package-lock.json | 13 +++ package.json | 1 + test/function/index.js | 3 + .../resolve-id-external/_config.js | 3 + test/tsconfig.json | 5 +- test/tsconfig.utils.json | 1 + test/types.d.ts | 8 +- test/utils.d.ts | 17 --- test/utils.js | 104 ++++++++++++++++-- 10 files changed, 130 insertions(+), 28 deletions(-) delete mode 100644 test/utils.d.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index d84818e43f3..cf00f88a09e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,6 @@ "typescript.format.enable": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": true - } + }, + "references.preferredLocation": "peek" } diff --git a/package-lock.json b/package-lock.json index 3c39d2ffc9f..156211ff78c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "@rollup/plugin-typescript": "^11.0.0", "@rollup/pluginutils": "^5.0.2", "@types/estree": "1.0.0", + "@types/mocha": "^10.0.1", "@types/node": "^14.18.36", "@types/signal-exit": "^3.0.1", "@types/yargs-parser": "^21.0.0", @@ -1811,6 +1812,12 @@ "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", "dev": true }, + "node_modules/@types/mocha": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "dev": true + }, "node_modules/@types/node": { "version": "14.18.37", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.37.tgz", @@ -11334,6 +11341,12 @@ "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", "dev": true }, + "@types/mocha": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "dev": true + }, "@types/node": { "version": "14.18.37", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.37.tgz", diff --git a/package.json b/package.json index 68c804a3760..aeb8caad584 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "@rollup/plugin-typescript": "^11.0.0", "@rollup/pluginutils": "^5.0.2", "@types/estree": "1.0.0", + "@types/mocha": "^10.0.1", "@types/node": "^14.18.36", "@types/signal-exit": "^3.0.1", "@types/yargs-parser": "^21.0.0", diff --git a/test/function/index.js b/test/function/index.js index 7adb8f2f182..233fd053aa1 100644 --- a/test/function/index.js +++ b/test/function/index.js @@ -1,5 +1,8 @@ const assert = require('node:assert'); const path = require('node:path'); +/** + * @type {import('../../src/rollup/types')} Rollup + */ const rollup = require('../../dist/rollup'); const { compareError, compareWarnings, runTestSuiteWithSamples } = require('../utils.js'); diff --git a/test/function/samples/module-side-effects/resolve-id-external/_config.js b/test/function/samples/module-side-effects/resolve-id-external/_config.js index 034bb519478..80427c2a74f 100644 --- a/test/function/samples/module-side-effects/resolve-id-external/_config.js +++ b/test/function/samples/module-side-effects/resolve-id-external/_config.js @@ -1,5 +1,8 @@ const assert = require('node:assert'); const path = require('node:path'); +/** + * @type {string[]} + */ const sideEffects = []; const { getObject } = require('../../../../utils'); diff --git a/test/tsconfig.json b/test/tsconfig.json index 0ef2eed9f8c..a5a6f2ccb8b 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -7,9 +7,10 @@ "moduleResolution": "node", "types": [ "node", + "mocha", "./types.d.ts" - ], - "strict": true + ] + // "strict": true // maybe later }, "include": [ "**/_config.js" diff --git a/test/tsconfig.utils.json b/test/tsconfig.utils.json index dce8e346894..c6aed82bd10 100644 --- a/test/tsconfig.utils.json +++ b/test/tsconfig.utils.json @@ -7,6 +7,7 @@ "moduleResolution": "node", "types": [ "node", + "mocha", "./types.d.ts" ], "strict": true diff --git a/test/types.d.ts b/test/types.d.ts index bd9a418dbbc..27e7c7371bf 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -11,7 +11,9 @@ export interface RollupTestConfig { * Skip this test. */ skip?: boolean; - + /** + * Execute the bundled code. + */ execute?: boolean; /** @@ -34,6 +36,10 @@ export interface RollupTestConfig { * Environment variables to set for the test. */ env?: Record; + /** + * The global context executed the bundled code. + */ + context?: Record; /** * The directory to run the test in. */ diff --git a/test/utils.d.ts b/test/utils.d.ts deleted file mode 100644 index afdf35a939c..00000000000 --- a/test/utils.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type * as Rollup from '../src/rollup/types'; -import type { RollupTestConfig } from './types'; - -type RunTestFunction = (directory: string, config: RollupTestConfig) => void; - -export const rollup: typeof Rollup; - -export function runTestSuiteWithSamples( - suiteName: string, - samplesDirectory: string, - test: RunTestFunction, - onTeardown: () => void | Promise -): void; - -export function assertIncludes(code: string, snippet: string): void; - -export function atomicWriteFileSync(file: string, content: string): void; diff --git a/test/utils.js b/test/utils.js index f9e21781f53..11315103aeb 100644 --- a/test/utils.js +++ b/test/utils.js @@ -1,3 +1,10 @@ +/** + * @typedef {import('../src/rollup/types').RollupError} RollupError + * @typedef {import('../src/rollup/types').RollupWarning} RollupWarning + * @typedef {import('./types').RollupTestConfig} RollupTestConfig + * @typedef {(directory: string, config: RollupTestConfig) => void} RunTestFunction + */ + const assert = require('node:assert'); const { closeSync, @@ -18,6 +25,10 @@ if (!globalThis.defineRollupTest) { globalThis.defineRollupTest = config => config; } +/** + * @param {number} ms + * @returns {Promise} + */ exports.wait = function wait(ms) { return new Promise(fulfil => { setTimeout(fulfil, ms); @@ -40,6 +51,10 @@ function normaliseError(error) { return clone; } +/** + * @param {RollupError} actual + * @param {RollupError} expected + */ exports.compareError = function compareError(actual, expected) { actual = normaliseError(actual); if (expected.frame) { @@ -48,6 +63,10 @@ exports.compareError = function compareError(actual, expected) { assert.deepEqual(actual, expected); }; +/** + * @param {RollupWarning[]} actual + * @param {RollupWarning[]} expected + */ exports.compareWarnings = function compareWarnings(actual, expected) { assert.deepEqual( actual.map(normaliseError).sort(sortWarnings), @@ -62,10 +81,17 @@ exports.compareWarnings = function compareWarnings(actual, expected) { ); }; +/** + * @param {RollupWarning} a + * @param {RollupWarning} b + */ function sortWarnings(a, b) { return a.message === b.message ? 0 : a.message < b.message ? -1 : 1; } +/** + * @param {string} stringValue + */ function deindent(stringValue) { return stringValue.slice(1).replace(/^\t+/gm, '').replace(/\s+$/gm, '').trim(); } @@ -85,6 +111,9 @@ exports.executeBundle = async function executeBundle(bundle, require) { return module.exports; }; +/** + * @type {(entries: Iterable<[string, any]>) => Record runSamples(samplesDirectory, runTest, onTeardown)); } // You can run only or skip certain kinds of tests by appending .only or .skip +/** + * @param {string} suiteName + * @param {string} samplesDirectory + * @param {RunTestFunction} runTest + * @param {() => void | Promise} onTeardown + */ runTestSuiteWithSamples.only = function (suiteName, samplesDirectory, runTest, onTeardown) { describe.only(suiteName, () => runSamples(samplesDirectory, runTest, onTeardown)); }; +/** + * @param {string} suiteName + */ runTestSuiteWithSamples.skip = function (suiteName) { describe.skip(suiteName, () => {}); }; exports.runTestSuiteWithSamples = runTestSuiteWithSamples; +/** + * @param {string} samplesDirectory + * @param {RunTestFunction} runTest + * @param {Mocha.Func} onTeardown + */ function runSamples(samplesDirectory, runTest, onTeardown) { if (onTeardown) { afterEach(onTeardown); @@ -137,6 +185,10 @@ function runSamples(samplesDirectory, runTest, onTeardown) { } } +/** + * @param {string} directory + * @param {RunTestFunction} runTest + */ function runTestsInDirectory(directory, runTest) { const fileNames = getFileNamesAndRemoveOutput(directory); if (fileNames.includes('_config.js')) { @@ -156,6 +208,9 @@ function runTestsInDirectory(directory, runTest) { } } +/** + * @param {string} directory + */ function getFileNamesAndRemoveOutput(directory) { try { return readdirSync(directory).filter(fileName => { @@ -184,6 +239,10 @@ function getFileNamesAndRemoveOutput(directory) { exports.getFileNamesAndRemoveOutput = getFileNamesAndRemoveOutput; +/** + * @param {string} directory + * @param {RunTestFunction} runTest + */ function loadConfigAndRunTest(directory, runTest) { const configFile = join(directory, '_config.js'); const config = require(configFile); @@ -199,6 +258,10 @@ function loadConfigAndRunTest(directory, runTest) { } } +/** + * @param {string} actualDirectory + * @param {string} expectedDirectory + */ exports.assertDirectoriesAreEqual = function assertDirectoriesAreEqual( actualDirectory, expectedDirectory @@ -232,6 +295,10 @@ function assertFilesAreEqual(actualFiles, expectedFiles, directories = []) { exports.assertFilesAreEqual = assertFilesAreEqual; +/** + * @param {string} actual + * @param {string} expected + */ exports.assertIncludes = function assertIncludes(actual, expected) { try { assert.ok( @@ -245,6 +312,10 @@ exports.assertIncludes = function assertIncludes(actual, expected) { } }; +/** + * @param {string} actual + * @param {string} expected + */ exports.assertDoesNotInclude = function assertDoesNotInclude(actual, expected) { try { assert.ok( @@ -258,9 +329,14 @@ exports.assertDoesNotInclude = function assertDoesNotInclude(actual, expected) { } }; -// Workaround a race condition in fs.writeFileSync that temporarily creates -// an empty file for a brief moment which may be read by rollup watch - even -// if the content being overwritten is identical. +/** + * Workaround a race condition in fs.writeFileSync that temporarily creates + * an empty file for a brief moment which may be read by rollup watch - even + * if the content being overwritten is identical. + * + * @param {string} filePath + * @param {string} contents + */ function atomicWriteFileSync(filePath, contents) { const stagingPath = filePath + '_'; writeFileSync(stagingPath, contents); @@ -269,7 +345,12 @@ function atomicWriteFileSync(filePath, contents) { exports.atomicWriteFileSync = atomicWriteFileSync; -// It appears that on macOS, it sometimes takes long for the file system to update +/** + * It appears that on macOS, it sometimes takes long for the file system to update + * + * @param {string} filePath + * @param {string} contents + */ exports.writeAndSync = function writeAndSync(filePath, contents) { const file = openSync(filePath, 'w'); writeSync(file, contents); @@ -277,9 +358,14 @@ exports.writeAndSync = function writeAndSync(filePath, contents) { closeSync(file); }; -// Sometimes, watchers on macOS do not seem to fire. In those cases, it helps -// to write the same content again. This function returns a callback to stop -// further updates. +/** + * Sometimes, watchers on macOS do not seem to fire. In those cases, it helps + * to write the same content again. This function returns a callback to stop + * further updates. + * + * @param {string} filePath + * @param {string} contents + */ exports.writeAndRetry = function writeAndRetry(filePath, contents) { let retries = 0; let updateRetryTimeout; @@ -297,6 +383,10 @@ exports.writeAndRetry = function writeAndRetry(filePath, contents) { return () => clearTimeout(updateRetryTimeout); }; +/** + * @param {any} object + * @param {any} replaced + */ exports.replaceDirectoryInStringifiedObject = function replaceDirectoryInStringifiedObject( object, replaced From 9b6e71c4c00c88eb7012c89226d59fc2c757fa36 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 23 Apr 2023 22:59:50 +0200 Subject: [PATCH 06/15] feat: different types based on dirs --- .vscode/settings.json | 3 +- test/browser/define.d.ts | 5 ++ test/browser/index.js | 3 + test/browser/samples/basic/_config.js | 2 +- .../missing-dependency-resolution/_config.js | 2 +- .../missing-entry-resolution/_config.js | 2 +- test/browser/samples/missing-load/_config.js | 2 +- .../renormalizes-external-paths/_config.js | 2 +- .../samples/supports-hashes/_config.js | 2 +- test/browser/tsconfig.json | 8 ++ test/chunking-form/define.d.ts | 5 ++ test/chunking-form/index.js | 3 + .../samples/aliasing-extensions/_config.js | 2 +- .../amd-id-auto-base-path-concat/_config.js | 2 +- .../samples/amd-id-auto-base-path/_config.js | 2 +- .../samples/amd-id-auto/_config.js | 2 +- .../_config.js | 2 +- .../asset-needs-code-reference/_config.js | 2 +- .../avoid-chunk-import-hoisting/_config.js | 2 +- .../samples/basic-chunking/_config.js | 2 +- .../chunk-deshadowing-reassignment/_config.js | 2 +- .../samples/chunk-execution-order/_config.js | 2 +- .../chunk-export-deshadowing/_config.js | 2 +- .../samples/chunk-export-renaming/_config.js | 2 +- .../chunk-import-deshadowing/_config.js | 2 +- .../samples/chunk-live-bindings/_config.js | 2 +- .../chunk-namespace-boundary/_config.js | 2 +- .../samples/chunk-naming/_config.js | 2 +- .../chunk-variable-name-conflict/_config.js | 2 +- .../samples/chunking-compact/_config.js | 2 +- .../samples/chunking-externals/_config.js | 2 +- .../samples/chunking-reexport/_config.js | 2 +- .../samples/chunking-source-maps/_config.js | 2 +- .../samples/chunking-star-external/_config.js | 2 +- .../samples/circular-entry-points/_config.js | 2 +- .../samples/circular-entry-points2/_config.js | 2 +- .../samples/circular-entry-points3/_config.js | 2 +- .../samples/circular-manual-chunks/_config.js | 2 +- .../combined-namespace-reexport/_config.js | 2 +- .../samples/custom-sanitizer/_config.js | 2 +- .../samples/deconflict-globals/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../default-export-name-conflict/_config.js | 2 +- .../default-identifier-renaming/_config.js | 2 +- .../default-reexport-namespace/_config.js | 2 +- .../avoid-imports-preserve-modules/_config.js | 2 +- .../circular-manual-chunks/_config.js | 2 +- .../dynamic-import-comments/_config.js | 2 +- .../dynamic-import-inlining-object/_config.js | 2 +- .../deprecated/dynamic-import-name/_config.js | 2 +- .../emit-file-chunk-facade/_config.js | 2 +- .../empty-module-no-treeshake/_config.js | 2 +- .../_config.js | 2 +- .../manual-chunk-avoid-facade/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../manual-chunk-is-entry-conflict/_config.js | 2 +- .../manual-chunk-is-entry-match/_config.js | 2 +- .../manual-chunks-different-nested/_config.js | 2 +- .../manual-chunks-dynamic-facades/_config.js | 2 +- .../_config.js | 2 +- .../manual-chunks-dynamic/_config.js | 2 +- .../manual-chunks-function/_config.js | 2 +- .../manual-chunks-nested/_config.js | 2 +- .../deprecated/manual-chunks/_config.js | 2 +- .../_config.js | 2 +- .../dynamic-import-default-mode/_config.js | 2 +- .../dynamic-import/_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-commonjs/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-empty/_config.js | 2 +- .../preserve-modules-export-alias/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-nested-export/_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-proxy-import/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-single-entry/_config.js | 2 +- .../_config.js | 2 +- .../deprecated/preserve-modules/_config.js | 2 +- .../samples/dynamic-import-chained/_config.js | 2 +- .../dynamic-import-chunking/_config.js | 2 +- .../dynamic-import-comments/_config.js | 2 +- .../samples/dynamic-import-dynamic/_config.js | 2 +- .../dynamic-import-external/_config.js | 2 +- .../samples/dynamic-import-facade/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../dynamic-import-inlining-object/_config.js | 2 +- .../dynamic-import-only-default/_config.js | 2 +- .../dynamic-import-only-reexports/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../dynamic-import-tree-shaking-1/_config.js | 2 +- .../dynamic-import-tree-shaking-2/_config.js | 2 +- .../samples/dynamic-import/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../emit-file/asset-file-names/_config.js | 2 +- .../deconflict-against-named-files/_config.js | 2 +- .../emit-file/deduplicate-assets/_config.js | 2 +- .../emit-asset-without-name/_config.js | 2 +- .../emit-file/emit-chunk-facade/_config.js | 2 +- .../emit-file/emit-chunk-filename/_config.js | 2 +- .../emit-chunk-name-conflict/_config.js | 2 +- .../emit-file/emit-chunk-named/_config.js | 2 +- .../emit-file/emit-chunk-order1/_config.js | 2 +- .../emit-file/emit-chunk-order2/_config.js | 2 +- .../emit-chunk-with-importer/_config.js | 2 +- .../emit-file/emit-chunk-worker/_config.js | 2 +- .../emit-file/emit-chunk-worklet/_config.js | 2 +- .../samples/emit-file/emit-chunk/_config.js | 2 +- .../emit-file/emits-existing-chunk/_config.js | 2 +- .../emits-files-from-various-hooks/_config.js | 2 +- .../_config.js | 2 +- .../filenames-function-patterns/_config.js | 2 +- .../emit-file/named-user-chunks/_config.js | 2 +- .../emit-file/reference-files/_config.js | 2 +- .../emit-file/sanitize-file-name/_config.js | 2 +- .../emit-file/set-asset-source/_config.js | 2 +- .../samples/empty-chunks/_config.js | 2 +- .../empty-module-no-treeshake/_config.js | 2 +- .../samples/entry-aliases/_config.js | 2 +- .../entry-chunk-export-mode/_config.js | 2 +- .../entry-point-without-own-code/_config.js | 2 +- .../samples/entrypoint-aliasing/_config.js | 2 +- .../samples/entrypoint-facade/_config.js | 2 +- .../export-default-from-entry/_config.js | 2 +- .../samples/external-imports/_config.js | 2 +- .../samples/external-reexports/_config.js | 2 +- .../samples/filenames-patterns/_config.js | 2 +- .../arrow-functions-false/_config.js | 2 +- .../arrow-functions-true/_config.js | 2 +- .../reserved-names-as-props-false/_config.js | 2 +- .../reserved-names-as-props-true/_config.js | 2 +- .../hashing/deconflict-hashes/_config.js | 2 +- .../samples/hashing/double-hash/_config.js | 2 +- .../samples/hashing/hash-size/_config.js | 2 +- .../samples/hashing/random-match/_config.js | 2 +- .../tree-shaken-dynamic-hash/_config.js | 2 +- .../ignore-chunk-name-query/_config.js | 2 +- .../dependant-entry-no-effects/_config.js | 2 +- .../_config.js | 2 +- .../implicitly-dependent-entry/_config.js | 2 +- .../multiple-dependencies/_config.js | 2 +- .../_config.js | 2 +- .../preserve-signature-false/_config.js | 2 +- .../preserve-signature-strict/_config.js | 2 +- .../same-chunk-dependency/_config.js | 2 +- .../_config.js | 2 +- .../shared-dependency-reexport/_config.js | 2 +- .../single-dependency/_config.js | 2 +- .../import-meta-numeric-paths/_config.js | 2 +- .../samples/import-meta-url/_config.js | 2 +- .../import-variable-duplicates/_config.js | 2 +- .../chained-dynamic-with-shared/_config.js | 2 +- .../circular-dynamic-imports/_config.js | 2 +- .../cut-off/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../dynamic-import-dynamic/_config.js | 2 +- .../dynamic-not-in-memory/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../single-dynamic/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../manual-chunk-avoid-facade/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../manual-chunk-is-entry-conflict/_config.js | 2 +- .../manual-chunk-is-entry-match/_config.js | 2 +- .../manual-chunk-not-included/_config.js | 2 +- .../manual-chunks-different-nested/_config.js | 2 +- .../manual-chunks-dynamic-facades/_config.js | 2 +- .../_config.js | 2 +- .../samples/manual-chunks-dynamic/_config.js | 2 +- .../samples/manual-chunks-function/_config.js | 2 +- .../samples/manual-chunks-nested/_config.js | 2 +- .../samples/manual-chunks/_config.js | 2 +- .../max-parallel-file-operations/_config.js | 2 +- .../avoid-circular-dependencies/_config.js | 2 +- .../avoid-transitive-side-effects/_config.js | 2 +- .../best-merge-target/_config.js | 2 +- .../ignore-correlated-side-effects/_config.js | 2 +- .../_config.js | 2 +- .../merge-chunk-into-shared/_config.js | 2 +- .../merge-correlated-side-effects/_config.js | 2 +- .../merge-dependency-side-effects/_config.js | 2 +- .../_config.js | 2 +- .../merge-dynamic-imports/_config.js | 2 +- .../merge-small-side-effect-chunks/_config.js | 2 +- .../min-chunk-size/merge-unrelated/_config.js | 2 +- .../no-merge-for-big-chunks/_config.js | 2 +- .../no-merge-side-effects/_config.js | 2 +- .../prefer-close-merge-target-a/_config.js | 2 +- .../prefer-close-merge-target-b/_config.js | 2 +- .../prefer-small-merge-target-a/_config.js | 2 +- .../prefer-small-merge-target-b/_config.js | 2 +- .../minify-internal-exports/_config.js | 2 +- .../samples/missing-export-compact/_config.js | 2 +- .../_config.js | 2 +- .../samples/missing-export/_config.js | 2 +- .../samples/multi-chunking/_config.js | 2 +- .../samples/multiple-entry-points/_config.js | 2 +- .../namespace-imports-from-chunks/_config.js | 2 +- .../namespace-object-import/_config.js | 2 +- .../_config.js | 2 +- .../samples/namespace-reexports/_config.js | 2 +- .../samples/namespace-retracing/_config.js | 2 +- .../dynamic-import-default-mode/_config.js | 2 +- .../dynamic-import/_config.js | 2 +- .../samples/namespace-tracing/_config.js | 2 +- .../samples/nested-chunks/_config.js | 2 +- .../samples/nested-dynamic-imports/_config.js | 2 +- .../no-minify-internal-exports/_config.js | 2 +- .../samples/no-treeshake-imports/_config.js | 2 +- .../allow-extension/_config.js | 2 +- .../exports-only-no-exports/_config.js | 2 +- .../exports-only/_config.js | 2 +- .../false/_config.js | 2 +- .../override-via-plugin/_config.js | 2 +- .../strict/_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-commonjs/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/preserve-modules-empty/_config.js | 2 +- .../preserve-modules-export-alias/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-nested-export/_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-proxy-import/_config.js | 2 +- .../_config.js | 2 +- .../samples/preserve-modules-root/_config.js | 2 +- .../_config.js | 2 +- .../preserve-modules-single-entry/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/preserve-modules/_config.js | 2 +- .../samples/reexport-from-entry/_config.js | 2 +- .../samples/reexport-shortpaths/_config.js | 2 +- .../samples/render-chunk-transform/_config.js | 2 +- .../samples/render-chunk/_config.js | 2 +- .../samples/render-dynamic-import/_config.js | 2 +- .../samples/resolve-dynamic-import/_config.js | 2 +- .../samples/resolve-file-url/_config.js | 2 +- .../samples/sanitize-chunk-names/_config.js | 2 +- .../sanitize-internal-exports/_config.js | 2 +- .../avoid-imports-preserve-modules/_config.js | 2 +- .../_config.js | 2 +- .../hoist-side-effect-modules/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../single-file-manual-chunk/_config.js | 2 +- .../chained-default-reexport/_config.js | 2 +- .../_config.js | 2 +- .../default-reexport/_config.js | 2 +- .../dynamic-import/_config.js | 2 +- .../synthetic-named-exports/entry/_config.js | 2 +- .../global-conflict/_config.js | 2 +- .../_config.js | 2 +- .../mixed-synthetic-named-exports/_config.js | 2 +- .../multi-level/_config.js | 2 +- .../namespace/_config.js | 2 +- .../_config.js | 2 +- test/chunking-form/tsconfig.json | 8 ++ test/cli/define.d.ts | 5 ++ test/cli/index.js | 3 + .../samples/allow-output-prefix/_config.js | 2 +- test/cli/samples/amd/_config.js | 2 +- .../banner-intro-outro-footer/_config.js | 2 +- .../_config.js | 2 +- .../code-splitting-named-inputs/_config.js | 2 +- .../samples/config-async-function/_config.js | 2 +- .../cli/samples/config-cjs-dirname/_config.js | 2 +- .../_config.js | 2 +- .../config-cwd-case-insensitive/_config.js | 2 +- .../config-defineConfig-cjs/_config.js | 2 +- .../config-defineConfig-mjs/_config.js | 2 +- .../samples/config-env-multiple/_config.js | 2 +- test/cli/samples/config-env/_config.js | 2 +- test/cli/samples/config-es6/_config.js | 2 +- .../config-external-function/_config.js | 2 +- test/cli/samples/config-external/_config.js | 2 +- .../config-function-modify-command/_config.js | 2 +- test/cli/samples/config-function/_config.js | 2 +- .../cli/samples/config-import-meta/_config.js | 2 +- test/cli/samples/config-json/_config.js | 2 +- .../samples/config-missing-export/_config.js | 2 +- .../cli/samples/config-mjs-plugins/_config.js | 2 +- test/cli/samples/config-mjs/_config.js | 2 +- .../config-multiple-getfilename/_config.js | 2 +- .../config-multiple-source-maps/_config.js | 2 +- test/cli/samples/config-no-output/_config.js | 2 +- test/cli/samples/config-override/_config.js | 2 +- .../samples/config-plugin-entry/_config.js | 2 +- .../cli/samples/config-promise-cjs/_config.js | 2 +- .../cli/samples/config-promise-mjs/_config.js | 2 +- test/cli/samples/config-promise/_config.js | 2 +- test/cli/samples/config-true/_config.js | 2 +- test/cli/samples/config-ts/_config.js | 2 +- .../cli/samples/config-type-module/_config.js | 2 +- test/cli/samples/config-warnings/_config.js | 2 +- test/cli/samples/config/_config.js | 2 +- test/cli/samples/context/_config.js | 2 +- .../samples/custom-frame-with-pos/_config.js | 2 +- test/cli/samples/custom-frame/_config.js | 2 +- .../_config.js | 2 +- .../duplicate-import-options/_config.js | 2 +- .../emit-file-multiple-dirs/_config.js | 2 +- .../samples/empty-chunk-multiple/_config.js | 2 +- test/cli/samples/empty-chunk/_config.js | 2 +- .../external-modules-auto-global/_config.js | 2 +- test/cli/samples/external-modules/_config.js | 2 +- .../samples/fail-after-warnings/_config.js | 2 +- test/cli/samples/format-aliases/_config.js | 2 +- .../generated-code-preset-override/_config.js | 2 +- .../generated-code-unknown-preset/_config.js | 2 +- .../cli/samples/import-esm-package/_config.js | 2 +- test/cli/samples/indent-none/_config.js | 2 +- test/cli/samples/interop/_config.js | 2 +- test/cli/samples/log-side-effects/_config.js | 2 +- .../cli/samples/merge-deprecations/_config.js | 2 +- .../samples/merge-treeshake-false/_config.js | 2 +- test/cli/samples/merge-treeshake/_config.js | 2 +- test/cli/samples/module-name/_config.js | 2 +- test/cli/samples/multiple-configs/_config.js | 2 +- .../_config.js | 2 +- .../multiple-targets-shared-config/_config.js | 2 +- test/cli/samples/multiple-targets/_config.js | 2 +- test/cli/samples/no-color/_config.js | 2 +- test/cli/samples/no-conflict/_config.js | 2 +- test/cli/samples/no-strict/_config.js | 2 +- test/cli/samples/no-treeshake/_config.js | 2 +- .../node-config-auto-prefix/_config.js | 2 +- .../samples/node-config-not-found/_config.js | 2 +- test/cli/samples/node-config/_config.js | 2 +- .../samples/paths-output-option/_config.js | 2 +- .../samples/plugin/absolute-esm/_config.js | 2 +- test/cli/samples/plugin/absolute/_config.js | 2 +- .../samples/plugin/advanced-esm/_config.js | 2 +- test/cli/samples/plugin/advanced/_config.js | 2 +- test/cli/samples/plugin/basic/_config.js | 2 +- .../cli/samples/plugin/cannot-load/_config.js | 2 +- .../samples/plugin/default-export/_config.js | 2 +- .../plugin/export-not-found/_config.js | 2 +- .../plugin/invalid-argument/_config.js | 2 +- test/cli/samples/plugin/object/_config.js | 2 +- .../plugin/relative-camelized/_config.js | 2 +- .../samples/plugin/relative-esm/_config.js | 2 +- test/cli/samples/plugin/relative/_config.js | 2 +- .../property-read-side-effects/_config.js | 2 +- .../propertyReadSideEffects-always/_config.js | 2 +- test/cli/samples/silent-onwarn/_config.js | 2 +- test/cli/samples/silent/_config.js | 2 +- test/cli/samples/sourcemap-hidden/_config.js | 2 +- test/cli/samples/sourcemap-newline/_config.js | 2 +- test/cli/samples/stdin/commonjs/_config.js | 2 +- test/cli/samples/stdin/config-file/_config.js | 2 +- .../samples/stdin/force-stdin-tty/_config.js | 2 +- test/cli/samples/stdin/json/_config.js | 2 +- test/cli/samples/stdin/no-dash/_config.js | 2 +- .../stdin/no-stdin-config-file/_config.js | 2 +- .../cli/samples/stdin/no-stdin-tty/_config.js | 2 +- test/cli/samples/stdin/self-import/_config.js | 2 +- test/cli/samples/stdin/stdin-error/_config.js | 2 +- test/cli/samples/stdin/with-dash/_config.js | 2 +- .../samples/stdout-code-splitting/_config.js | 2 +- .../stdout-only-inline-sourcemaps/_config.js | 2 +- .../samples/stdout-single-input/_config.js | 2 +- test/cli/samples/symlinked-config/_config.js | 2 +- .../samples/symlinked-named-config/_config.js | 2 +- .../treeshake-preset-override/_config.js | 2 +- .../treeshake-unknown-preset/_config.js | 2 +- .../unfulfilled-hook-actions-error/_config.js | 2 +- .../_config.js | 2 +- .../unfulfilled-hook-actions/_config.js | 2 +- test/cli/samples/validate/_config.js | 2 +- .../wait-for-bundle-input-object/_config.js | 2 +- .../samples/wait-for-bundle-input/_config.js | 2 +- .../samples/warn-broken-sourcemap/_config.js | 2 +- .../samples/warn-broken-sourcemaps/_config.js | 2 +- .../samples/warn-circular-multiple/_config.js | 2 +- test/cli/samples/warn-circular/_config.js | 2 +- .../cli/samples/warn-eval-multiple/_config.js | 2 +- test/cli/samples/warn-eval/_config.js | 2 +- .../cli/samples/warn-import-export/_config.js | 2 +- .../warn-missing-global-multiple/_config.js | 2 +- .../samples/warn-missing-global/_config.js | 2 +- .../warn-mixed-exports-multiple/_config.js | 2 +- test/cli/samples/warn-multiple/_config.js | 2 +- test/cli/samples/warn-plugin-loc/_config.js | 2 +- test/cli/samples/warn-plugin/_config.js | 2 +- test/cli/samples/warn-this/_config.js | 2 +- .../samples/warn-unknown-options/_config.js | 2 +- .../cli/samples/watch/bundle-error/_config.js | 2 +- test/cli/samples/watch/clearScreen/_config.js | 2 +- test/cli/samples/watch/close-error/_config.js | 2 +- .../watch/close-on-generate-error/_config.js | 2 +- test/cli/samples/watch/close-stdin/_config.js | 2 +- .../watch/no-clearScreen-command/_config.js | 2 +- .../samples/watch/no-clearScreen/_config.js | 2 +- .../samples/watch/no-config-file/_config.js | 2 +- .../watch/no-watch-by-default/_config.js | 2 +- .../watch/no-watched-config/_config.js | 2 +- .../samples/watch/node-config-file/_config.js | 2 +- .../watch-config-early-update/_config.js | 2 +- .../watch/watch-config-error/_config.js | 2 +- .../watch-config-initial-error/_config.js | 2 +- .../watch/watch-config-no-update/_config.js | 2 +- .../watch/watch-event-hooks-error/_config.js | 2 +- .../watch/watch-event-hooks/_config.js | 2 +- test/cli/tsconfig.json | 8 ++ test/file-hashes/define.d.ts | 5 ++ test/file-hashes/index.js | 81 ++++++++++--------- .../samples/augment-chunk-hash/_config.js | 2 +- test/file-hashes/samples/banner/_config.js | 2 +- .../file-hashes/samples/chunk-name/_config.js | 2 +- test/file-hashes/samples/content/_config.js | 2 +- .../samples/dependency-content/_config.js | 2 +- .../samples/export-order-2/_config.js | 2 +- .../samples/export-order/_config.js | 2 +- test/file-hashes/samples/exports/_config.js | 2 +- .../external-dependency-names/_config.js | 2 +- test/file-hashes/samples/footer/_config.js | 2 +- test/file-hashes/samples/format/_config.js | 2 +- .../samples/internal-exports/_config.js | 2 +- test/file-hashes/samples/intro/_config.js | 2 +- .../samples/name-pattern/_config.js | 2 +- test/file-hashes/samples/outro/_config.js | 2 +- .../samples/render-chunk-changes/_config.js | 2 +- test/file-hashes/tsconfig.json | 8 ++ test/form/define.d.ts | 5 ++ .../samples/absolute-path-resolver/_config.js | 2 +- .../samples/acorn-external-plugins/_config.js | 2 +- test/form/samples/addon-functions/_config.js | 2 +- test/form/samples/amd-id-auto/_config.js | 2 +- test/form/samples/amd-id/_config.js | 2 +- .../samples/amd-keep-extension/_config.js | 2 +- .../no-default-deoptimization/_config.js | 2 +- .../no-global-call-deoptimization/_config.js | 2 +- .../return-function-deoptimization/_config.js | 2 +- .../array-elements/_config.js | 2 +- .../array-mutation/_config.js | 2 +- .../array-spread/_config.js | 2 +- .../spread-element-deoptimization/_config.js | 2 +- .../arrow-function-call-parameters/_config.js | 2 +- .../arrow-function-return-values/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/assignment-to-exports/_config.js | 2 +- .../samples/assignment-to-global/_config.js | 2 +- .../samples/async-function-effects/_config.js | 2 +- .../samples/async-function-unused/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../form/samples/banner-and-footer/_config.js | 2 +- test/form/samples/base64-deshadow/_config.js | 2 +- test/form/samples/big-int/_config.js | 2 +- .../samples/binary-expressions/_config.js | 2 +- test/form/samples/block-comments/_config.js | 2 +- .../samples/body-less-for-loops/_config.js | 2 +- .../_config.js | 2 +- .../break-statement-labels-switch/_config.js | 2 +- .../break-statement-labels/_config.js | 2 +- .../break-statement-loops/_config.js | 2 +- .../caught-errors/_config.js | 2 +- .../hoisted-declarations/_config.js | 2 +- .../if-statement-breaks/_config.js | 2 +- .../if-statement-errors/_config.js | 2 +- .../break-control-flow/loop-errors/_config.js | 2 +- .../return-statements/_config.js | 2 +- .../switch-errors/_config.js | 2 +- .../thrown-errors/_config.js | 2 +- .../array-expression/_config.js | 2 +- .../_config.js | 2 +- .../builtin-prototypes/literal/_config.js | 2 +- .../object-expression/_config.js | 2 +- .../_config.js | 2 +- .../template-literal/_config.js | 2 +- .../catch-parameter-shadowing/_config.js | 2 +- .../samples/chained-assignments/_config.js | 2 +- .../circular-member-expression/_config.js | 2 +- .../class-constructor-side-effect/_config.js | 2 +- test/form/samples/class-fields/_config.js | 2 +- .../samples/class-method-access/_config.js | 2 +- .../_config.js | 2 +- .../form/samples/class-without-new/_config.js | 2 +- .../samples/comment-before-import/_config.js | 2 +- .../comment-start-inside-comment/_config.js | 2 +- .../samples/compact-empty-external/_config.js | 2 +- .../compact-multiple-imports/_config.js | 2 +- .../samples/compact-named-export/_config.js | 2 +- test/form/samples/compact/_config.js | 2 +- .../_config.js | 2 +- .../samples/computed-properties/_config.js | 2 +- .../_config.js | 2 +- .../conditional-expression-paths/_config.js | 2 +- .../samples/conditional-expression/_config.js | 2 +- .../_config.js | 2 +- .../samples/configure-file-url/_config.js | 2 +- .../samples/conflicting-imports/_config.js | 2 +- test/form/samples/curried-function/_config.js | 2 +- test/form/samples/custom-context/_config.js | 2 +- .../_config.js | 2 +- .../custom-module-context-function/_config.js | 2 +- .../samples/custom-module-context/_config.js | 2 +- .../declarations-with-side-effects/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../deconflict-module-priority/_config.js | 2 +- .../deconflict-nested-tree-shaking/_config.js | 2 +- .../deconflict-tree-shaken-globals/_config.js | 2 +- .../samples/deconflict-tree-shaken/_config.js | 2 +- .../dedupes-external-imports/_config.js | 2 +- .../samples/deep-properties-access/_config.js | 2 +- test/form/samples/deep-properties/_config.js | 2 +- .../deep-switch-declarations/_config.js | 2 +- .../_config.js | 2 +- .../samples/default-export-class/_config.js | 2 +- .../default-export-live-binding/_config.js | 2 +- .../samples/default-export-mode/_config.js | 2 +- .../default-identifier-deshadowing/_config.js | 2 +- .../define-es-modules-false/_config.js | 2 +- .../samples/define-replacement/_config.js | 2 +- .../form/samples/deopt-regexp-type/_config.js | 2 +- .../deopt-string-concatenation/_config.js | 2 +- .../samples/deoptimize-superclass/_config.js | 2 +- .../_config.js | 2 +- .../dynamic-import-inlining-array/_config.js | 2 +- .../dynamic-import-inlining/_config.js | 2 +- .../_config.js | 2 +- .../entry-default/_config.js | 2 +- .../namespace-tostring/entry-named/_config.js | 2 +- .../external-namespaces/_config.js | 2 +- .../inlined-namespace/_config.js | 2 +- .../nested-inlined-dynamic-import/_config.js | 2 +- .../deprecated/prefer-const/_config.js | 2 +- .../duplicated-var-declarations/_config.js | 2 +- .../dynamic-import-inlining-array/_config.js | 2 +- .../dynamic-import-inlining/_config.js | 2 +- .../dynamic-import-this-arrow/_config.js | 2 +- .../dynamic-import-this-function/_config.js | 2 +- .../dynamic-import-unresolvable/_config.js | 2 +- .../_config.js | 2 +- .../early-bind-member-expressions/_config.js | 2 +- .../_config.js | 2 +- .../samples/effect-in-for-of-loop/_config.js | 2 +- test/form/samples/emit-asset-file/_config.js | 2 +- .../emit-file-tree-shaken-access/_config.js | 2 +- .../emit-uint8array-no-buffer/_config.js | 2 +- .../samples/empty-block-statement/_config.js | 2 +- .../empty-do-while-statement/_config.js | 2 +- .../samples/empty-for-in-statement/_config.js | 2 +- .../samples/empty-for-statement/_config.js | 2 +- .../samples/empty-if-statement/_config.js | 2 +- .../empty-statement-consequent/_config.js | 2 +- test/form/samples/empty-statement/_config.js | 2 +- .../samples/empty-switch-statement/_config.js | 2 +- .../empty-try-catch-statement/_config.js | 2 +- .../samples/empty-while-statement/_config.js | 2 +- .../samples/enforce-addon-order/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../exponentiation-operator/_config.js | 2 +- .../export-all-before-named/_config.js | 2 +- .../export-all-from-internal/_config.js | 2 +- .../samples/export-all-multiple/_config.js | 2 +- test/form/samples/export-default-2/_config.js | 2 +- test/form/samples/export-default-3/_config.js | 2 +- test/form/samples/export-default-4/_config.js | 2 +- .../_config.js | 2 +- .../samples/export-default-global/_config.js | 2 +- .../samples/export-default-import/_config.js | 2 +- test/form/samples/export-default/_config.js | 2 +- test/form/samples/export-globals/_config.js | 2 +- .../export-internal-namespace-as/_config.js | 2 +- .../samples/export-live-bindings/_config.js | 2 +- .../samples/export-multiple-vars/_config.js | 2 +- .../samples/export-namespace-as/_config.js | 2 +- .../_config.js | 2 +- .../exports-at-end-if-possible/_config.js | 2 +- test/form/samples/extend-exports/_config.js | 2 +- .../extend-namespaced-exports/_config.js | 2 +- .../samples/external-deshadowing/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../external-export-tracing/_config.js | 2 +- .../external-import-alias-shadow/_config.js | 2 +- .../samples/external-import-order/_config.js | 2 +- .../_config.js | 2 +- .../external-imports-custom-names/_config.js | 2 +- test/form/samples/external-imports/_config.js | 2 +- .../external-namespace-and-named/_config.js | 2 +- .../external-namespace-reexport/_config.js | 2 +- test/form/samples/for-in-scopes/_config.js | 2 +- .../samples/for-loop-assignment/_config.js | 2 +- .../for-loop-body-var-declaration/_config.js | 2 +- .../for-loop-with-empty-head/_config.js | 2 +- test/form/samples/for-of-scopes/_config.js | 2 +- test/form/samples/for-scopes/_config.js | 2 +- test/form/samples/freeze/_config.js | 2 +- .../function-body-return-values/_config.js | 2 +- .../function-call-parameters/_config.js | 2 +- .../function-iterable-prototype/_config.js | 2 +- .../form/samples/function-mutation/_config.js | 2 +- test/form/samples/function-scopes/_config.js | 2 +- .../arrow-functions-false/_config.js | 2 +- .../arrow-functions-true/_config.js | 2 +- .../const-bindings-false/_config.js | 2 +- .../const-bindings-true/_config.js | 2 +- .../object-shorthand-false/_config.js | 2 +- .../object-shorthand-true/_config.js | 2 +- .../_config.js | 2 +- .../reserved-names-as-props-false/_config.js | 2 +- .../_config.js | 2 +- .../reserved-names-as-props-true/_config.js | 2 +- .../generated-code-presets/es2015/_config.js | 2 +- .../generated-code-presets/es5/_config.js | 2 +- .../preset-with-override/_config.js | 2 +- .../arrow-functions-false/_config.js | 2 +- .../arrow-functions-true/_config.js | 2 +- .../const-bindings-false/_config.js | 2 +- .../const-bindings-true/_config.js | 2 +- .../object-shorthand-false/_config.js | 2 +- .../object-shorthand-true/_config.js | 2 +- .../_config.js | 2 +- .../reserved-names-as-props-false/_config.js | 2 +- .../_config.js | 2 +- .../reserved-names-as-props-true/_config.js | 2 +- .../samples/getter-return-values/_config.js | 2 +- test/form/samples/globals-function/_config.js | 2 +- .../_config.js | 2 +- .../samples/guessed-global-names/_config.js | 2 +- .../samples/handles-async-await/_config.js | 2 +- .../handles-empty-imports-iife/_config.js | 2 +- .../handles-empty-imports-umd/_config.js | 2 +- test/form/samples/hashbang/_config.js | 2 +- .../hoisted-unused-conditional/_config.js | 2 +- .../hoisted-variable-case-stmt/_config.js | 2 +- .../hoisted-variable-if-stmt/_config.js | 2 +- .../hoisted-vars-in-dead-branches/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../implicit-undefined-assignments/_config.js | 2 +- .../assertion-shapes/_config.js | 2 +- .../keep-dynamic-assertions/_config.js | 2 +- .../keeps-static-assertions/_config.js | 2 +- .../_config.js | 2 +- .../plugin-assertions-resolveid/_config.js | 2 +- .../removes-dynamic-assertions/_config.js | 2 +- .../removes-static-assertions/_config.js | 2 +- .../form/samples/import-expression/_config.js | 2 +- .../_config.js | 2 +- .../samples/import-meta-resolve/_config.js | 2 +- test/form/samples/import-meta-url/_config.js | 2 +- test/form/samples/import-meta/_config.js | 2 +- .../_config.js | 2 +- .../import-namespace-systemjs/_config.js | 2 +- test/form/samples/import-namespace/_config.js | 2 +- .../import-specifier-deshadowing/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- test/form/samples/indent-false/_config.js | 2 +- test/form/samples/indent-spaces/_config.js | 2 +- .../samples/indent-true-spaces/_config.js | 2 +- test/form/samples/indent-true/_config.js | 2 +- .../_config.js | 2 +- .../internal-conflict-resolution/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/interop-per-dependency/_config.js | 2 +- .../_config.js | 2 +- test/form/samples/intro-and-outro/_config.js | 2 +- .../invalid-binary-expressions/_config.js | 2 +- .../samples/json-parse-is-not-pure/_config.js | 2 +- .../json-stringify-is-not-pure/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- test/form/samples/known-globals/_config.js | 2 +- .../labeled-break-statements/_config.js | 2 +- .../labeled-continue-statements/_config.js | 2 +- .../samples/large-var-cnt-deduping/_config.js | 2 +- .../lazy-assignment-deoptimization/_config.js | 2 +- .../literals-from-class-statics/_config.js | 2 +- .../_config.js | 2 +- .../deopzimize-while-included/_config.js | 2 +- .../mutate-logical-expression/_config.js | 2 +- .../simplify-non-boolean/_config.js | 2 +- .../make-relative-false/_config.js | 2 +- .../make-relative-relative/_config.js | 2 +- .../make-relative-true/_config.js | 2 +- .../samples/manual-pure-functions/_config.js | 2 +- .../merge-namespaces-non-live/_config.js | 2 +- test/form/samples/merge-namespaces/_config.js | 2 +- .../samples/minimal-this-mutation/_config.js | 2 +- test/form/samples/mjs/_config.js | 2 +- .../samples/modify-class-prototype/_config.js | 2 +- .../samples/modify-export-semi/_config.js | 2 +- .../module-name-scoped-package/_config.js | 2 +- test/form/samples/module-name-wat/_config.js | 2 +- .../module-name-with-dashes/_config.js | 2 +- .../samples/module-no-treeshake/_config.js | 2 +- .../samples/multi-expression-calls/_config.js | 2 +- test/form/samples/multiple-exports/_config.js | 2 +- .../samples/mutations-in-imports/_config.js | 2 +- .../samples/namespace-conflict/_config.js | 2 +- .../namespace-import-reexport-2/_config.js | 2 +- .../namespace-import-reexport/_config.js | 2 +- .../_config.js | 2 +- .../namespace-object-import/_config.js | 2 +- .../namespace-optimization-b/_config.js | 2 +- .../_config.js | 2 +- .../samples/namespace-optimization/_config.js | 2 +- .../namespace-reexport-name/_config.js | 2 +- .../samples/namespace-self-import/_config.js | 2 +- .../entry-default/_config.js | 2 +- .../namespace-tostring/entry-named/_config.js | 2 +- .../external-namespaces/_config.js | 2 +- .../_config.js | 2 +- .../inlined-namespace/_config.js | 2 +- .../namespaced-default-exports/_config.js | 2 +- .../namespaced-named-exports/_config.js | 2 +- .../namespaces-have-null-prototype/_config.js | 2 +- .../samples/nested-deoptimization/_config.js | 2 +- .../nested-inlined-dynamic-import/_config.js | 2 +- .../samples/nested-member-access/_config.js | 2 +- .../samples/nested-pure-comments/_config.js | 2 +- .../nested-this-expressions/_config.js | 2 +- .../samples/nested-tree-shaking/_config.js | 2 +- .../new-target-meta-property/_config.js | 2 +- .../_config.js | 2 +- .../no-external-live-bindings/_config.js | 2 +- .../samples/no-imports-or-exports/_config.js | 2 +- .../samples/no-treeshake-conflict/_config.js | 2 +- .../_config.js | 2 +- .../no-treeshake-include-labels/_config.js | 2 +- .../no-treeshake-namespace-object/_config.js | 2 +- test/form/samples/no-treeshake/_config.js | 2 +- .../non-empty-block-statement/_config.js | 2 +- .../ns-external-star-reexport/_config.js | 2 +- .../samples/nullish-coalescing/_config.js | 2 +- .../samples/numeric_separators/_config.js | 2 +- .../samples/object-define-property/_config.js | 2 +- .../_config.js | 2 +- .../computed-properties/_config.js | 2 +- .../method-side-effects/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../proto-property/_config.js | 2 +- .../reassign-prop-without-proto/_config.js | 2 +- .../return-expressions/_config.js | 2 +- .../unknown-getter-no-side-effect/_config.js | 2 +- .../unknown-setter-no-side-effect/_config.js | 2 +- .../unknown-setter-no-side-effect2/_config.js | 2 +- .../samples/object-freeze-effects/_config.js | 2 +- .../_config.js | 2 +- .../optional-chaining-namespace/_config.js | 2 +- .../form/samples/optional-chaining/_config.js | 2 +- .../samples/output-named-library/_config.js | 2 +- .../override-external-namespace/_config.js | 2 +- test/form/samples/paths-function/_config.js | 2 +- test/form/samples/paths-relative/_config.js | 2 +- test/form/samples/paths/_config.js | 2 +- .../samples/pattern-assignments/_config.js | 2 +- .../pattern-member-expressions/_config.js | 2 +- .../samples/per-output-plugins/_config.js | 2 +- test/form/samples/preserve-asm-js/_config.js | 2 +- .../form/samples/preserve-debugger/_config.js | 2 +- .../_config.js | 2 +- .../probe-external-namespace/_config.js | 2 +- test/form/samples/promises/_config.js | 2 +- .../samples/proper-this-context/_config.js | 2 +- .../access-when-called-effect/_config.js | 2 +- .../early-access-getter-return/_config.js | 2 +- .../early-access-getter-value/_config.js | 2 +- .../shadowed-setters/_config.js | 2 +- .../samples/protect-cjs-globals/_config.js | 2 +- test/form/samples/proto-null/_config.js | 2 +- .../samples/prototype-functions/_config.js | 2 +- .../prune-pure-unused-import-array/_config.js | 2 +- .../_config.js | 2 +- .../prune-pure-unused-import/_config.js | 2 +- test/form/samples/pure-class-field/_config.js | 2 +- .../pure-comment-line-break/_config.js | 2 +- .../pure-comment-scenarios-complex/_config.js | 2 +- .../pure-comment-scenarios-simple/_config.js | 2 +- .../samples/pure-comments-disabled/_config.js | 2 +- .../samples/pure-comments-multiple/_config.js | 2 +- test/form/samples/quote-id/_config.js | 2 +- .../samples/re-export-aliasing/_config.js | 2 +- .../_config.js | 2 +- .../samples/recursive-assignments/_config.js | 2 +- test/form/samples/recursive-calls/_config.js | 2 +- .../recursive-computed-members/_config.js | 2 +- .../recursive-literal-values/_config.js | 2 +- .../recursive-multi-expressions/_config.js | 2 +- .../_config.js | 2 +- .../recursive-this-deoptimization/_config.js | 2 +- test/form/samples/recursive-values/_config.js | 2 +- test/form/samples/redeclarations/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../reexport-external-default/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/reexport-external-name/_config.js | 2 +- .../reexport-external-namespace-as/_config.js | 2 +- .../reexport-external-namespace/_config.js | 2 +- test/form/samples/reexport-self/_config.js | 2 +- .../samples/reexport-star-deshadow/_config.js | 2 +- .../_config.js | 2 +- .../samples/relative-external-ids/_config.js | 2 +- .../relative-external-with-global/_config.js | 2 +- .../remove-invalid-pure-comments/_config.js | 2 +- .../_config.js | 2 +- .../remove-treeshaken-banners/_config.js | 2 +- .../_config.js | 2 +- .../removes-unused-babel-helpers/_config.js | 2 +- .../renamed-pattern-defaults/_config.js | 2 +- .../render-chunk-plugin-sourcemaps/_config.js | 2 +- .../samples/render-chunk-plugin/_config.js | 2 +- .../render-declaration-semicolons/_config.js | 2 +- .../_config.js | 2 +- .../render-removed-declarations/_config.js | 2 +- .../render-removed-statements/_config.js | 2 +- .../_config.js | 2 +- test/form/samples/resolution-order/_config.js | 2 +- .../_config.js | 2 +- .../resolve-import-meta-url-export/_config.js | 2 +- .../resolve-import-meta-url/_config.js | 2 +- .../samples/return-after-error/_config.js | 2 +- .../return-statement/missing-space/_config.js | 2 +- .../_config.js | 2 +- .../runs-output-plugins-last/_config.js | 2 +- .../_config.js | 2 +- .../samples/self-calling-function/_config.js | 2 +- .../samples/self-contained-bundle/_config.js | 2 +- .../samples/self-deoptimization/_config.js | 2 +- .../samples/sequence-expression/_config.js | 2 +- .../samples/shorthand-properties/_config.js | 2 +- test/form/samples/side-effect-b/_config.js | 2 +- test/form/samples/side-effect-c/_config.js | 2 +- test/form/samples/side-effect-d/_config.js | 2 +- .../side-effect-default-reexport/_config.js | 2 +- test/form/samples/side-effect-e/_config.js | 2 +- .../side-effect-es5-classes/_config.js | 2 +- test/form/samples/side-effect-f/_config.js | 2 +- test/form/samples/side-effect-g/_config.js | 2 +- test/form/samples/side-effect-h/_config.js | 2 +- test/form/samples/side-effect-i/_config.js | 2 +- test/form/samples/side-effect-j/_config.js | 2 +- test/form/samples/side-effect-k/_config.js | 2 +- test/form/samples/side-effect-l/_config.js | 2 +- test/form/samples/side-effect-m/_config.js | 2 +- test/form/samples/side-effect-n/_config.js | 2 +- test/form/samples/side-effect-o/_config.js | 2 +- test/form/samples/side-effect-p/_config.js | 2 +- test/form/samples/side-effect-q/_config.js | 2 +- test/form/samples/side-effect-r/_config.js | 2 +- test/form/samples/side-effect-s/_config.js | 2 +- test/form/samples/side-effect-t/_config.js | 2 +- .../_config.js | 2 +- test/form/samples/side-effect/_config.js | 2 +- .../samples/side-effects-await/_config.js | 2 +- .../side-effects-break-statements/_config.js | 2 +- .../side-effects-call-arguments/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/side-effects-delete/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../side-effects-es6-super-classes/_config.js | 2 +- .../_config.js | 2 +- .../side-effects-generators/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../side-effects-internal-modules/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../side-effects-pattern-defaults/_config.js | 2 +- .../_config.js | 2 +- .../side-effects-reassignment/_config.js | 2 +- .../side-effects-return-statements/_config.js | 2 +- .../side-effects-static-methods/_config.js | 2 +- .../side-effects-switch-statements/_config.js | 2 +- .../form/samples/side-effects-this/_config.js | 2 +- .../samples/simplified-initializer/_config.js | 2 +- .../_config.js | 2 +- .../simplify-return-expression/_config.js | 2 +- .../samples/skips-dead-branches-b/_config.js | 2 +- .../samples/skips-dead-branches-c/_config.js | 2 +- .../samples/skips-dead-branches-d/_config.js | 2 +- .../samples/skips-dead-branches-e/_config.js | 2 +- .../samples/skips-dead-branches-f/_config.js | 2 +- .../samples/skips-dead-branches-g/_config.js | 2 +- .../samples/skips-dead-branches-h/_config.js | 2 +- .../samples/skips-dead-branches-i/_config.js | 2 +- .../samples/skips-dead-branches-j/_config.js | 2 +- .../samples/skips-dead-branches/_config.js | 2 +- .../slash-in-function-parameters/_config.js | 2 +- .../sourcemaps-excludesources/_config.js | 2 +- .../samples/sourcemaps-external/_config.js | 2 +- .../form/samples/sourcemaps-hidden/_config.js | 2 +- .../form/samples/sourcemaps-inline/_config.js | 2 +- .../_config.js | 2 +- .../samples/static-block-render/_config.js | 2 +- .../static-class-property-calls/_config.js | 2 +- .../static-method-deoptimization/_config.js | 2 +- test/form/samples/strict-false/_config.js | 2 +- .../samples/string-indentation-b/_config.js | 2 +- .../samples/string-indentation/_config.js | 2 +- .../string-replace-side-effects/_config.js | 2 +- .../super-class-no-side-effects/_config.js | 2 +- .../super-class-prototype-access/_config.js | 2 +- .../_config.js | 2 +- .../super-class-prototype-calls/_config.js | 2 +- .../super-class-prototype-values/_config.js | 2 +- test/form/samples/supports-core-js/_config.js | 2 +- .../form/samples/supports-es5-shim/_config.js | 2 +- .../form/samples/supports-es6-shim/_config.js | 2 +- test/form/samples/switch-scopes/_config.js | 2 +- .../synthetic-named-exports/_config.js | 2 +- test/form/samples/system-comments/_config.js | 2 +- .../system-default-comments/_config.js | 2 +- .../system-export-declarations/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../system-export-rendering/_config.js | 2 +- .../samples/system-module-reserved/_config.js | 2 +- .../_config.js | 2 +- .../samples/system-null-setters/_config.js | 2 +- test/form/samples/system-reexports/_config.js | 2 +- test/form/samples/system-semicolon/_config.js | 2 +- .../samples/system-uninitialized/_config.js | 2 +- .../tdz-access-in-declaration/_config.js | 2 +- test/form/samples/tdz-common/_config.js | 2 +- .../samples/tdz-pattern-access/_config.js | 2 +- .../computed-properties/_config.js | 2 +- .../simplify-conditionals/_config.js | 2 +- .../samples/this-in-class-body/_config.js | 2 +- test/form/samples/this-in-imports/_config.js | 2 +- .../form/samples/this-is-undefined/_config.js | 2 +- test/form/samples/top-level-await/_config.js | 2 +- .../_config.js | 2 +- .../tree-shake-curried-functions/_config.js | 2 +- .../tree-shake-default-exports/_config.js | 2 +- .../tree-shake-if-statements/_config.js | 2 +- .../tree-shake-logical-expressions/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../treeshake-classes-with-fields/_config.js | 2 +- .../argument-side-effects/_config.js | 2 +- .../arguments-variable/_config.js | 2 +- .../arrow-function-arguments/_config.js | 2 +- .../function-arguments/_config.js | 2 +- .../namespace-members/_config.js | 2 +- .../patterns/_config.js | 2 +- .../rest-element/_config.js | 2 +- .../unused-parameters/_config.js | 2 +- .../treeshake-import-meta-props/_config.js | 2 +- .../samples/treeshake-import-meta/_config.js | 2 +- test/form/samples/treeshake-json/_config.js | 2 +- .../treeshake-namespace-access/_config.js | 2 +- .../preset-with-override/_config.js | 2 +- .../treeshake-presets/recommended/_config.js | 2 +- .../treeshake-presets/safest/_config.js | 2 +- .../treeshake-presets/smallest/_config.js | 2 +- .../samples/treeshake-presets/true/_config.js | 2 +- .../treeshake-sequence-expressions/_config.js | 2 +- .../deactivate-via-option/_config.js | 2 +- .../direct-inclusion/_config.js | 2 +- .../follow-parameters/_config.js | 2 +- .../follow-pattern-parameters/_config.js | 2 +- .../follow-variables/_config.js | 2 +- .../include-via-outside-variable/_config.js | 2 +- .../supports-core-js/_config.js | 2 +- .../samples/typeof-side-effect/_config.js | 2 +- .../samples/umd-noconflict-extend/_config.js | 2 +- .../umd-noconflict-namespaced/_config.js | 2 +- .../umd-noconflict-no-exports/_config.js | 2 +- test/form/samples/umd-noconflict/_config.js | 2 +- .../form/samples/unary-expressions/_config.js | 2 +- .../undefined-default-export/_config.js | 2 +- test/form/samples/undefined-var/_config.js | 2 +- .../samples/unknown-token-effects/_config.js | 2 +- .../_config.js | 2 +- .../unmodified-default-exports/_config.js | 2 +- .../samples/unused-called-import/_config.js | 2 +- .../_config.js | 2 +- .../samples/unused-default-exports/_config.js | 2 +- .../_config.js | 2 +- test/form/samples/unused-import/_config.js | 2 +- .../_config.js | 2 +- test/form/samples/unused-var/_config.js | 2 +- .../update-expression-side-effects/_config.js | 2 +- .../samples/updating-assignments/_config.js | 2 +- test/form/samples/url-external/_config.js | 2 +- .../use-class-name-in-static-block/_config.js | 2 +- .../use-global-map-for-export-name/_config.js | 2 +- .../_config.js | 2 +- .../wrap-simplified-expressions/_config.js | 2 +- .../yield-expression/missing-space/_config.js | 2 +- test/form/tsconfig.json | 8 ++ test/function/define.d.ts | 5 ++ .../samples/access-instance-prop/_config.js | 2 +- .../add-watch-file-generate/_config.js | 2 +- .../_config.js | 2 +- .../adds-semicolons-if-necessary-b/_config.js | 2 +- .../adds-semicolons-if-necessary-c/_config.js | 2 +- .../adds-semicolons-if-necessary-d/_config.js | 2 +- .../adds-semicolons-if-necessary/_config.js | 2 +- .../_config.js | 2 +- .../samples/adds-timings-to-bundle/_config.js | 2 +- .../aliased-not-exported-twice/_config.js | 2 +- .../samples/allow-reserved/_config.js | 2 +- .../allow-undefined-as-parameter/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../already-deshadowed-import/_config.js | 2 +- .../samples/amd-auto-id-id/_config.js | 2 +- .../samples/amd-base-path-id/_config.js | 2 +- .../function/samples/amd-base-path/_config.js | 2 +- .../_config.js | 2 +- .../global-calls/_config.js | 2 +- .../parameter-access-mutation/_config.js | 2 +- .../parameter-call-mutation/_config.js | 2 +- .../parameter-deep-access-mutation/_config.js | 2 +- .../_config.js | 2 +- .../parameter-mutation-spread/_config.js | 2 +- .../parameter-mutation/_config.js | 2 +- .../parameter-variable-merge/_config.js | 2 +- .../return-function-known/_config.js | 2 +- .../return-function-unknown/_config.js | 2 +- .../unknown-global-assignment/_config.js | 2 +- .../unknown-global-call/_config.js | 2 +- .../_config.js | 2 +- .../samples/array-double-spread/_config.js | 2 +- .../samples/array-from-side-effect/_config.js | 2 +- test/function/samples/array-getter/_config.js | 2 +- .../samples/array-mutation/_config.js | 2 +- .../_config.js | 2 +- .../assign-namespace-to-var/_config.js | 2 +- .../assignee-is-deoptimized/_config.js | 2 +- .../_config.js | 2 +- .../nested-assignment/_config.js | 2 +- .../try-catch-inclusion/_config.js | 2 +- .../samples/assignment-patterns/_config.js | 2 +- .../assignment-to-exports-b/_config.js | 2 +- .../samples/assignment-to-exports/_config.js | 2 +- .../_config.js | 2 +- .../assignment-to-re-exports/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../associate-getter-return-values/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../associate-setter-parameters/_config.js | 2 +- .../samples/async-function-return/_config.js | 2 +- .../avoid-exports-dot-asterisk/_config.js | 2 +- .../avoid-variable-be-empty/_config.js | 2 +- test/function/samples/aync-options/_config.js | 2 +- .../samples/banner-and-footer/_config.js | 2 +- test/function/samples/bindings/_config.js | 2 +- .../_config.js | 2 +- test/function/samples/break-label/_config.js | 2 +- .../samples/build-promise-chain/_config.js | 2 +- .../argument-side-effects/_config.js | 2 +- .../builtin-prototypes/truthiness/_config.js | 2 +- .../samples/bundle-facade-order/_config.js | 2 +- .../samples/call-external-function/_config.js | 2 +- .../_config.js | 2 +- .../samples/call-marked-pure/_config.js | 2 +- .../_config.js | 2 +- .../can-import-self-treeshake/_config.js | 2 +- .../samples/can-import-self/_config.js | 2 +- .../cannot-call-external-namespace/_config.js | 2 +- .../cannot-call-internal-namespace/_config.js | 2 +- .../_config.js | 2 +- .../samples/catch-block-scope/_config.js | 2 +- .../catch-dynamic-import-failure/_config.js | 2 +- .../samples/catch-scope-shadowing/_config.js | 2 +- .../samples/catch-scope-variables/_config.js | 2 +- .../chained-mutable-array-methods/_config.js | 2 +- .../_config.js | 2 +- .../check-resolve-for-entry/_config.js | 2 +- .../_config.js | 2 +- .../chunking-duplicate-reexport/_config.js | 2 +- .../circular-default-exports/_config.js | 2 +- .../circular-missed-reexports-2/_config.js | 2 +- .../circular-missed-reexports/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../circular-preserve-modules/_config.js | 2 +- .../samples/circular-reexport/_config.js | 2 +- .../class-method-getter-properties/_config.js | 2 +- .../samples/class-method-mutation/_config.js | 2 +- .../samples/class-method-mutations/_config.js | 2 +- .../samples/class-method-returns/_config.js | 2 +- .../class-methods-not-renamed/_config.js | 2 +- .../samples/class-name-conflict-2/_config.js | 2 +- .../samples/class-name-conflict-3/_config.js | 2 +- .../samples/class-name-conflict-4/_config.js | 2 +- .../samples/class-name-conflict/_config.js | 2 +- .../samples/class-prop-returns/_config.js | 2 +- .../_config.js | 2 +- .../compact-multiple-imports/_config.js | 2 +- test/function/samples/compact/_config.js | 2 +- .../samples/conditional-catch/_config.js | 2 +- .../samples/conditional-definition/_config.js | 2 +- .../conditionals-deoptimization/_config.js | 2 +- .../configure-external-module-b/_config.js | 2 +- .../configure-external-module/_config.js | 2 +- .../_config.js | 2 +- .../named-import-external/_config.js | 2 +- .../named-import/_config.js | 2 +- .../namespace-import/_config.js | 2 +- .../same-binding/_config.js | 2 +- .../confused-default-identifier/_config.js | 2 +- .../samples/consistent-renaming-b/_config.js | 2 +- .../samples/consistent-renaming-c/_config.js | 2 +- .../samples/consistent-renaming-d/_config.js | 2 +- .../samples/consistent-renaming-e/_config.js | 2 +- .../samples/consistent-renaming-f/_config.js | 2 +- .../samples/consistent-renaming/_config.js | 2 +- .../_config.js | 2 +- .../context-resolve-skipself/_config.js | 2 +- .../samples/context-resolve/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../cross-chunk-live-binding/_config.js | 2 +- .../custom-external-module-options/_config.js | 2 +- .../custom-external-resolver-async/_config.js | 2 +- .../custom-external-resolver-sync/_config.js | 2 +- .../samples/custom-iterator-2/_config.js | 2 +- .../samples/custom-iterator/_config.js | 2 +- .../samples/custom-loaders/_config.js | 2 +- .../samples/custom-module-options/_config.js | 2 +- .../custom-path-resolver-async/_config.js | 2 +- .../custom-path-resolver-on-entry/_config.js | 2 +- .../custom-path-resolver-plural-b/_config.js | 2 +- .../custom-path-resolver-plural/_config.js | 2 +- .../custom-path-resolver-sync/_config.js | 2 +- .../samples/custom-resolve-options/_config.js | 2 +- .../_config.js | 2 +- .../samples/cycles-defaults/_config.js | 2 +- .../samples/cycles-export-star/_config.js | 2 +- .../samples/cycles-immediate/_config.js | 2 +- .../samples/cycles-pathological-2/_config.js | 2 +- .../samples/cycles-stack-overflow/_config.js | 2 +- .../samples/cyclic-assignments/_config.js | 2 +- .../deconflict-deconflicted/_config.js | 2 +- .../_config.js | 2 +- .../samples/deconflict-ids/_config.js | 2 +- .../deconflict-parameter-defaults/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/deconflicts-classes/_config.js | 2 +- .../samples/deconflicts-exports-2/_config.js | 2 +- .../samples/deconflicts-exports-3/_config.js | 2 +- .../samples/deconflicts-exports/_config.js | 2 +- .../deconflicts-external-imports/_config.js | 2 +- .../_config.js | 2 +- .../samples/deconflicts-globals/_config.js | 2 +- .../samples/deconflicts-interop/_config.js | 2 +- .../deconstructed-exported-vars/_config.js | 2 +- .../default-export-as-is-bound/_config.js | 2 +- .../_config.js | 2 +- .../default-export-is-not-bound-b/_config.js | 2 +- .../default-export-is-not-bound/_config.js | 2 +- .../_config.js | 2 +- .../default-exported-global/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/default-not-reexported/_config.js | 2 +- .../samples/default-on-warn/_config.js | 2 +- test/function/samples/delete/_config.js | 2 +- .../deoptimize-assumes-getters/_config.js | 2 +- .../samples/deoptimize-cached-prop/_config.js | 2 +- .../_config.js | 2 +- .../deoptimize-call-expressions/_config.js | 2 +- .../samples/deoptimize-class/_config.js | 2 +- .../deoptimize-computed-class-keys/_config.js | 2 +- .../deoptimize-computed-keys/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../deoptimize-logical-expressions/_config.js | 2 +- .../deoptimize-loop-element/_config.js | 2 +- .../deoptimize-member-expressions/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../deoptimize-object-expressions/_config.js | 2 +- .../samples/deoptimize-object/_config.js | 2 +- .../_config.js | 2 +- .../deoptimize-this-parameters/_config.js | 2 +- .../samples/deprecated/compact/_config.js | 2 +- .../dynamic-import-duplicates/_config.js | 2 +- .../dynamic-import-inlining/_config.js | 2 +- .../dynamic-import-name-warn/_config.js | 2 +- .../deprecated/dynamic-import-name/_config.js | 2 +- .../inline-dynamic-imports-bundle/_config.js | 2 +- .../inline-imports-with-manual/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../manual-chunks-conflict/_config.js | 2 +- .../deprecated/manual-chunks-info/_config.js | 2 +- .../manual-chunks-preserve-modules/_config.js | 2 +- .../infinity/_config.js | 2 +- .../max-parallel-file-reads/set/_config.js | 2 +- .../with-plugin/_config.js | 2 +- .../name-conflict-symbol/_config.js | 2 +- .../dynamic-import-default-mode/_config.js | 2 +- .../dynamic-import/_config.js | 2 +- .../entry-default/_config.js | 2 +- .../namespace-tostring/entry-named/_config.js | 2 +- .../external-namespaces/_config.js | 2 +- .../inlined-namespace/_config.js | 2 +- .../interop-property-descriptor/_config.js | 2 +- .../property-descriptor/_config.js | 2 +- .../_config.js | 2 +- .../deprecated/plugin-module-ids/_config.js | 2 +- .../inline-dynamic-imports/_config.js | 2 +- .../invalid-default-export-mode/_config.js | 2 +- .../_config.js | 2 +- .../invalid-none-export-mode/_config.js | 2 +- .../preserveModules/manual-chunks/_config.js | 2 +- .../preserveModules/mixed-exports/_config.js | 2 +- .../virtual-modules-conflict/_config.js | 2 +- .../virtual-modules/_config.js | 2 +- .../samples/deprecated/reexport-ns/_config.js | 2 +- .../deprecated/resolve-id-external/_config.js | 2 +- .../samples/deprecated/resolve-id/_config.js | 2 +- .../dynamicImportFunction/_config.js | 2 +- .../_config.js | 2 +- .../hasModuleSideEffects/_config.js | 2 +- .../inlineDynamicImports/_config.js | 2 +- .../deprecations/manualChunks/_config.js | 2 +- .../maxParallelFileReads/_config.js | 2 +- .../namespaceToStringTag/_config.js | 2 +- .../deprecations/plugin-module-ids/_config.js | 2 +- .../deprecations/prefer-const/_config.js | 2 +- .../deprecations/preserveModules/_config.js | 2 +- .../deshadow-respect-existing/_config.js | 2 +- .../deshadow-top-level-declaration/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../deshadowed-namespaced-import/_config.js | 2 +- .../deshadowed-shorthand-property/_config.js | 2 +- .../_config.js | 2 +- .../samples/destructuring-loop/_config.js | 2 +- .../disappearing-exported-value/_config.js | 2 +- .../do-while-conditional-break/_config.js | 2 +- .../does-not-deconflict-undefined/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../does-not-mangle-entry-point/_config.js | 2 +- .../samples/double-default-export/_config.js | 2 +- .../samples/double-named-export/_config.js | 2 +- .../samples/double-named-reexport/_config.js | 2 +- .../double-namespace-reexport/_config.js | 2 +- .../samples/duplicate-import-fails/_config.js | 2 +- .../_config.js | 2 +- .../samples/duplicate-input-entry/_config.js | 2 +- .../_config.js | 2 +- .../dynamic-import-duplicates/_config.js | 2 +- .../dynamic-import-existing/_config.js | 2 +- .../dynamic-import-expression/_config.js | 2 +- .../dynamic-import-inlining/_config.js | 2 +- .../dynamic-import-not-found/_config.js | 2 +- .../dynamic-import-only-default/_config.js | 2 +- .../_config.js | 2 +- .../dynamic-import-rewriting/_config.js | 2 +- .../dynamic-import-this-arrow/_config.js | 2 +- .../dynamic-import-this-function/_config.js | 2 +- .../dynamic-imports-shared-exports/_config.js | 2 +- .../dynamic-namespace-lookup/_config.js | 2 +- .../samples/emit-chunk-hash/_config.js | 2 +- .../emit-chunk-manual-asset-source/_config.js | 2 +- .../samples/emit-chunk-manual/_config.js | 2 +- .../emit-file/asset-source-invalid/_config.js | 2 +- .../asset-source-invalid2/_config.js | 2 +- .../asset-source-invalid3/_config.js | 2 +- .../asset-source-invalid4/_config.js | 2 +- .../emit-file/asset-source-missing/_config.js | 2 +- .../asset-source-missing2/_config.js | 2 +- .../asset-source-missing3/_config.js | 2 +- .../asset-source-missing4/_config.js | 2 +- .../asset-source-missing5/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../chunk-filename-not-available/_config.js | 2 +- .../emit-file/chunk-not-found/_config.js | 2 +- .../emit-from-output-options/_config.js | 2 +- .../emit-file/emit-same-file/_config.js | 2 +- .../file-references-in-bundle/_config.js | 2 +- .../emit-file/invalid-asset-name/_config.js | 2 +- .../emit-file/invalid-asset-name3/_config.js | 2 +- .../emit-file/invalid-chunk-id/_config.js | 2 +- .../emit-file/invalid-file-type/_config.js | 2 +- .../emit-file/invalid-reference-id/_config.js | 2 +- .../invalid-set-asset-source-id/_config.js | 2 +- .../emit-file/modules-loaded/_config.js | 2 +- .../samples/emit-file/no-input/_config.js | 2 +- .../set-asset-source-chunk/_config.js | 2 +- .../set-asset-source-transform/_config.js | 2 +- .../set-asset-source-twice/_config.js | 2 +- .../set-asset-source-twice2/_config.js | 2 +- .../set-source-in-output-options/_config.js | 2 +- .../_config.js | 2 +- .../empty-string-as-module-name/_config.js | 2 +- .../samples/enforce-plugin-order/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/error-missing-umd-name/_config.js | 2 +- .../samples/error-parse-json/_config.js | 2 +- .../error-parse-unknown-extension/_config.js | 2 +- .../es5-class-called-without-new/_config.js | 2 +- .../samples/escape-arguments/_config.js | 2 +- .../export-all-from-external/_config.js | 2 +- .../samples/export-all-multiple/_config.js | 2 +- test/function/samples/export-all/_config.js | 2 +- .../_config.js | 2 +- test/function/samples/export-as/_config.js | 2 +- .../export-deconflicted-names/_config.js | 2 +- .../_config.js | 2 +- .../samples/export-default-as-b/_config.js | 2 +- .../samples/export-default-as-c/_config.js | 2 +- .../samples/export-default-as/_config.js | 2 +- .../export-default-exported-id/_config.js | 2 +- .../export-default-expression/_config.js | 2 +- .../export-default-from-external/_config.js | 2 +- .../export-default-named-function/_config.js | 2 +- .../export-default-no-space/_config.js | 2 +- .../samples/export-destruction/_config.js | 2 +- .../export-from-default-renamed/_config.js | 2 +- .../samples/export-from-default/_config.js | 2 +- .../samples/export-from-external/_config.js | 2 +- .../export-from-internal-module/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../export-from-no-local-binding/_config.js | 2 +- .../samples/export-from-renamed/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../function/samples/export-global/_config.js | 2 +- .../export-not-at-top-level-fails/_config.js | 2 +- .../export-two-ways-default-b/_config.js | 2 +- .../export-two-ways-default/_config.js | 2 +- .../export-two-ways-function/_config.js | 2 +- .../samples/export-two-ways/_config.js | 2 +- .../samples/export-type-mismatch-b/_config.js | 2 +- .../samples/export-type-mismatch-c/_config.js | 2 +- .../samples/export-type-mismatch/_config.js | 2 +- .../_config.js | 2 +- .../samples/exports-named-values/_config.js | 2 +- .../samples/external-alias-parent/_config.js | 2 +- .../samples/external-alias/_config.js | 2 +- .../samples/external-conflict/_config.js | 2 +- .../external-directory-import/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../external-entry-point-object/_config.js | 2 +- .../samples/external-entry-point/_config.js | 2 +- .../external-function-always-true/_config.js | 2 +- .../samples/external-function/_config.js | 2 +- .../external-ids-not-resolved/_config.js | 2 +- .../_config.js | 2 +- .../external-live-binding-compact/_config.js | 2 +- .../samples/external-live-binding/_config.js | 2 +- .../samples/external-normalization/_config.js | 2 +- .../samples/external-regex-array/_config.js | 2 +- .../samples/external-regex/_config.js | 2 +- .../samples/external-resolve-false/_config.js | 2 +- .../samples/external-resolved/_config.js | 2 +- .../_config.js | 2 +- .../externally-reassigned-globals/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/facade-reexports/_config.js | 2 +- .../samples/fallback-on-warn/_config.js | 2 +- test/function/samples/file-and-dir/_config.js | 2 +- .../samples/for-in-accessors/_config.js | 2 +- .../for-in-loop-head-dependencies/_config.js | 2 +- .../for-loop-head-dependencies/_config.js | 2 +- .../samples/for-loop-parameter/_config.js | 2 +- .../for-loops-as-assignments/_config.js | 2 +- .../samples/for-of-accessors/_config.js | 2 +- .../for-of-loop-head-dependencies/_config.js | 2 +- .../for-of-with-in-operator/_config.js | 2 +- .../samples/function-asm-directive/_config.js | 2 +- .../function-directive-not-first/_config.js | 2 +- .../_config.js | 2 +- .../function-getter-side-effects/_config.js | 2 +- .../samples/function-side-effects/_config.js | 2 +- .../_config.js | 2 +- .../functions-renamed-correctly/_config.js | 2 +- .../generate-bundle-mutation/_config.js | 2 +- .../_config.js | 2 +- .../handle-calling-uncallable/_config.js | 2 +- .../handle-labels-inside-functions/_config.js | 2 +- .../handle-missing-export-source/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../handles-double-declarations/_config.js | 2 +- .../_config.js | 2 +- .../handles-stringified-sourcemaps/_config.js | 2 +- .../samples/has-default-export/_config.js | 2 +- .../samples/has-modules-array/_config.js | 2 +- .../hashing/length-at-non-hash/_config.js | 2 +- .../hashing/maximum-hash-size/_config.js | 2 +- .../hashing/minimum-hash-size/_config.js | 2 +- .../samples/hidden-directories/_config.js | 2 +- .../hoisted-variable-if-else/_config.js | 2 +- .../_config.js | 2 +- .../if-statement-insert-whitespace/_config.js | 2 +- .../if-statement-with-assignment/_config.js | 2 +- .../_config.js | 2 +- .../if-statement-with-update/_config.js | 2 +- .../samples/iife-code-splitting/_config.js | 2 +- .../function/samples/iife-comments/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../dependant-not-part-of-graph/_config.js | 2 +- .../external-dependant/_config.js | 2 +- .../missing-dependant/_config.js | 2 +- test/function/samples/import-as/_config.js | 2 +- .../plugin-assertions-this-resolve/_config.js | 2 +- .../warn-assertion-conflicts/_config.js | 2 +- .../samples/import-binding/_config.js | 2 +- .../samples/import-chain-as/_config.js | 2 +- test/function/samples/import-chain/_config.js | 2 +- .../_config.js | 2 +- .../import-default-as-named/_config.js | 2 +- .../import-default-as-other/_config.js | 2 +- .../samples/import-default-class/_config.js | 2 +- .../import-default-expression/_config.js | 2 +- .../import-default-from-external/_config.js | 2 +- .../import-default-function/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../import-empty-from-external/_config.js | 2 +- .../samples/import-meta-url/_config.js | 2 +- .../samples/import-named-class/_config.js | 2 +- .../import-named-from-external/_config.js | 2 +- .../import-named-function-as-other/_config.js | 2 +- .../samples/import-named-function/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../import-not-at-top-level-fails/_config.js | 2 +- .../import-of-unexported-fails/_config.js | 2 +- .../samples/import-var-declaration/_config.js | 2 +- .../imports-are-deconflicted-b/_config.js | 2 +- .../imports-are-deconflicted-c/_config.js | 2 +- .../imports-are-deconflicted/_config.js | 2 +- .../_config.js | 2 +- .../samples/includes-reassignments/_config.js | 2 +- .../samples/includes-superclass/_config.js | 2 +- .../inline-dynamic-imports-bundle/_config.js | 2 +- .../inline-dynamic-no-treeshake/_config.js | 2 +- .../inline-imports-with-manual/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/input-name-validation/_config.js | 2 +- .../samples/input-name-validation2/_config.js | 2 +- .../samples/input-name-validation3/_config.js | 2 +- .../instanceof/left-hand-effect/_config.js | 2 +- .../instanceof/right-hand-effect/_config.js | 2 +- .../instanceof/used-parameter/_config.js | 2 +- .../samples/instanceof/used/_config.js | 2 +- .../inter-chunk-execution-order/_config.js | 2 +- .../_config.js | 2 +- .../interop-auto-live-bindings/_config.js | 2 +- .../interop-auto-no-live-bindings/_config.js | 2 +- .../interop-default-conflict/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/interop-default-only/_config.js | 2 +- .../samples/interop-default/_config.js | 2 +- .../samples/interop-esmodule/_config.js | 2 +- .../samples/invalid-addon-hook/_config.js | 2 +- .../invalid-default-export-mode/_config.js | 2 +- .../invalid-ignore-list-function/_config.js | 2 +- .../samples/invalid-interop/_config.js | 2 +- .../invalid-pattern-replacement/_config.js | 2 +- .../samples/invalid-pattern/_config.js | 2 +- .../invalid-property-assignments/_config.js | 2 +- .../samples/invalid-property-calls/_config.js | 2 +- .../invalid-top-level-await/_config.js | 2 +- .../_config.js | 2 +- .../keep-cjs-dynamic-import/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../legal-import-modification/_config.js | 2 +- .../samples/legal-suggested-names/_config.js | 2 +- .../load-module-error/buildEnd/_config.js | 2 +- .../load-module-error/buildStart/_config.js | 2 +- .../generateBundle/_config.js | 2 +- .../samples/load-module-error/load/_config.js | 2 +- .../load-module-error/renderChunk/_config.js | 2 +- .../load-module-error/renderStart/_config.js | 2 +- .../load-module-error/resolveId/_config.js | 2 +- .../load-module-error/transform/_config.js | 2 +- .../load-resolve-dependencies/_config.js | 2 +- .../load-returns-empty-string/_config.js | 2 +- .../load-returns-string-or-null/_config.js | 2 +- .../samples/long-path-deopt/_config.js | 2 +- .../samples/manual-chunks-conflict/_config.js | 2 +- .../samples/manual-chunks-info/_config.js | 2 +- .../samples/mark-namespace-members/_config.js | 2 +- .../default/_config.js | 2 +- .../error/_config.js | 2 +- .../infinity/_config.js | 2 +- .../set/_config.js | 2 +- .../with-plugin/_config.js | 2 +- .../_config.js | 2 +- .../merged-namespace-live-bindings/_config.js | 2 +- .../method-call-mutates-this/_config.js | 2 +- .../method-call-side-effects/_config.js | 2 +- .../_config.js | 2 +- .../samples/mixed-external-paths/_config.js | 2 +- .../samples/modify-assumed-global/_config.js | 2 +- test/function/samples/modify-meta/_config.js | 2 +- .../modify-object-via-this-a/_config.js | 2 +- .../modify-object-via-this-b/_config.js | 2 +- .../modify-object-via-this-c/_config.js | 2 +- .../modify-object-via-this-d/_config.js | 2 +- .../deoptimized-props-with-getter/_config.js | 2 +- .../getter-in-assignment/_config.js | 2 +- .../getters-on-this/_config.js | 2 +- .../known-getter/_config.js | 2 +- .../known-super-prop/_config.js | 2 +- .../unknown-prop-getter/_config.js | 2 +- .../unknown-prop-unknown-access/_config.js | 2 +- .../unknown-property-access/_config.js | 2 +- .../unknown-super-prop/_config.js | 2 +- .../deoptimized-props-with-setter/_config.js | 2 +- .../known-setter/_config.js | 2 +- .../known-super-prop/_config.js | 2 +- .../unknown-prop-setter/_config.js | 2 +- .../unknown-prop-unknown-access/_config.js | 2 +- .../unknown-super-prop/_config.js | 2 +- .../samples/module-level-directive/_config.js | 2 +- .../samples/module-parsed-hook/_config.js | 2 +- .../module-parsed-imported-ids/_config.js | 2 +- .../module-side-effect-reexport/_config.js | 2 +- .../module-side-effects/array/_config.js | 2 +- .../external-false/_config.js | 2 +- .../global-false/_config.js | 2 +- .../invalid-option/_config.js | 2 +- .../module-side-effects/load/_config.js | 2 +- .../reexport-from-external/_config.js | 2 +- .../module-side-effects/reexports/_config.js | 2 +- .../resolve-id-external/_config.js | 2 +- .../module-side-effects/resolve-id/_config.js | 2 +- .../module-side-effects/transform/_config.js | 2 +- .../module-side-effects/writable/_config.js | 2 +- .../samples/module-sort-order/_config.js | 2 +- test/function/samples/module-tree/_config.js | 2 +- .../samples/name-conflict-object/_config.js | 2 +- .../samples/name-conflict-promise/_config.js | 2 +- .../samples/name-conflict-symbol/_config.js | 2 +- .../_config.js | 2 +- .../namespace-keys-are-sorted/_config.js | 2 +- .../namespace-literal-value/_config.js | 2 +- .../assignment/_config.js | 2 +- .../call/_config.js | 2 +- .../member-call/_config.js | 2 +- .../missing-access/_config.js | 2 +- .../unknown-access/_config.js | 2 +- .../namespace-missing-export/_config.js | 2 +- .../samples/namespace-override/_config.js | 2 +- .../_config.js | 2 +- .../dynamic-import-default-mode/_config.js | 2 +- .../dynamic-import/_config.js | 2 +- .../entry-default/_config.js | 2 +- .../namespace-tostring/entry-named/_config.js | 2 +- .../external-namespaces/_config.js | 2 +- .../inlined-namespace/_config.js | 2 +- .../interop-property-descriptor/_config.js | 2 +- .../property-descriptor/_config.js | 2 +- .../namespace-update-import-fails/_config.js | 2 +- .../samples/namespaces-are-frozen/_config.js | 2 +- .../namespaces-have-null-prototype/_config.js | 2 +- .../namespacing-collisions-2/_config.js | 2 +- .../samples/namespacing-collisions/_config.js | 2 +- .../namespacing-in-sub-functions/_config.js | 2 +- .../nested-and-async-plugin/_config.js | 2 +- .../samples/nested-foreach/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/new-target-meta/_config.js | 2 +- .../samples/newline-after-comment/_config.js | 2 +- .../_config.js | 2 +- .../no-external-live-bindings/_config.js | 2 +- test/function/samples/no-imports/_config.js | 2 +- .../samples/no-relative-external/_config.js | 2 +- .../samples/non-extension-dot/_config.js | 2 +- .../non-function-hook-async/_config.js | 2 +- .../samples/non-function-hook-sync/_config.js | 2 +- .../samples/non-js-extensions/_config.js | 2 +- .../object-deep-access-effect/_config.js | 2 +- .../object-destructuring-renaming/_config.js | 2 +- .../object-dynamic-properties/_config.js | 2 +- .../_config.js | 2 +- .../samples/object-properties/_config.js | 2 +- .../object-prototype-properties/_config.js | 2 +- .../object-spread-side-effect/_config.js | 2 +- .../samples/optional-catch-binding/_config.js | 2 +- .../optional-chaining-side-effect/_config.js | 2 +- .../samples/options-async-hook/_config.js | 2 +- test/function/samples/options-hook/_config.js | 2 +- .../samples/options-in-renderstart/_config.js | 2 +- .../samples/output-options-hook/_config.js | 2 +- .../override-external-namespace/_config.js | 2 +- .../_config.js | 2 +- .../parameter-defaults/arrays/_config.js | 2 +- .../class-fields/_config.js | 2 +- .../parameter-defaults/exported/_config.js | 2 +- .../function-as-default/_config.js | 2 +- .../function-return/_config.js | 2 +- .../logical-expressions/_config.js | 2 +- .../module-side-effects/_config.js | 2 +- .../parameter-defaults/objects/_config.js | 2 +- .../return-expressions/_config.js | 2 +- .../super-classes/_config.js | 2 +- .../tagged-templates/_config.js | 2 +- .../parameter-defaults/try-catch/_config.js | 2 +- .../samples/parameter-side-effects/_config.js | 2 +- .../parenthesised-default-export/_config.js | 2 +- .../pass-namespace-to-function/_config.js | 2 +- .../paths-are-case-sensitive/_config.js | 2 +- .../per-output-plugins-warn-hooks/_config.js | 2 +- .../_config.js | 2 +- .../perf-supports-object-hooks/_config.js | 2 +- .../plugin-cache/anonymous-delete/_config.js | 2 +- .../plugin-cache/anonymous-get/_config.js | 2 +- .../plugin-cache/anonymous-has/_config.js | 2 +- .../plugin-cache/anonymous-set/_config.js | 2 +- .../duplicate-names-no-cache/_config.js | 2 +- .../plugin-cache/duplicate-names/_config.js | 2 +- .../plugin-error-loc-instead-pos/_config.js | 2 +- .../plugin-error-module-parsed/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../plugin-error-should-transform/_config.js | 2 +- .../samples/plugin-error/buildEnd/_config.js | 2 +- .../plugin-error/buildStart/_config.js | 2 +- .../plugin-error/generateBundle/_config.js | 2 +- .../samples/plugin-error/load/_config.js | 2 +- .../plugin-error/renderChunk/_config.js | 2 +- .../plugin-error/renderStart/_config.js | 2 +- .../samples/plugin-error/resolveId/_config.js | 2 +- .../samples/plugin-error/transform/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../plugin-module-information/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- test/function/samples/plugin-parse/_config.js | 2 +- .../plugin-warn-loc-instead-pos/_config.js | 2 +- test/function/samples/plugin-warn/_config.js | 2 +- .../plugins-can-manipulate-options/_config.js | 2 +- .../samples/preload-after-build/_config.js | 2 +- .../samples/preload-cyclic-module/_config.js | 2 +- .../samples/preload-loading-module/_config.js | 2 +- .../samples/preload-module/_config.js | 2 +- .../preserve-for-of-iterable/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../inline-dynamic-imports/_config.js | 2 +- .../invalid-default-export-mode/_config.js | 2 +- .../_config.js | 2 +- .../invalid-none-export-mode/_config.js | 2 +- .../preserve-modules/manual-chunks/_config.js | 2 +- .../preserve-modules/mixed-exports/_config.js | 2 +- .../virtual-modules-conflict/_config.js | 2 +- .../virtual-modules/_config.js | 2 +- .../samples/preserve-symlink/_config.js | 2 +- .../preserves-catch-argument/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../prevent-asi-with-line-comments/_config.js | 2 +- .../prevent-context-resolve-loop/_config.js | 2 +- .../prevent-tree-shaking-asi/_config.js | 2 +- .../property-keys-not-renamed/_config.js | 2 +- .../propertyReadSideEffects-always/_config.js | 2 +- .../samples/protect-cjs-globals/_config.js | 2 +- .../samples/proto-accessors/_config.js | 2 +- .../re-export-default-import/_config.js | 2 +- .../re-export-namespace-import/_config.js | 2 +- .../_config.js | 2 +- .../reassign-computed-prototype/_config.js | 2 +- .../_config.js | 2 +- .../reassign-double-declarations/_config.js | 2 +- .../samples/reassign-empty-objects/_config.js | 2 +- .../reassign-for-loop-declarations/_config.js | 2 +- .../samples/reassign-import-fails/_config.js | 2 +- .../_config.js | 2 +- .../samples/reassign-namespace/_config.js | 2 +- .../reassign-object-literal-1/_config.js | 2 +- .../reassign-object-literal-2/_config.js | 2 +- .../reassign-parameter-property/_config.js | 2 +- .../samples/reassign-parameter/_config.js | 2 +- .../reassign-pattern-defaults/_config.js | 2 +- .../reassign-return-expression/_config.js | 2 +- .../reassign-return-expressions/_config.js | 2 +- .../reassigned-return-expression/_config.js | 2 +- .../_config.js | 2 +- .../samples/recursive-reexports/_config.js | 2 +- .../samples/redeclare-parameter/_config.js | 2 +- .../reexport-from-synthetic/_config.js | 2 +- .../samples/reexport-missing-error/_config.js | 2 +- test/function/samples/reexport-ns/_config.js | 2 +- .../reexports-from-external/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../relative-external-include-once/_config.js | 2 +- .../relative-outside-external/_config.js | 2 +- .../removes-empty-exported-vars/_config.js | 2 +- .../_config.js | 2 +- .../samples/rename-default-export/_config.js | 2 +- .../samples/renamed-arguments/_config.js | 2 +- .../samples/render-chunk-async/_config.js | 2 +- .../samples/resolve-id-object/_config.js | 2 +- .../resolve-relative-external-id/_config.js | 2 +- .../_config.js | 2 +- .../resolve-unordered-assignments/_config.js | 2 +- .../samples/resolveid-is-entry/_config.js | 2 +- .../resolves-namespace-default/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/retains-sort-order-b/_config.js | 2 +- .../samples/retains-sort-order/_config.js | 2 +- .../_config.js | 2 +- .../returned-array-mutation/_config.js | 2 +- .../samples/reuse-resolve-meta/_config.js | 2 +- .../rewrite-member-expressions/_config.js | 2 +- .../samples/sequence-expression/_config.js | 2 +- .../_config.js | 2 +- .../shadowed-external-export/_config.js | 2 +- .../samples/shadowed-namespace-b/_config.js | 2 +- .../samples/shadowed-namespace/_config.js | 2 +- .../samples/shadowed-variables/_config.js | 2 +- .../samples/shims-missing-exports/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/simplified-nested-if/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../simplify-sequence-expressions/_config.js | 2 +- .../simplify-with-destructuring/_config.js | 2 +- .../simplify-with-function-iife/_config.js | 2 +- .../sourcemap-base-url-invalid/_config.js | 2 +- .../_config.js | 2 +- .../sourcemap-true-generatebundle/_config.js | 2 +- .../sourcemapping-url-comment/_config.js | 2 +- .../sourcemapping-url-multiline/_config.js | 2 +- .../spread-arguments-unused/_config.js | 2 +- .../samples/statement-order/_config.js | 2 +- test/function/samples/switch-break/_config.js | 2 +- .../switch-cases-are-deconflicted/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- test/function/samples/symlink/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../circular-synthetic-exports/_config.js | 2 +- .../circular-synthetic-exports2/_config.js | 2 +- .../dynamic-import/_config.js | 2 +- .../synthetic-named-exports/entry/_config.js | 2 +- .../external-synthetic-exports/_config.js | 2 +- .../namespace-object/_config.js | 2 +- .../namespace-overrides/_config.js | 2 +- .../non-default-export/_config.js | 2 +- .../preserve-modules/_config.js | 2 +- .../synthetic-exports-need-default/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../synthetic-named-export-entry/_config.js | 2 +- .../tagged-template-deoptimize/_config.js | 2 +- .../samples/this-not-namespace/_config.js | 2 +- .../samples/this-side-effect/_config.js | 2 +- .../throws-not-found-module/_config.js | 2 +- .../top-level-arrow-function/_config.js | 2 +- .../samples/top-level-block/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/track-awaited-object/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/track-reassignments/_config.js | 2 +- .../tracks-alias-mutations-b/_config.js | 2 +- .../samples/tracks-alias-mutations/_config.js | 2 +- .../samples/transform-empty-string/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/transform-without-code/_config.js | 2 +- .../samples/transformer-async/_config.js | 2 +- .../samples/transformer-multiple/_config.js | 2 +- .../samples/transformer-single/_config.js | 2 +- .../transparent-dynamic-inlining/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/try-catch-scoping/_config.js | 2 +- .../unknown-for-loop-variables/_config.js | 2 +- .../unknown-generated-code-preset/_config.js | 2 +- .../unknown-generated-code-value/_config.js | 2 +- .../unknown-global-side-effects/_config.js | 2 +- .../samples/unknown-statement/_config.js | 2 +- .../unknown-treeshake-preset/_config.js | 2 +- .../unknown-treeshake-value/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../unused-for-in-loop-declaration/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../unused-for-of-loop-declaration/_config.js | 2 +- .../_config.js | 2 +- .../function/samples/unused-import/_config.js | 2 +- .../unused-parameter-side-effects/_config.js | 2 +- .../unused-parenthesed-assignment/_config.js | 2 +- test/function/samples/unused-var-a/_config.js | 2 +- test/function/samples/unused-var-b/_config.js | 2 +- test/function/samples/unused-var-c/_config.js | 2 +- test/function/samples/unused-var-d/_config.js | 2 +- .../unused-while-loop-declaration/_config.js | 2 +- .../update-expression-accessors/_config.js | 2 +- .../_config.js | 2 +- .../use-class-name-in-static-block/_config.js | 2 +- .../samples/use-var-before-decl/_config.js | 2 +- .../samples/uses-supplied-ast/_config.js | 2 +- .../samples/validate-output/_config.js | 2 +- .../validate-resolved-by-logic/_config.js | 2 +- .../samples/vars-in-for-loop-head/_config.js | 2 +- .../vars-not-removed-in-if-block/_config.js | 2 +- .../samples/vars-not-removed/_config.js | 2 +- .../vars-with-init-in-dead-branch/_config.js | 2 +- .../samples/warn-missing-iife-name/_config.js | 2 +- .../_config.js | 2 +- .../samples/warn-on-empty-bundle/_config.js | 2 +- test/function/samples/warn-on-eval/_config.js | 2 +- .../warn-on-namespace-conflict/_config.js | 2 +- .../samples/warn-on-top-level-this/_config.js | 2 +- .../warn-on-unused-missing-imports/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/warnings-to-string/_config.js | 2 +- .../warns-for-invalid-options/_config.js | 2 +- test/function/samples/watch-option/_config.js | 2 +- .../_config.js | 2 +- .../wraps-simplified-expressions/_config.js | 2 +- test/function/tsconfig.json | 8 ++ test/sourcemaps/define.d.ts | 5 ++ .../samples/basic-support/_config.js | 2 +- .../combined-sourcemap-with-loader/_config.js | 2 +- .../samples/combined-sourcemap/_config.js | 2 +- .../excludes-plugin-helpers/_config.js | 4 +- .../_config.js | 2 +- .../_config.js | 2 +- .../samples/ignore-list-default/_config.js | 2 +- .../samples/ignore-list-false/_config.js | 2 +- .../ignore-list-source-files/_config.js | 2 +- .../ignore-list-sourcemap-path/_config.js | 2 +- test/sourcemaps/samples/loaders/_config.js | 2 +- .../names-transformed-render-chunk/_config.js | 2 +- test/sourcemaps/samples/names/_config.js | 2 +- .../samples/reified-namespace/_config.js | 2 +- .../samples/relative-paths/_config.js | 2 +- .../samples/render-chunk-babili/_config.js | 2 +- .../samples/render-chunk/_config.js | 3 +- .../samples/single-length-segments/_config.js | 2 +- .../samples/sourcemap-base-url/_config.js | 2 +- .../samples/sourcemap-file-hashed/_config.js | 2 +- .../samples/sourcemap-file/_config.js | 2 +- .../transform-full-source-paths/_config.js | 2 +- .../transform-low-resolution/_config.js | 4 +- .../samples/transform-source-paths/_config.js | 2 +- .../_config.js | 2 +- test/sourcemaps/samples/transforms/_config.js | 4 +- .../samples/untransformed-modules/_config.js | 3 +- test/sourcemaps/tsconfig.json | 8 ++ ...tsconfig.utils.json => tsconfig.base.json} | 13 ++- test/tsconfig.json | 22 +++-- test/types.d.ts | 60 ++++++++------ test/utils.js | 33 +++++--- test/watch/index.js | 1 + 1964 files changed, 2165 insertions(+), 2036 deletions(-) create mode 100644 test/browser/define.d.ts create mode 100644 test/browser/tsconfig.json create mode 100644 test/chunking-form/define.d.ts create mode 100644 test/chunking-form/tsconfig.json create mode 100644 test/cli/define.d.ts create mode 100644 test/cli/tsconfig.json create mode 100644 test/file-hashes/define.d.ts create mode 100644 test/file-hashes/tsconfig.json create mode 100644 test/form/define.d.ts create mode 100644 test/form/tsconfig.json create mode 100644 test/function/define.d.ts create mode 100644 test/function/tsconfig.json create mode 100644 test/sourcemaps/define.d.ts create mode 100644 test/sourcemaps/tsconfig.json rename test/{tsconfig.utils.json => tsconfig.base.json} (55%) diff --git a/.vscode/settings.json b/.vscode/settings.json index cf00f88a09e..971a04ed371 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,5 +5,6 @@ "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, - "references.preferredLocation": "peek" + "references.preferredLocation": "peek", + "vue.features.codeActions.enable": false } diff --git a/test/browser/define.d.ts b/test/browser/define.d.ts new file mode 100644 index 00000000000..1e9efb55b8a --- /dev/null +++ b/test/browser/define.d.ts @@ -0,0 +1,5 @@ +import type { TestConfigBase } from '../types'; + +declare global { + function defineTest(config: TestConfigBase): TestConfigBase; +} diff --git a/test/browser/index.js b/test/browser/index.js index 2546a0d1391..2baa6304f17 100644 --- a/test/browser/index.js +++ b/test/browser/index.js @@ -1,13 +1,16 @@ // since we don't run the browser tests in an actual browser, we need to make `performance` // globally accessible same as in the browser. this can be removed once `performance` is // available globally in all supported platforms. [currently global for node.js v16+]. +// @ts-expect-error ignore global.performance = require('node:perf_hooks').performance; const { basename, resolve } = require('node:path'); const fixturify = require('fixturify'); + /** * @type {import('../../src/rollup/types')} Rollup */ +// @ts-expect-error cast to Rollup const { rollup } = require('../../browser/dist/rollup.browser.js'); const { assertFilesAreEqual, runTestSuiteWithSamples, compareError } = require('../utils.js'); diff --git a/test/browser/samples/basic/_config.js b/test/browser/samples/basic/_config.js index 8ac93e1783d..9697e938457 100644 --- a/test/browser/samples/basic/_config.js +++ b/test/browser/samples/basic/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'bundles files for the browser', options: { plugins: loader({ diff --git a/test/browser/samples/missing-dependency-resolution/_config.js b/test/browser/samples/missing-dependency-resolution/_config.js index ea6db6b6e30..07da69ed0ef 100644 --- a/test/browser/samples/missing-dependency-resolution/_config.js +++ b/test/browser/samples/missing-dependency-resolution/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'fails if a dependency cannot be resolved', options: { plugins: loader({ diff --git a/test/browser/samples/missing-entry-resolution/_config.js b/test/browser/samples/missing-entry-resolution/_config.js index 667ff148d10..f122cdb59e1 100644 --- a/test/browser/samples/missing-entry-resolution/_config.js +++ b/test/browser/samples/missing-entry-resolution/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'fails if an entry cannot be resolved', error: { code: 'NO_FS_IN_BROWSER', diff --git a/test/browser/samples/missing-load/_config.js b/test/browser/samples/missing-load/_config.js index 1710496b500..b61c4fef40d 100644 --- a/test/browser/samples/missing-load/_config.js +++ b/test/browser/samples/missing-load/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'fails if a file cannot be loaded', options: { plugins: { diff --git a/test/browser/samples/renormalizes-external-paths/_config.js b/test/browser/samples/renormalizes-external-paths/_config.js index 10e3650658a..cc3de31a68f 100644 --- a/test/browser/samples/renormalizes-external-paths/_config.js +++ b/test/browser/samples/renormalizes-external-paths/_config.js @@ -1,6 +1,6 @@ const { join, dirname } = require('node:path').posix; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renormalizes external paths if possible', options: { input: ['/main.js', '/nested/entry.js'], diff --git a/test/browser/samples/supports-hashes/_config.js b/test/browser/samples/supports-hashes/_config.js index 9a48f0c98e3..c90c50c9bb3 100644 --- a/test/browser/samples/supports-hashes/_config.js +++ b/test/browser/samples/supports-hashes/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'bundles files for the browser', options: { input: ['main', 'dep'], diff --git a/test/browser/tsconfig.json b/test/browser/tsconfig.json new file mode 100644 index 00000000000..4a26f3ee84c --- /dev/null +++ b/test/browser/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "include": [ + "**/_config.js", + "./index.js", + "./define.d.ts" + ] +} diff --git a/test/chunking-form/define.d.ts b/test/chunking-form/define.d.ts new file mode 100644 index 00000000000..00b66beb120 --- /dev/null +++ b/test/chunking-form/define.d.ts @@ -0,0 +1,5 @@ +import type { TestConfigChunkingForm } from '../types'; + +declare global { + function defineTest(config: TestConfigChunkingForm): TestConfigChunkingForm; +} diff --git a/test/chunking-form/index.js b/test/chunking-form/index.js index 8e27e625582..f0dd86fcd40 100644 --- a/test/chunking-form/index.js +++ b/test/chunking-form/index.js @@ -66,6 +66,7 @@ async function generateAndTestBundle(bundle, outputOptions, expectedDirectory, c if (outputOptions.format === 'amd' && config.runAmd) { try { const exports = await new Promise((resolve, reject) => { + // @ts-expect-error global global.assert = require('node:assert'); const requirejs = require('requirejs'); requirejs.config({ baseUrl: outputOptions.dir }); @@ -76,7 +77,9 @@ async function generateAndTestBundle(bundle, outputOptions, expectedDirectory, c } } finally { delete require.cache[require.resolve('requirejs')]; + // @ts-expect-error global delete global.requirejsVars; + // @ts-expect-error global delete global.assert; } } diff --git a/test/chunking-form/samples/aliasing-extensions/_config.js b/test/chunking-form/samples/aliasing-extensions/_config.js index dbf318a82e5..75668bcd7c4 100644 --- a/test/chunking-form/samples/aliasing-extensions/_config.js +++ b/test/chunking-form/samples/aliasing-extensions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk aliasing with extensions', options: { input: ['main1', 'main2', 'main3.ts'] diff --git a/test/chunking-form/samples/amd-id-auto-base-path-concat/_config.js b/test/chunking-form/samples/amd-id-auto-base-path-concat/_config.js index 4b6460c70a8..34581fa6241 100644 --- a/test/chunking-form/samples/amd-id-auto-base-path-concat/_config.js +++ b/test/chunking-form/samples/amd-id-auto-base-path-concat/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: "allows to use amd.autoId with amd.basePath and works when concat'd into one file", options: { input: ['main'], diff --git a/test/chunking-form/samples/amd-id-auto-base-path/_config.js b/test/chunking-form/samples/amd-id-auto-base-path/_config.js index 9c5bd24bdaf..9e49a70026b 100644 --- a/test/chunking-form/samples/amd-id-auto-base-path/_config.js +++ b/test/chunking-form/samples/amd-id-auto-base-path/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to use amd.autoId with amd.basePath, and chunks folder', options: { input: ['main'], diff --git a/test/chunking-form/samples/amd-id-auto/_config.js b/test/chunking-form/samples/amd-id-auto/_config.js index bd47b8dc295..62dce8813f7 100644 --- a/test/chunking-form/samples/amd-id-auto/_config.js +++ b/test/chunking-form/samples/amd-id-auto/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to use amd.autoId', options: { input: ['main'], diff --git a/test/chunking-form/samples/asset-needs-code-reference-same-source/_config.js b/test/chunking-form/samples/asset-needs-code-reference-same-source/_config.js index d370a635b02..932e0a08294 100644 --- a/test/chunking-form/samples/asset-needs-code-reference-same-source/_config.js +++ b/test/chunking-form/samples/asset-needs-code-reference-same-source/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'emits unreferenced assets if needsCodeReference is true if they are also emitted without that flag', options: { diff --git a/test/chunking-form/samples/asset-needs-code-reference/_config.js b/test/chunking-form/samples/asset-needs-code-reference/_config.js index 5f45abc8768..d593ffa4d11 100644 --- a/test/chunking-form/samples/asset-needs-code-reference/_config.js +++ b/test/chunking-form/samples/asset-needs-code-reference/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const fs = require('node:fs'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not emit unreferenced assets if needsCodeReference is true', options: { output: { diff --git a/test/chunking-form/samples/avoid-chunk-import-hoisting/_config.js b/test/chunking-form/samples/avoid-chunk-import-hoisting/_config.js index 0ae648f66e2..1b0d962ce0c 100644 --- a/test/chunking-form/samples/avoid-chunk-import-hoisting/_config.js +++ b/test/chunking-form/samples/avoid-chunk-import-hoisting/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids hoisting transitive dependencies via flag', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/basic-chunking/_config.js b/test/chunking-form/samples/basic-chunking/_config.js index 44edcd5c62b..0f55acd1edc 100644 --- a/test/chunking-form/samples/basic-chunking/_config.js +++ b/test/chunking-form/samples/basic-chunking/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'simple chunking', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/chunk-deshadowing-reassignment/_config.js b/test/chunking-form/samples/chunk-deshadowing-reassignment/_config.js index 7536fba83cd..c4a86112011 100644 --- a/test/chunking-form/samples/chunk-deshadowing-reassignment/_config.js +++ b/test/chunking-form/samples/chunk-deshadowing-reassignment/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk reassignment import deshadowing', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'] diff --git a/test/chunking-form/samples/chunk-execution-order/_config.js b/test/chunking-form/samples/chunk-execution-order/_config.js index 033b2bbfb3f..53b6ecbb3b1 100644 --- a/test/chunking-form/samples/chunk-execution-order/_config.js +++ b/test/chunking-form/samples/chunk-execution-order/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maintains execution order ', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'] diff --git a/test/chunking-form/samples/chunk-export-deshadowing/_config.js b/test/chunking-form/samples/chunk-export-deshadowing/_config.js index b570125e344..5a9970b0b25 100644 --- a/test/chunking-form/samples/chunk-export-deshadowing/_config.js +++ b/test/chunking-form/samples/chunk-export-deshadowing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk export deshadowing', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/chunking-form/samples/chunk-export-renaming/_config.js b/test/chunking-form/samples/chunk-export-renaming/_config.js index f538cfe0cfe..e743bcb4fc0 100644 --- a/test/chunking-form/samples/chunk-export-renaming/_config.js +++ b/test/chunking-form/samples/chunk-export-renaming/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk export renaming', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/chunk-import-deshadowing/_config.js b/test/chunking-form/samples/chunk-import-deshadowing/_config.js index 9b0f43c48f5..9b0e303d2ae 100644 --- a/test/chunking-form/samples/chunk-import-deshadowing/_config.js +++ b/test/chunking-form/samples/chunk-import-deshadowing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk import deshadowing', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/chunk-live-bindings/_config.js b/test/chunking-form/samples/chunk-live-bindings/_config.js index 7a8da3f8f28..3fc1fb7b7b8 100644 --- a/test/chunking-form/samples/chunk-live-bindings/_config.js +++ b/test/chunking-form/samples/chunk-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ES module live bindings in chunks', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/chunking-form/samples/chunk-namespace-boundary/_config.js b/test/chunking-form/samples/chunk-namespace-boundary/_config.js index baaf90cf316..87e946f115a 100644 --- a/test/chunking-form/samples/chunk-namespace-boundary/_config.js +++ b/test/chunking-form/samples/chunk-namespace-boundary/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk with a namespace boundary', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/chunk-naming/_config.js b/test/chunking-form/samples/chunk-naming/_config.js index c324ba0c577..f7f0e219f43 100644 --- a/test/chunking-form/samples/chunk-naming/_config.js +++ b/test/chunking-form/samples/chunk-naming/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'simple chunking', options: { input: { diff --git a/test/chunking-form/samples/chunk-variable-name-conflict/_config.js b/test/chunking-form/samples/chunk-variable-name-conflict/_config.js index 8f0159de38a..2d3898b4196 100644 --- a/test/chunking-form/samples/chunk-variable-name-conflict/_config.js +++ b/test/chunking-form/samples/chunk-variable-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk variable name conflict', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/chunking-compact/_config.js b/test/chunking-form/samples/chunking-compact/_config.js index 7bf530c5af9..407e02c1727 100644 --- a/test/chunking-form/samples/chunking-compact/_config.js +++ b/test/chunking-form/samples/chunking-compact/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunking compact and mangled output', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/chunking-externals/_config.js b/test/chunking-form/samples/chunking-externals/_config.js index 7860565760e..f2630b5a279 100644 --- a/test/chunking-form/samples/chunking-externals/_config.js +++ b/test/chunking-form/samples/chunking-externals/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunking external module handling', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/chunking-reexport/_config.js b/test/chunking-form/samples/chunking-reexport/_config.js index aa32efa8539..ad213495366 100644 --- a/test/chunking-form/samples/chunking-reexport/_config.js +++ b/test/chunking-form/samples/chunking-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunking star external', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/chunking-source-maps/_config.js b/test/chunking-form/samples/chunking-source-maps/_config.js index 8ab1fae898b..b3272e3c679 100644 --- a/test/chunking-form/samples/chunking-source-maps/_config.js +++ b/test/chunking-form/samples/chunking-source-maps/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'source maps', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/chunking-star-external/_config.js b/test/chunking-form/samples/chunking-star-external/_config.js index 89bcd2c4697..2ab2aae45cb 100644 --- a/test/chunking-form/samples/chunking-star-external/_config.js +++ b/test/chunking-form/samples/chunking-star-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunking star external', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/circular-entry-points/_config.js b/test/chunking-form/samples/circular-entry-points/_config.js index eba994526a5..b12b129c5df 100644 --- a/test/chunking-form/samples/circular-entry-points/_config.js +++ b/test/chunking-form/samples/circular-entry-points/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunking circular entry points', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/chunking-form/samples/circular-entry-points2/_config.js b/test/chunking-form/samples/circular-entry-points2/_config.js index 5a5aa050957..b3da7733aff 100644 --- a/test/chunking-form/samples/circular-entry-points2/_config.js +++ b/test/chunking-form/samples/circular-entry-points2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not create a facade for one circular entry point if possible', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/chunking-form/samples/circular-entry-points3/_config.js b/test/chunking-form/samples/circular-entry-points3/_config.js index 65e6fe17ad8..c73b3d824e6 100644 --- a/test/chunking-form/samples/circular-entry-points3/_config.js +++ b/test/chunking-form/samples/circular-entry-points3/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates facades for all circular entry points if they become tainted by another entry', expectedWarnings: ['CIRCULAR_DEPENDENCY'], diff --git a/test/chunking-form/samples/circular-manual-chunks/_config.js b/test/chunking-form/samples/circular-manual-chunks/_config.js index e710635e4f4..29b6382e959 100644 --- a/test/chunking-form/samples/circular-manual-chunks/_config.js +++ b/test/chunking-form/samples/circular-manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles manual chunks with circular dependencies', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/chunking-form/samples/combined-namespace-reexport/_config.js b/test/chunking-form/samples/combined-namespace-reexport/_config.js index a14caa99d39..c7ae8738bf7 100644 --- a/test/chunking-form/samples/combined-namespace-reexport/_config.js +++ b/test/chunking-form/samples/combined-namespace-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles combined namespace reexports', options: { input: ['main1', 'main2'] diff --git a/test/chunking-form/samples/custom-sanitizer/_config.js b/test/chunking-form/samples/custom-sanitizer/_config.js index 653bc2ebe94..c556c19f323 100644 --- a/test/chunking-form/samples/custom-sanitizer/_config.js +++ b/test/chunking-form/samples/custom-sanitizer/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports custom file name sanitizer functions', options: { plugins: [ diff --git a/test/chunking-form/samples/deconflict-globals/_config.js b/test/chunking-form/samples/deconflict-globals/_config.js index 7b16ddea120..cb6c7c55b09 100644 --- a/test/chunking-form/samples/deconflict-globals/_config.js +++ b/test/chunking-form/samples/deconflict-globals/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not deconflict due to global variables used in other chunks', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/deconflict-system-default-export-variable/_config.js b/test/chunking-form/samples/deconflict-system-default-export-variable/_config.js index 6bde5351e7c..f07effdb049 100644 --- a/test/chunking-form/samples/deconflict-system-default-export-variable/_config.js +++ b/test/chunking-form/samples/deconflict-system-default-export-variable/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts SystemJS default export variable with namespace imports', options: { external: 'external', diff --git a/test/chunking-form/samples/deduplicate-imports-referencing-originals-2/_config.js b/test/chunking-form/samples/deduplicate-imports-referencing-originals-2/_config.js index 722609fc2cc..f938b8172b2 100644 --- a/test/chunking-form/samples/deduplicate-imports-referencing-originals-2/_config.js +++ b/test/chunking-form/samples/deduplicate-imports-referencing-originals-2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not import variables that reference an original if another variable referencing it is already imported', options: { diff --git a/test/chunking-form/samples/deduplicate-imports-referencing-originals/_config.js b/test/chunking-form/samples/deduplicate-imports-referencing-originals/_config.js index 3f717441229..7053b779517 100644 --- a/test/chunking-form/samples/deduplicate-imports-referencing-originals/_config.js +++ b/test/chunking-form/samples/deduplicate-imports-referencing-originals/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not import variables that reference an original if the original is already imported', options: { diff --git a/test/chunking-form/samples/default-export-name-conflict/_config.js b/test/chunking-form/samples/default-export-name-conflict/_config.js index 8f877c97b9c..ff47dc7beb5 100644 --- a/test/chunking-form/samples/default-export-name-conflict/_config.js +++ b/test/chunking-form/samples/default-export-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not produce name conflicts when reexporting via default exports', options: { input: ['main1', 'main2'] diff --git a/test/chunking-form/samples/default-identifier-renaming/_config.js b/test/chunking-form/samples/default-identifier-renaming/_config.js index 6b0724eafb9..56449217213 100644 --- a/test/chunking-form/samples/default-identifier-renaming/_config.js +++ b/test/chunking-form/samples/default-identifier-renaming/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Default export identifier name handling', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/default-reexport-namespace/_config.js b/test/chunking-form/samples/default-reexport-namespace/_config.js index b4673c0accb..18616527b0c 100644 --- a/test/chunking-form/samples/default-reexport-namespace/_config.js +++ b/test/chunking-form/samples/default-reexport-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Properly handle adding a default reexport to a namespace (#3583)', options: { input: ['main.js', 'icons/one.js'] diff --git a/test/chunking-form/samples/deprecated/avoid-imports-preserve-modules/_config.js b/test/chunking-form/samples/deprecated/avoid-imports-preserve-modules/_config.js index 5ef9ab79019..b368e78bc3d 100644 --- a/test/chunking-form/samples/deprecated/avoid-imports-preserve-modules/_config.js +++ b/test/chunking-form/samples/deprecated/avoid-imports-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids empty imports if they do not have side-effects when preserving modules (#3359)', options: { diff --git a/test/chunking-form/samples/deprecated/circular-manual-chunks/_config.js b/test/chunking-form/samples/deprecated/circular-manual-chunks/_config.js index 54adb55ca9c..12a9913ebd6 100644 --- a/test/chunking-form/samples/deprecated/circular-manual-chunks/_config.js +++ b/test/chunking-form/samples/deprecated/circular-manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles manual chunks with circular dependencies', expectedWarnings: ['CIRCULAR_DEPENDENCY', 'DEPRECATED_FEATURE'], options: { diff --git a/test/chunking-form/samples/deprecated/dynamic-import-comments/_config.js b/test/chunking-form/samples/deprecated/dynamic-import-comments/_config.js index 1e2742c33ce..746c725029c 100644 --- a/test/chunking-form/samples/deprecated/dynamic-import-comments/_config.js +++ b/test/chunking-form/samples/deprecated/dynamic-import-comments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'should not remove inline comments inside dynamic import', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_config.js b/test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_config.js index 5b928a58cc4..96d7c5a1115 100644 --- a/test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_config.js +++ b/test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports an object with a single entry when inlining dynamic imports', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/dynamic-import-name/_config.js b/test/chunking-form/samples/deprecated/dynamic-import-name/_config.js index 05d4e795d37..a9f1c4e01de 100644 --- a/test/chunking-form/samples/deprecated/dynamic-import-name/_config.js +++ b/test/chunking-form/samples/deprecated/dynamic-import-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows specifying a custom importer function', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/emit-file-chunk-facade/_config.js b/test/chunking-form/samples/deprecated/emit-file-chunk-facade/_config.js index cf7cfad890b..dad2efee3d5 100644 --- a/test/chunking-form/samples/deprecated/emit-file-chunk-facade/_config.js +++ b/test/chunking-form/samples/deprecated/emit-file-chunk-facade/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retrieves the correct name of an emitted chunk in case a facade is created', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js b/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js index 9124573825d..3fa8b308782 100644 --- a/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js +++ b/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const { getObject } = require('../../../../utils'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'associates empty modules with chunks if tree-shaking is disabled for them', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/indirect-reexports-preserve-modules/_config.js b/test/chunking-form/samples/deprecated/indirect-reexports-preserve-modules/_config.js index d5b81c427d6..481a1edb510 100644 --- a/test/chunking-form/samples/deprecated/indirect-reexports-preserve-modules/_config.js +++ b/test/chunking-form/samples/deprecated/indirect-reexports-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not drop indirect reexports when preserving modules', expectedWarnings: ['MIXED_EXPORTS', 'DEPRECATED_FEATURE'], options: { diff --git a/test/chunking-form/samples/deprecated/manual-chunk-avoid-facade/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-avoid-facade/_config.js index 7923b266803..41df7cd662b 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-avoid-facade/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-avoid-facade/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoid facades if possible when using manual chunks', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-conflict/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-conflict/_config.js index 4ceaf33051b..cac8317c380 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-conflict/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Uses entry alias if manual chunks contain entry chunks with different alias', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-match/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-match/_config.js index a3287e58979..c13a9584f8b 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-match/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-contains-entry-match/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Identifies the entry chunk with the manual chunk that contains it if the aliases match', options: { diff --git a/test/chunking-form/samples/deprecated/manual-chunk-is-entry-conflict/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-is-entry-conflict/_config.js index f2f927012e1..21f5ba76e6e 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-is-entry-conflict/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-is-entry-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Uses entry alias if manual chunks are entry chunks with different alias', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunk-is-entry-match/_config.js b/test/chunking-form/samples/deprecated/manual-chunk-is-entry-match/_config.js index 1312bd452c3..3f5ac15538b 100644 --- a/test/chunking-form/samples/deprecated/manual-chunk-is-entry-match/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunk-is-entry-match/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Identifies the entry chunk with the manual chunk that has the same entry if the aliases match', options: { diff --git a/test/chunking-form/samples/deprecated/manual-chunks-different-nested/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-different-nested/_config.js index 783d0e10896..e50efec07c7 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-different-nested/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-different-nested/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'manual chunks can have other manual chunks as dependencies', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunks-dynamic-facades/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-dynamic-facades/_config.js index e06d5a83542..b906013dae4 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-dynamic-facades/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-dynamic-facades/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates facades for dynamic manual chunks if necessary', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunks-dynamic-name-conflict/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-dynamic-name-conflict/_config.js index c35e5def592..e9c932a35e5 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-dynamic-name-conflict/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-dynamic-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles name conflicts in manual chunks', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunks-dynamic/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-dynamic/_config.js index 2250f389971..2501bda21ac 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-dynamic/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-dynamic/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports dynamic manual chunks', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunks-function/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-function/_config.js index facde1ee75b..8952acaec79 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-function/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to define manual chunks via a function', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunks-nested/_config.js b/test/chunking-form/samples/deprecated/manual-chunks-nested/_config.js index 1c239acf7fb..e988680a02e 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks-nested/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks-nested/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'manual chunks can contain nested modules', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/manual-chunks/_config.js b/test/chunking-form/samples/deprecated/manual-chunks/_config.js index d781f565606..08bb1489df0 100644 --- a/test/chunking-form/samples/deprecated/manual-chunks/_config.js +++ b/test/chunking-form/samples/deprecated/manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'manual chunks support', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/missing-export-reused-deconflicting/_config.js b/test/chunking-form/samples/deprecated/missing-export-reused-deconflicting/_config.js index 0da91354fdb..3204a18a80c 100644 --- a/test/chunking-form/samples/deprecated/missing-export-reused-deconflicting/_config.js +++ b/test/chunking-form/samples/deprecated/missing-export-reused-deconflicting/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles using dependencies with shimmed missing exports as ', expectedWarnings: ['SHIMMED_EXPORT', 'DEPRECATED_FEATURE'], options: { diff --git a/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js b/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js index 60dfd8f23fe..acbfd7b6c2a 100644 --- a/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js +++ b/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', options: { diff --git a/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import/_config.js b/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import/_config.js index 24d34aafcaf..575cabf506e 100644 --- a/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import/_config.js +++ b/test/chunking-form/samples/deprecated/namespace-tostring/dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to dynamic imports', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-auto-export-mode/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-auto-export-mode/_config.js index 42f4523d31f..0c0972b78df 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-auto-export-mode/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-auto-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Uses entry point semantics for all files when preserving modules', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-commonjs/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-commonjs/_config.js index e8f4f0c9788..5a551c30ac9 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-commonjs/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-commonjs/_config.js @@ -1,6 +1,6 @@ const commonjs = require('@rollup/plugin-commonjs'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Handles output from @rollup/plugin-commonjs', expectedWarnings: ['MIXED_EXPORTS', 'DEPRECATED_FEATURE'], options: { diff --git a/test/chunking-form/samples/deprecated/preserve-modules-dynamic-imports/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-dynamic-imports/_config.js index 2198b1f2339..565a7037a0f 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-dynamic-imports/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'dynamic imports are handled correctly when preserving modules', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-dynamic-namespace/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-dynamic-namespace/_config.js index 9cf47fcf603..36f30eeec44 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-dynamic-namespace/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-dynamic-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Preserve modules properly handles internal namespace imports (#2576)', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-empty/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-empty/_config.js index aef5949ec08..9c0b23efcee 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-empty/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-empty/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Preserve modules remove empty dependencies', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-export-alias/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-export-alias/_config.js index ccce2412fb5..d544144ad5a 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-export-alias/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-export-alias/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'confirm export aliases are preserved in modules', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-filename-pattern/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-filename-pattern/_config.js index 9da57d69056..aa99c0a74f9 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-filename-pattern/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-filename-pattern/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'entryFileNames pattern supported in combination with preserveModules', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-id-case-sensitive/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-id-case-sensitive/_config.js index 712bd01da14..2d68e2aacd9 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-id-case-sensitive/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-id-case-sensitive/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Preserve modules id case sensitive', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-named-export-mode/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-named-export-mode/_config.js index 6c1c335f893..6ad3a9ed231 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-named-export-mode/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-named-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects "named" export mode in all chunks when preserving modules', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-nested-barrel-es-export/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-nested-barrel-es-export/_config.js index 1b3fd23827d..5ec0f76923b 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-nested-barrel-es-export/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-nested-barrel-es-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'confirm exports are deconflicted when exporting nested index aliases', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-nested-export/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-nested-export/_config.js index 77ed92cd6ed..2997fa8cf86 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-nested-export/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-nested-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'confirm exports are preserved when exporting a module', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-non-entry-imports/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-non-entry-imports/_config.js index 67fad9fdc90..d7e6ce2702f 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-non-entry-imports/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-non-entry-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports and exports of non-entry points are tracked', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-proxy-import/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-proxy-import/_config.js index 79636515115..951a6d939ce 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-proxy-import/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-proxy-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly resolves imports via a proxy module as direct imports when preserving modules', options: { diff --git a/test/chunking-form/samples/deprecated/preserve-modules-reaching-outside/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-reaching-outside/_config.js index bb847c2bded..804c626e7d6 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-reaching-outside/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-reaching-outside/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'change the module destination', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-scriptified-assets/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-scriptified-assets/_config.js index 9d782e1287d..53398ea6888 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-scriptified-assets/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-scriptified-assets/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'scriptified assets have extension in preserveModules output filename', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-single-entry/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-single-entry/_config.js index 2cfe6a41771..3391dffa7aa 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-single-entry/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-single-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'single entry names file correctly', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules-virtual-modules/_config.js b/test/chunking-form/samples/deprecated/preserve-modules-virtual-modules/_config.js index 3ba42c4097f..c9dc6418c08 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules-virtual-modules/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules-virtual-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/deprecated/preserve-modules/_config.js b/test/chunking-form/samples/deprecated/preserve-modules/_config.js index 1f47d7a745b..f4388489320 100644 --- a/test/chunking-form/samples/deprecated/preserve-modules/_config.js +++ b/test/chunking-form/samples/deprecated/preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Rewrite modules in-place', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/dynamic-import-chained/_config.js b/test/chunking-form/samples/dynamic-import-chained/_config.js index f83a999534a..e6c2c18e41b 100644 --- a/test/chunking-form/samples/dynamic-import-chained/_config.js +++ b/test/chunking-form/samples/dynamic-import-chained/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes chained dynamic imports', options: { input: 'main.js' diff --git a/test/chunking-form/samples/dynamic-import-chunking/_config.js b/test/chunking-form/samples/dynamic-import-chunking/_config.js index da2f51cdb29..d9d17675315 100644 --- a/test/chunking-form/samples/dynamic-import-chunking/_config.js +++ b/test/chunking-form/samples/dynamic-import-chunking/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Code splitting with dynamic import', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/dynamic-import-comments/_config.js b/test/chunking-form/samples/dynamic-import-comments/_config.js index 1e253f9c5de..57d3faa7e5e 100644 --- a/test/chunking-form/samples/dynamic-import-comments/_config.js +++ b/test/chunking-form/samples/dynamic-import-comments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not remove inline comments inside dynamic imports', options: { input: 'main.js', diff --git a/test/chunking-form/samples/dynamic-import-dynamic/_config.js b/test/chunking-form/samples/dynamic-import-dynamic/_config.js index a85db3a93c3..c1e7e16a5a8 100644 --- a/test/chunking-form/samples/dynamic-import-dynamic/_config.js +++ b/test/chunking-form/samples/dynamic-import-dynamic/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Code splitting with dynamic import', options: { input: ['main.js'] diff --git a/test/chunking-form/samples/dynamic-import-external/_config.js b/test/chunking-form/samples/dynamic-import-external/_config.js index 85ffd5397c0..e3b7b971d89 100644 --- a/test/chunking-form/samples/dynamic-import-external/_config.js +++ b/test/chunking-form/samples/dynamic-import-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks dynamic imports as external when resolveDynamicImport returns false', options: { input: 'main.js', diff --git a/test/chunking-form/samples/dynamic-import-facade/_config.js b/test/chunking-form/samples/dynamic-import-facade/_config.js index b2f441808b8..d95396fa622 100644 --- a/test/chunking-form/samples/dynamic-import-facade/_config.js +++ b/test/chunking-form/samples/dynamic-import-facade/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure dynamic chunks are not tainted', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/dynamic-import-from-manual-chunk/_config.js b/test/chunking-form/samples/dynamic-import-from-manual-chunk/_config.js index bc35ce0ef80..10571bfac78 100644 --- a/test/chunking-form/samples/dynamic-import-from-manual-chunk/_config.js +++ b/test/chunking-form/samples/dynamic-import-from-manual-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles dynamic imports in manual chunks', options: { input: 'main.js', diff --git a/test/chunking-form/samples/dynamic-import-inline-colouring/_config.js b/test/chunking-form/samples/dynamic-import-inline-colouring/_config.js index 9a8a41a2f4e..c4f59f85519 100644 --- a/test/chunking-form/samples/dynamic-import-inline-colouring/_config.js +++ b/test/chunking-form/samples/dynamic-import-inline-colouring/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Handle dynamic imports that are part of a static graph', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/dynamic-import-inlining-object/_config.js b/test/chunking-form/samples/dynamic-import-inlining-object/_config.js index 20adf37a0b6..6a6b04a9f5e 100644 --- a/test/chunking-form/samples/dynamic-import-inlining-object/_config.js +++ b/test/chunking-form/samples/dynamic-import-inlining-object/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports an object with a single entry when inlining dynamic imports', options: { output: { inlineDynamicImports: true }, diff --git a/test/chunking-form/samples/dynamic-import-only-default/_config.js b/test/chunking-form/samples/dynamic-import-only-default/_config.js index 8c579212cb0..e345872ade5 100644 --- a/test/chunking-form/samples/dynamic-import-only-default/_config.js +++ b/test/chunking-form/samples/dynamic-import-only-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly imports dynamic namespaces with only a default export from entry- and non-entry-point chunks', options: { diff --git a/test/chunking-form/samples/dynamic-import-only-reexports/_config.js b/test/chunking-form/samples/dynamic-import-only-reexports/_config.js index 44d62832d27..66aeea5f2f1 100644 --- a/test/chunking-form/samples/dynamic-import-only-reexports/_config.js +++ b/test/chunking-form/samples/dynamic-import-only-reexports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles dynamic imports when the imported module only reexports from other modules', options: { input: ['main'] diff --git a/test/chunking-form/samples/dynamic-import-statically-imported-2/_config.js b/test/chunking-form/samples/dynamic-import-statically-imported-2/_config.js index 7013d87b227..29c1025db4a 100644 --- a/test/chunking-form/samples/dynamic-import-statically-imported-2/_config.js +++ b/test/chunking-form/samples/dynamic-import-statically-imported-2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles dynamic imports of previously statically imported chunks that are also dynamically imported by other chunks', options: { diff --git a/test/chunking-form/samples/dynamic-import-statically-imported/_config.js b/test/chunking-form/samples/dynamic-import-statically-imported/_config.js index 4eb4282f086..0017ffbb9de 100644 --- a/test/chunking-form/samples/dynamic-import-statically-imported/_config.js +++ b/test/chunking-form/samples/dynamic-import-statically-imported/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles dynamic imports of previously statically imported chunks', options: { input: ['main.js'] diff --git a/test/chunking-form/samples/dynamic-import-synthetic-exports-preserve-modules/_config.js b/test/chunking-form/samples/dynamic-import-synthetic-exports-preserve-modules/_config.js index c7637cc876c..f8f4fbc41ad 100644 --- a/test/chunking-form/samples/dynamic-import-synthetic-exports-preserve-modules/_config.js +++ b/test/chunking-form/samples/dynamic-import-synthetic-exports-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handle dynamically importing a module with synthetic named exports when preserving modules', options: { diff --git a/test/chunking-form/samples/dynamic-import-tree-shaking-1/_config.js b/test/chunking-form/samples/dynamic-import-tree-shaking-1/_config.js index e1c7d066640..d57e7421e52 100644 --- a/test/chunking-form/samples/dynamic-import-tree-shaking-1/_config.js +++ b/test/chunking-form/samples/dynamic-import-tree-shaking-1/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses tree-shaking information to improve chunking', options: { input: { diff --git a/test/chunking-form/samples/dynamic-import-tree-shaking-2/_config.js b/test/chunking-form/samples/dynamic-import-tree-shaking-2/_config.js index 6d3cbf8d422..31e97827097 100644 --- a/test/chunking-form/samples/dynamic-import-tree-shaking-2/_config.js +++ b/test/chunking-form/samples/dynamic-import-tree-shaking-2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not expose exports of chunks which were used by tree-shaken dynamic imports', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/dynamic-import/_config.js b/test/chunking-form/samples/dynamic-import/_config.js index 4c79dd128b6..df578ea35a6 100644 --- a/test/chunking-form/samples/dynamic-import/_config.js +++ b/test/chunking-form/samples/dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles dynamic imports with a shared dependency', options: { input: ['main'], diff --git a/test/chunking-form/samples/dynamically-import-facaded-entry/_config.js b/test/chunking-form/samples/dynamically-import-facaded-entry/_config.js index 81086de40b5..08ba9ac6fc0 100644 --- a/test/chunking-form/samples/dynamically-import-facaded-entry/_config.js +++ b/test/chunking-form/samples/dynamically-import-facaded-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses existing entry facades for dynamic imports if present', options: { input: ['main.js', 'importer.js'], diff --git a/test/chunking-form/samples/dynamically-import-non-preserved-entry/_config.js b/test/chunking-form/samples/dynamically-import-non-preserved-entry/_config.js index 57805fe5e4a..e79f7985d56 100644 --- a/test/chunking-form/samples/dynamically-import-non-preserved-entry/_config.js +++ b/test/chunking-form/samples/dynamically-import-non-preserved-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports dynamically importing entries with additional exports', options: { input: ['main.js', 'importer.js'], diff --git a/test/chunking-form/samples/dynamically-import-tainted-entry/_config.js b/test/chunking-form/samples/dynamically-import-tainted-entry/_config.js index 1e71e42a862..5a68c82ae86 100644 --- a/test/chunking-form/samples/dynamically-import-tainted-entry/_config.js +++ b/test/chunking-form/samples/dynamically-import-tainted-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports dynamically importing entries with additional exports', options: { input: ['main.js', 'importer.js'], diff --git a/test/chunking-form/samples/dynamically-import-untainted-entry/_config.js b/test/chunking-form/samples/dynamically-import-untainted-entry/_config.js index 8e2220265c9..05358c08261 100644 --- a/test/chunking-form/samples/dynamically-import-untainted-entry/_config.js +++ b/test/chunking-form/samples/dynamically-import-untainted-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes existing entries a proper facade if possible when importing dynamically', options: { input: ['main.js', 'importer.js'], diff --git a/test/chunking-form/samples/emit-file/asset-file-names/_config.js b/test/chunking-form/samples/emit-file/asset-file-names/_config.js index 6c3610f6e44..dcdbc1af8cd 100644 --- a/test/chunking-form/samples/emit-file/asset-file-names/_config.js +++ b/test/chunking-form/samples/emit-file/asset-file-names/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports custom asset file names', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/emit-file/deconflict-against-named-files/_config.js b/test/chunking-form/samples/emit-file/deconflict-against-named-files/_config.js index d6ed639bbbc..dca0a97b56e 100644 --- a/test/chunking-form/samples/emit-file/deconflict-against-named-files/_config.js +++ b/test/chunking-form/samples/emit-file/deconflict-against-named-files/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts files against named files', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/deduplicate-assets/_config.js b/test/chunking-form/samples/emit-file/deduplicate-assets/_config.js index eecaa69bf6c..7c018f63174 100644 --- a/test/chunking-form/samples/emit-file/deduplicate-assets/_config.js +++ b/test/chunking-form/samples/emit-file/deduplicate-assets/_config.js @@ -9,7 +9,7 @@ let string1Id, sameBufferAsStringId, otherBufferId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deduplicates asset that have the same source', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/emit-file/emit-asset-without-name/_config.js b/test/chunking-form/samples/emit-file/emit-asset-without-name/_config.js index b2c36658660..73ac501f733 100644 --- a/test/chunking-form/samples/emit-file/emit-asset-without-name/_config.js +++ b/test/chunking-form/samples/emit-file/emit-asset-without-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports emitting an asset without a name', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/emit-file/emit-chunk-facade/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-facade/_config.js index 6013d4f227b..a6fe75a2f3e 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-facade/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-facade/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retrieves the correct name of an emitted chunk in case a facade is created', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/emit-chunk-filename/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-filename/_config.js index 024c2158cad..087ea48ce47 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-filename/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-filename/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports specifying a file name when emitting a chunk', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/emit-chunk-name-conflict/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-name-conflict/_config.js index 0f73b49eacd..987b2617332 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-name-conflict/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deduplicates named chunks emitted more than once', options: { // For the second entry, a facade is created diff --git a/test/chunking-form/samples/emit-file/emit-chunk-named/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-named/_config.js index 5fe02e8a7f1..d4f66160c67 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-named/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-named/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows naming emitted chunks', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/emit-chunk-order1/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-order1/_config.js index 2afc7efe4fb..9bb20f1b293 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-order1/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-order1/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates a consistent chunking order (needs to be consistent with the other test of this kind)', options: { diff --git a/test/chunking-form/samples/emit-file/emit-chunk-order2/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-order2/_config.js index affdf1cdd31..0ee9a7a012f 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-order2/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-order2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates a consistent chunking order (needs to be consistent with the other test of this kind)', options: { diff --git a/test/chunking-form/samples/emit-file/emit-chunk-with-importer/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-with-importer/_config.js index 0c9b9cafd18..a13bfdc3714 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-with-importer/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-with-importer/_config.js @@ -3,7 +3,7 @@ let noImporterReferenceId; let mainReferenceId; let nestedReferenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows specifying an importer when resolving ids', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/emit-chunk-worker/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-worker/_config.js index 34cc3ba90bc..eb3489b8333 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-worker/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-worker/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); let workerId; let proxyId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows adding additional chunks to be used in workers', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/emit-chunk-worklet/_config.js b/test/chunking-form/samples/emit-file/emit-chunk-worklet/_config.js index 6ad63b39342..fce3461112d 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk-worklet/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk-worklet/_config.js @@ -1,6 +1,6 @@ const REGISTER_WORKLET = 'register-paint-worklet:'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows adding additional chunks to be used in worklets', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/emit-chunk/_config.js b/test/chunking-form/samples/emit-file/emit-chunk/_config.js index 3bdef9c0422..14dbf9d2615 100644 --- a/test/chunking-form/samples/emit-file/emit-chunk/_config.js +++ b/test/chunking-form/samples/emit-file/emit-chunk/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows adding additional chunks and retrieving their file name', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/emits-existing-chunk/_config.js b/test/chunking-form/samples/emit-file/emits-existing-chunk/_config.js index d3b02ef04d7..a7e3a49dc43 100644 --- a/test/chunking-form/samples/emit-file/emits-existing-chunk/_config.js +++ b/test/chunking-form/samples/emit-file/emits-existing-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows adding modules already in the graph as entry points', options: { input: { diff --git a/test/chunking-form/samples/emit-file/emits-files-from-various-hooks/_config.js b/test/chunking-form/samples/emit-file/emits-files-from-various-hooks/_config.js index 675192ef65d..abd31580334 100644 --- a/test/chunking-form/samples/emit-file/emits-files-from-various-hooks/_config.js +++ b/test/chunking-form/samples/emit-file/emits-files-from-various-hooks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports emitting assets from plugin hooks', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/emit-file/filenames-function-patterns-preserve-modules/_config.js b/test/chunking-form/samples/emit-file/filenames-function-patterns-preserve-modules/_config.js index c2bb3492d9b..83a8fda58fe 100644 --- a/test/chunking-form/samples/emit-file/filenames-function-patterns-preserve-modules/_config.js +++ b/test/chunking-form/samples/emit-file/filenames-function-patterns-preserve-modules/_config.js @@ -4,7 +4,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEB = path.join(__dirname, 'deb.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports using a function that returns a pattern for entryFileNames, with output.preserveModules option', options: { diff --git a/test/chunking-form/samples/emit-file/filenames-function-patterns/_config.js b/test/chunking-form/samples/emit-file/filenames-function-patterns/_config.js index 67f0fcc3831..cacee4fa8bd 100644 --- a/test/chunking-form/samples/emit-file/filenames-function-patterns/_config.js +++ b/test/chunking-form/samples/emit-file/filenames-function-patterns/_config.js @@ -4,7 +4,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEB = path.join(__dirname, 'deb.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports using a function that returns a pattern for FileNames', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/emit-file/named-user-chunks/_config.js b/test/chunking-form/samples/emit-file/named-user-chunks/_config.js index ff4d85b4bf8..b59bc1f5d1f 100644 --- a/test/chunking-form/samples/emit-file/named-user-chunks/_config.js +++ b/test/chunking-form/samples/emit-file/named-user-chunks/_config.js @@ -4,7 +4,7 @@ let referenceIdName; let referenceIdFileName1; let referenceIdFileName2; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deduplicates with named chunks defined by the user', options: { input: { mainChunk: 'main', mainChunkFacade: 'main' }, diff --git a/test/chunking-form/samples/emit-file/reference-files/_config.js b/test/chunking-form/samples/emit-file/reference-files/_config.js index 392ae410fd1..7736eceee20 100644 --- a/test/chunking-form/samples/emit-file/reference-files/_config.js +++ b/test/chunking-form/samples/emit-file/reference-files/_config.js @@ -1,7 +1,7 @@ const { readFileSync } = require('node:fs'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows referencing emitted files', options: { strictDeprecations: false, diff --git a/test/chunking-form/samples/emit-file/sanitize-file-name/_config.js b/test/chunking-form/samples/emit-file/sanitize-file-name/_config.js index e3a4c09d6ad..0ff640af2f8 100644 --- a/test/chunking-form/samples/emit-file/sanitize-file-name/_config.js +++ b/test/chunking-form/samples/emit-file/sanitize-file-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows adding additional chunks and retrieving their file name', options: { input: 'main', diff --git a/test/chunking-form/samples/emit-file/set-asset-source/_config.js b/test/chunking-form/samples/emit-file/set-asset-source/_config.js index ae68e73e377..aef65a793fe 100644 --- a/test/chunking-form/samples/emit-file/set-asset-source/_config.js +++ b/test/chunking-form/samples/emit-file/set-asset-source/_config.js @@ -13,7 +13,7 @@ let renderChunkNamed; let generateBundle; let generateBundleNamed; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports setting the asset source during generate', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/empty-chunks/_config.js b/test/chunking-form/samples/empty-chunks/_config.js index f20396423bf..67b27d78bf0 100644 --- a/test/chunking-form/samples/empty-chunks/_config.js +++ b/test/chunking-form/samples/empty-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'empty chunk pruning', expectedWarnings: ['EMPTY_BUNDLE'], options: { diff --git a/test/chunking-form/samples/empty-module-no-treeshake/_config.js b/test/chunking-form/samples/empty-module-no-treeshake/_config.js index 360b520354b..625e8c94445 100644 --- a/test/chunking-form/samples/empty-module-no-treeshake/_config.js +++ b/test/chunking-form/samples/empty-module-no-treeshake/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const { getObject } = require('../../../utils'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'associates empty modules with chunks if tree-shaking is disabled for them', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/entry-aliases/_config.js b/test/chunking-form/samples/entry-aliases/_config.js index b78a06ea2f8..b80512b545f 100644 --- a/test/chunking-form/samples/entry-aliases/_config.js +++ b/test/chunking-form/samples/entry-aliases/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'alias module dependency inlining', options: { input: { diff --git a/test/chunking-form/samples/entry-chunk-export-mode/_config.js b/test/chunking-form/samples/entry-chunk-export-mode/_config.js index 38a44d4d76a..540e65182cb 100644 --- a/test/chunking-form/samples/entry-chunk-export-mode/_config.js +++ b/test/chunking-form/samples/entry-chunk-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'entry chunk export mode checks', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/entry-point-without-own-code/_config.js b/test/chunking-form/samples/entry-point-without-own-code/_config.js index 2ebbc34f6b0..16454926433 100644 --- a/test/chunking-form/samples/entry-point-without-own-code/_config.js +++ b/test/chunking-form/samples/entry-point-without-own-code/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Handles entry points that contain no own code except imports and exports', options: { input: ['main.js', 'm1.js', 'm2.js'] diff --git a/test/chunking-form/samples/entrypoint-aliasing/_config.js b/test/chunking-form/samples/entrypoint-aliasing/_config.js index 6428bfddcb0..b75226f6044 100644 --- a/test/chunking-form/samples/entrypoint-aliasing/_config.js +++ b/test/chunking-form/samples/entrypoint-aliasing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'entry point facade creation', options: { input: { diff --git a/test/chunking-form/samples/entrypoint-facade/_config.js b/test/chunking-form/samples/entrypoint-facade/_config.js index c8c32a70682..0301e6e748a 100644 --- a/test/chunking-form/samples/entrypoint-facade/_config.js +++ b/test/chunking-form/samples/entrypoint-facade/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'entry point facade creation', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/export-default-from-entry/_config.js b/test/chunking-form/samples/export-default-from-entry/_config.js index cb1d54d7f68..1e07de5c314 100644 --- a/test/chunking-form/samples/export-default-from-entry/_config.js +++ b/test/chunking-form/samples/export-default-from-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly imports the default from an entry point', options: { input: ['main', 'dep'] diff --git a/test/chunking-form/samples/external-imports/_config.js b/test/chunking-form/samples/external-imports/_config.js index 37b93bb0b9e..1271444b037 100644 --- a/test/chunking-form/samples/external-imports/_config.js +++ b/test/chunking-form/samples/external-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct interop per chunk when importing from external modules', options: { external: module => module.includes('external'), diff --git a/test/chunking-form/samples/external-reexports/_config.js b/test/chunking-form/samples/external-reexports/_config.js index 017437e5507..f142ecda3f3 100644 --- a/test/chunking-form/samples/external-reexports/_config.js +++ b/test/chunking-form/samples/external-reexports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct interop per chunk when reexporting from external modules', options: { external: module => module.includes('external'), diff --git a/test/chunking-form/samples/filenames-patterns/_config.js b/test/chunking-form/samples/filenames-patterns/_config.js index 91e4a8c690c..fee15a8638c 100644 --- a/test/chunking-form/samples/filenames-patterns/_config.js +++ b/test/chunking-form/samples/filenames-patterns/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'filenames custom pattern', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/generated-code/arrow-functions-false/_config.js b/test/chunking-form/samples/generated-code/arrow-functions-false/_config.js index 990108a4dee..a9b14376de9 100644 --- a/test/chunking-form/samples/generated-code/arrow-functions-false/_config.js +++ b/test/chunking-form/samples/generated-code/arrow-functions-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use arrow functions', options: { input: ['main', 'main2'], diff --git a/test/chunking-form/samples/generated-code/arrow-functions-true/_config.js b/test/chunking-form/samples/generated-code/arrow-functions-true/_config.js index 4b54c44994f..c02ebd7077b 100644 --- a/test/chunking-form/samples/generated-code/arrow-functions-true/_config.js +++ b/test/chunking-form/samples/generated-code/arrow-functions-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses arrow functions', options: { input: ['main', 'main2'], diff --git a/test/chunking-form/samples/generated-code/reserved-names-as-props-false/_config.js b/test/chunking-form/samples/generated-code/reserved-names-as-props-false/_config.js index 0341cc96ff4..47b2ec162d3 100644 --- a/test/chunking-form/samples/generated-code/reserved-names-as-props-false/_config.js +++ b/test/chunking-form/samples/generated-code/reserved-names-as-props-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props', options: { input: ['main', 'main2'], diff --git a/test/chunking-form/samples/generated-code/reserved-names-as-props-true/_config.js b/test/chunking-form/samples/generated-code/reserved-names-as-props-true/_config.js index 6694a3473b6..b82804a1274 100644 --- a/test/chunking-form/samples/generated-code/reserved-names-as-props-true/_config.js +++ b/test/chunking-form/samples/generated-code/reserved-names-as-props-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props', options: { input: ['main', 'main2'], diff --git a/test/chunking-form/samples/hashing/deconflict-hashes/_config.js b/test/chunking-form/samples/hashing/deconflict-hashes/_config.js index 1f9aea9bd69..3cd6ea4cd3a 100644 --- a/test/chunking-form/samples/hashing/deconflict-hashes/_config.js +++ b/test/chunking-form/samples/hashing/deconflict-hashes/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deduplicates hashes for identical files', options: { input: ['main1', 'main2'], diff --git a/test/chunking-form/samples/hashing/double-hash/_config.js b/test/chunking-form/samples/hashing/double-hash/_config.js index a3087c20a67..a024fbf94eb 100644 --- a/test/chunking-form/samples/hashing/double-hash/_config.js +++ b/test/chunking-form/samples/hashing/double-hash/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports double hashes in patterns', options: { output: { entryFileNames: '[hash]/entry-[hash].js' } diff --git a/test/chunking-form/samples/hashing/hash-size/_config.js b/test/chunking-form/samples/hashing/hash-size/_config.js index 2d50c700ece..ea26f3ad5a2 100644 --- a/test/chunking-form/samples/hashing/hash-size/_config.js +++ b/test/chunking-form/samples/hashing/hash-size/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows configurable hash size', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/hashing/random-match/_config.js b/test/chunking-form/samples/hashing/random-match/_config.js index 238ca1b4ad7..e17d7df99e0 100644 --- a/test/chunking-form/samples/hashing/random-match/_config.js +++ b/test/chunking-form/samples/hashing/random-match/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'leaves random hash matches untransformed', options: { output: { diff --git a/test/chunking-form/samples/hashing/tree-shaken-dynamic-hash/_config.js b/test/chunking-form/samples/hashing/tree-shaken-dynamic-hash/_config.js index cc8cae04e20..6a90c90a03a 100644 --- a/test/chunking-form/samples/hashing/tree-shaken-dynamic-hash/_config.js +++ b/test/chunking-form/samples/hashing/tree-shaken-dynamic-hash/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Does not fail when calculating the hash of a file containing a tree-shaken dynamic import', options: { diff --git a/test/chunking-form/samples/ignore-chunk-name-query/_config.js b/test/chunking-form/samples/ignore-chunk-name-query/_config.js index 9b81d837e9d..b214ca2f6b8 100644 --- a/test/chunking-form/samples/ignore-chunk-name-query/_config.js +++ b/test/chunking-form/samples/ignore-chunk-name-query/_config.js @@ -1,6 +1,6 @@ const { loader } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ignores queries and hashes for chunk names when preserving modules', options: { input: ['a.js?query', 'b.js#hash'], diff --git a/test/chunking-form/samples/implicit-dependencies/dependant-entry-no-effects/_config.js b/test/chunking-form/samples/implicit-dependencies/dependant-entry-no-effects/_config.js index dd476362371..556a8139cf9 100644 --- a/test/chunking-form/samples/implicit-dependencies/dependant-entry-no-effects/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/dependant-entry-no-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly emits a chunk when it is implicitly loaded after an empty entry module', expectedWarnings: ['EMPTY_BUNDLE'], options: { diff --git a/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-emitted-entry/_config.js b/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-emitted-entry/_config.js index 6c015bf2a0e..23c912f9947 100644 --- a/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-emitted-entry/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-emitted-entry/_config.js @@ -5,7 +5,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB = path.join(__dirname, 'lib.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure emitted entry points are never implicit dependencies', options: { preserveEntrySignatures: 'allow-extension', diff --git a/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-entry/_config.js b/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-entry/_config.js index bd66d8ff197..012b74b0d7f 100644 --- a/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-entry/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/implicitly-dependent-entry/_config.js @@ -5,7 +5,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB = path.join(__dirname, 'lib.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure actual entry points are never implicit dependencies', options: { input: ['main', 'dep'], diff --git a/test/chunking-form/samples/implicit-dependencies/multiple-dependencies/_config.js b/test/chunking-form/samples/implicit-dependencies/multiple-dependencies/_config.js index 04f1419a7b1..0596b22acbc 100644 --- a/test/chunking-form/samples/implicit-dependencies/multiple-dependencies/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/multiple-dependencies/_config.js @@ -9,7 +9,7 @@ const ID_LIB2 = path.join(__dirname, 'lib2.js'); const ID_LIB3 = path.join(__dirname, 'lib3.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports emitting the same chunk with different and multiple dependencies', options: { input: ['main1', 'main2'], diff --git a/test/chunking-form/samples/implicit-dependencies/preserve-signature-allow-extension/_config.js b/test/chunking-form/samples/implicit-dependencies/preserve-signature-allow-extension/_config.js index 50bdf256a2e..ff9e2797ae9 100644 --- a/test/chunking-form/samples/implicit-dependencies/preserve-signature-allow-extension/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/preserve-signature-allow-extension/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports implicit dependencies when emitting files', options: { plugins: { diff --git a/test/chunking-form/samples/implicit-dependencies/preserve-signature-false/_config.js b/test/chunking-form/samples/implicit-dependencies/preserve-signature-false/_config.js index 3d39e2d2e08..8e53b933b32 100644 --- a/test/chunking-form/samples/implicit-dependencies/preserve-signature-false/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/preserve-signature-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports implicit dependencies when emitting files', options: { plugins: { diff --git a/test/chunking-form/samples/implicit-dependencies/preserve-signature-strict/_config.js b/test/chunking-form/samples/implicit-dependencies/preserve-signature-strict/_config.js index 3ae7ce231ba..043608e0981 100644 --- a/test/chunking-form/samples/implicit-dependencies/preserve-signature-strict/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/preserve-signature-strict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports implicit dependencies when emitting files', options: { plugins: { diff --git a/test/chunking-form/samples/implicit-dependencies/same-chunk-dependency/_config.js b/test/chunking-form/samples/implicit-dependencies/same-chunk-dependency/_config.js index 22dcc3d6613..16f322ebcc5 100644 --- a/test/chunking-form/samples/implicit-dependencies/same-chunk-dependency/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/same-chunk-dependency/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles implicit dependencies where the dependant is inlined into the same chunk', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_config.js b/test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_config.js index 4f5b140ad64..fc4638d4966 100644 --- a/test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/shared-dependency-no-side-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles shared dependencies between implicit chunks without side-effects', options: { plugins: { diff --git a/test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_config.js b/test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_config.js index 77730617482..5d10f4c5a8c 100644 --- a/test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/shared-dependency-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles shared dependencies when there are only reexports', options: { plugins: { diff --git a/test/chunking-form/samples/implicit-dependencies/single-dependency/_config.js b/test/chunking-form/samples/implicit-dependencies/single-dependency/_config.js index ecd41391c86..ef874d950c3 100644 --- a/test/chunking-form/samples/implicit-dependencies/single-dependency/_config.js +++ b/test/chunking-form/samples/implicit-dependencies/single-dependency/_config.js @@ -5,7 +5,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB = path.join(__dirname, 'lib.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports implicit dependencies when emitting files', options: { preserveEntrySignatures: 'allow-extension', diff --git a/test/chunking-form/samples/import-meta-numeric-paths/_config.js b/test/chunking-form/samples/import-meta-numeric-paths/_config.js index 94be4998284..9d622265857 100644 --- a/test/chunking-form/samples/import-meta-numeric-paths/_config.js +++ b/test/chunking-form/samples/import-meta-numeric-paths/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports nested numeric paths without issues on Windows', options: { output: { preserveModules: true }, diff --git a/test/chunking-form/samples/import-meta-url/_config.js b/test/chunking-form/samples/import-meta-url/_config.js index 29817568436..827ffc9580f 100644 --- a/test/chunking-form/samples/import-meta-url/_config.js +++ b/test/chunking-form/samples/import-meta-url/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports import.meta.url', options: { preserveEntrySignatures: false, diff --git a/test/chunking-form/samples/import-variable-duplicates/_config.js b/test/chunking-form/samples/import-variable-duplicates/_config.js index ab225361c7e..2d85bf61f09 100644 --- a/test/chunking-form/samples/import-variable-duplicates/_config.js +++ b/test/chunking-form/samples/import-variable-duplicates/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk duplicate import deshadowing', options: { input: ['main1.js', 'main2.js', 'first.js', 'head.js'] diff --git a/test/chunking-form/samples/improved-dynamic-chunks/chained-dynamic-with-shared/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/chained-dynamic-with-shared/_config.js index 9a1d81d455e..0a19b3b0fd4 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/chained-dynamic-with-shared/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/chained-dynamic-with-shared/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chained dynamic import that imports something already loaded' }); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/circular-dynamic-imports/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/circular-dynamic-imports/_config.js index f8e6270a387..c0b010a8a2c 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/circular-dynamic-imports/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/circular-dynamic-imports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles circular dynamic imports' }); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/cut-off/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/cut-off/_config.js index c11600bdb49..5893fd7a651 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/cut-off/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/cut-off/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not avoid separate chunks if too many modules dynamically import the same chunk', options: { diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-1/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-1/_config.js index 064cdc89a2c..32d32893c38 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-1/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-1/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'inlines dynamic imports that are already statically imported' }); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-2/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-2/_config.js index eafacef6f02..af17537fdee 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-2/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-already-contained-2/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'inlines dynamic imports that are already statically imported by their importers' }); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic-multi-stage/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic-multi-stage/_config.js index 581eed25c20..7e113af09c4 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic-multi-stage/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic-multi-stage/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles if a dynamically imported module imports another module dynamically' }); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic/_config.js index 581eed25c20..7e113af09c4 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-import-dynamic/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles if a dynamically imported module imports another module dynamically' }); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-not-in-memory/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-not-in-memory/_config.js index a01e32fe431..92b07dee16d 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/dynamic-not-in-memory/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/dynamic-not-in-memory/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps chunks separate when not in memory for all dynamic imports', options: { input: ['main1', 'main2', 'main3'] diff --git a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-and-shared-dependencies/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-and-shared-dependencies/_config.js index a9104fadba1..8493c52ad2f 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-and-shared-dependencies/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-and-shared-dependencies/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids chunks for always loaded dependencies if multiple entry points with different dependencies have dynamic imports', options: { diff --git a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-dependencies/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-dependencies/_config.js index a9104fadba1..8493c52ad2f 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-dependencies/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-different-dependencies/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids chunks for always loaded dependencies if multiple entry points with different dependencies have dynamic imports', options: { diff --git a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-partly-already-loaded-dynamic/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-partly-already-loaded-dynamic/_config.js index a9104fadba1..8493c52ad2f 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-partly-already-loaded-dynamic/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-partly-already-loaded-dynamic/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids chunks for always loaded dependencies if multiple entry points with different dependencies have dynamic imports', options: { diff --git a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-shared-static-with-dynamic-import/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-shared-static-with-dynamic-import/_config.js index a9104fadba1..8493c52ad2f 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-shared-static-with-dynamic-import/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/multi-entry-shared-static-with-dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids chunks for always loaded dependencies if multiple entry points with different dependencies have dynamic imports', options: { diff --git a/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic-multiple-imports/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic-multiple-imports/_config.js index b05f059ffb5..9f42c784a4b 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic-multiple-imports/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic-multiple-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not create a separate chunk if a dynamically imported chunk shares a dependency with its importer, and dynamic chunk imported from multiple places' }); diff --git a/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic/_config.js b/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic/_config.js index 2d58b44d7b9..ceca06a61a8 100644 --- a/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic/_config.js +++ b/test/chunking-form/samples/improved-dynamic-chunks/single-dynamic/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not create a separate chunk if a dynamically imported chunk shares a dependency with its importer' }); diff --git a/test/chunking-form/samples/indirect-reexports-preserve-modules/_config.js b/test/chunking-form/samples/indirect-reexports-preserve-modules/_config.js index 09e66122fcb..63434c3b164 100644 --- a/test/chunking-form/samples/indirect-reexports-preserve-modules/_config.js +++ b/test/chunking-form/samples/indirect-reexports-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not drop indirect reexports when preserving modules', expectedWarnings: ['MIXED_EXPORTS'], options: { diff --git a/test/chunking-form/samples/interop-per-reexported-default-dependency/_config.js b/test/chunking-form/samples/interop-per-reexported-default-dependency/_config.js index 6250b4cfb30..a780bdd05c2 100644 --- a/test/chunking-form/samples/interop-per-reexported-default-dependency/_config.js +++ b/test/chunking-form/samples/interop-per-reexported-default-dependency/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to configure the interop type per reexported default from an external dependency', options: { diff --git a/test/chunking-form/samples/manual-chunk-avoid-facade/_config.js b/test/chunking-form/samples/manual-chunk-avoid-facade/_config.js index 8061ea87fbc..7a1847a0e8a 100644 --- a/test/chunking-form/samples/manual-chunk-avoid-facade/_config.js +++ b/test/chunking-form/samples/manual-chunk-avoid-facade/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoid facades if possible when using manual chunks', options: { input: ['main1', 'main2'], diff --git a/test/chunking-form/samples/manual-chunk-contains-entry-conflict/_config.js b/test/chunking-form/samples/manual-chunk-contains-entry-conflict/_config.js index 2a08b8d23dd..2c522de8b4a 100644 --- a/test/chunking-form/samples/manual-chunk-contains-entry-conflict/_config.js +++ b/test/chunking-form/samples/manual-chunk-contains-entry-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ expectedWarnings: ['EMPTY_BUNDLE'], description: 'Uses entry alias if manual chunks contain entry chunks with different alias', options: { diff --git a/test/chunking-form/samples/manual-chunk-contains-entry-match/_config.js b/test/chunking-form/samples/manual-chunk-contains-entry-match/_config.js index 220e5c9e69e..c4ddc6655d4 100644 --- a/test/chunking-form/samples/manual-chunk-contains-entry-match/_config.js +++ b/test/chunking-form/samples/manual-chunk-contains-entry-match/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Identifies the entry chunk with the manual chunk that contains it if the aliases match', options: { diff --git a/test/chunking-form/samples/manual-chunk-is-entry-conflict/_config.js b/test/chunking-form/samples/manual-chunk-is-entry-conflict/_config.js index 1223c61a817..375bfd9fdde 100644 --- a/test/chunking-form/samples/manual-chunk-is-entry-conflict/_config.js +++ b/test/chunking-form/samples/manual-chunk-is-entry-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Uses entry alias if manual chunks are entry chunks with different alias', options: { input: { diff --git a/test/chunking-form/samples/manual-chunk-is-entry-match/_config.js b/test/chunking-form/samples/manual-chunk-is-entry-match/_config.js index ceecbc6d971..6851f393376 100644 --- a/test/chunking-form/samples/manual-chunk-is-entry-match/_config.js +++ b/test/chunking-form/samples/manual-chunk-is-entry-match/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Identifies the entry chunk with the manual chunk that has the same entry if the aliases match', options: { diff --git a/test/chunking-form/samples/manual-chunk-not-included/_config.js b/test/chunking-form/samples/manual-chunk-not-included/_config.js index af9cf6eee56..38b02eb3641 100644 --- a/test/chunking-form/samples/manual-chunk-not-included/_config.js +++ b/test/chunking-form/samples/manual-chunk-not-included/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles manual chunks where the root is not part of the module graph', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/manual-chunks-different-nested/_config.js b/test/chunking-form/samples/manual-chunks-different-nested/_config.js index fb0df84c2ac..4a9ba21f564 100644 --- a/test/chunking-form/samples/manual-chunks-different-nested/_config.js +++ b/test/chunking-form/samples/manual-chunks-different-nested/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'manual chunks can have other manual chunks as dependencies', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/manual-chunks-dynamic-facades/_config.js b/test/chunking-form/samples/manual-chunks-dynamic-facades/_config.js index fd7fcc89b20..91bf1733452 100644 --- a/test/chunking-form/samples/manual-chunks-dynamic-facades/_config.js +++ b/test/chunking-form/samples/manual-chunks-dynamic-facades/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates facades for dynamic manual chunks if necessary', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/manual-chunks-dynamic-name-conflict/_config.js b/test/chunking-form/samples/manual-chunks-dynamic-name-conflict/_config.js index 056f8e0d8bf..e970a1f3446 100644 --- a/test/chunking-form/samples/manual-chunks-dynamic-name-conflict/_config.js +++ b/test/chunking-form/samples/manual-chunks-dynamic-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles name conflicts in manual chunks', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/manual-chunks-dynamic/_config.js b/test/chunking-form/samples/manual-chunks-dynamic/_config.js index f3798005b93..97dba71179e 100644 --- a/test/chunking-form/samples/manual-chunks-dynamic/_config.js +++ b/test/chunking-form/samples/manual-chunks-dynamic/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports dynamic manual chunks', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/manual-chunks-function/_config.js b/test/chunking-form/samples/manual-chunks-function/_config.js index 411f79754ce..cb91ed2b095 100644 --- a/test/chunking-form/samples/manual-chunks-function/_config.js +++ b/test/chunking-form/samples/manual-chunks-function/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to define manual chunks via a function', options: { input: ['main-a'], diff --git a/test/chunking-form/samples/manual-chunks-nested/_config.js b/test/chunking-form/samples/manual-chunks-nested/_config.js index 74c42e894f4..f39bf727dfb 100644 --- a/test/chunking-form/samples/manual-chunks-nested/_config.js +++ b/test/chunking-form/samples/manual-chunks-nested/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'manual chunks can contain nested modules', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/manual-chunks/_config.js b/test/chunking-form/samples/manual-chunks/_config.js index 58123231188..2b424e1b73e 100644 --- a/test/chunking-form/samples/manual-chunks/_config.js +++ b/test/chunking-form/samples/manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'manual chunks support', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/max-parallel-file-operations/_config.js b/test/chunking-form/samples/max-parallel-file-operations/_config.js index 7ee93992ed0..9346d8eae40 100644 --- a/test/chunking-form/samples/max-parallel-file-operations/_config.js +++ b/test/chunking-form/samples/max-parallel-file-operations/_config.js @@ -6,7 +6,7 @@ const fsWriteFile = fs.writeFile; let currentWrites = 0; let maxWrites = 0; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileOps limits write operations', options: { maxParallelFileOps: 3, diff --git a/test/chunking-form/samples/min-chunk-size/avoid-circular-dependencies/_config.js b/test/chunking-form/samples/min-chunk-size/avoid-circular-dependencies/_config.js index 7dcf86a9a82..801623fc162 100644 --- a/test/chunking-form/samples/min-chunk-size/avoid-circular-dependencies/_config.js +++ b/test/chunking-form/samples/min-chunk-size/avoid-circular-dependencies/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids circular dependencies when merging chunks', options: { input: ['main1.js', 'main2.js', 'main3.js'], diff --git a/test/chunking-form/samples/min-chunk-size/avoid-transitive-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/avoid-transitive-side-effects/_config.js index 98ff8be45c7..51c86dd250e 100644 --- a/test/chunking-form/samples/min-chunk-size/avoid-transitive-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/avoid-transitive-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not merge chunks if a dependency would introduce a new side effect', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'], diff --git a/test/chunking-form/samples/min-chunk-size/best-merge-target/_config.js b/test/chunking-form/samples/min-chunk-size/best-merge-target/_config.js index 18fbd931610..d18589d13f0 100644 --- a/test/chunking-form/samples/min-chunk-size/best-merge-target/_config.js +++ b/test/chunking-form/samples/min-chunk-size/best-merge-target/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses the merge target that is closest', options: { input: [ diff --git a/test/chunking-form/samples/min-chunk-size/ignore-correlated-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/ignore-correlated-side-effects/_config.js index 4a9812d1207..760704c72af 100644 --- a/test/chunking-form/samples/min-chunk-size/ignore-correlated-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/ignore-correlated-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ignores correlated side effects if they cannot be merged', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js', 'main5.js'], diff --git a/test/chunking-form/samples/min-chunk-size/merge-chunk-into-distant-shared/_config.js b/test/chunking-form/samples/min-chunk-size/merge-chunk-into-distant-shared/_config.js index 89730230eb2..f9f8b583282 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-chunk-into-distant-shared/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-chunk-into-distant-shared/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges small chunks into shared chunks that are loaded by a non-close super-set of entry points', options: { diff --git a/test/chunking-form/samples/min-chunk-size/merge-chunk-into-shared/_config.js b/test/chunking-form/samples/min-chunk-size/merge-chunk-into-shared/_config.js index a33c5fe5204..605f5faf55b 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-chunk-into-shared/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-chunk-into-shared/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges small chunks into shared chunks that are loaded by a super-set of entry points', options: { diff --git a/test/chunking-form/samples/min-chunk-size/merge-correlated-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/merge-correlated-side-effects/_config.js index d36414511ba..a53c27cb97f 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-correlated-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-correlated-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges correlated side effects with pure chunks', options: { input: ['main1.js', 'main2.js', 'main3.js'], diff --git a/test/chunking-form/samples/min-chunk-size/merge-dependency-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/merge-dependency-side-effects/_config.js index 76b5a8d4efb..bd8600b4a71 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-dependency-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-dependency-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges chunks if their dependency side effects are the same', options: { input: ['main1.js', 'main2.js', 'main3.js'], diff --git a/test/chunking-form/samples/min-chunk-size/merge-despite-correlated-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/merge-despite-correlated-side-effects/_config.js index a86892d8e4a..858c318d993 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-despite-correlated-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-despite-correlated-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: "merges chunks if their dependency side effects are a subset of the other's correlated side effects", options: { diff --git a/test/chunking-form/samples/min-chunk-size/merge-dynamic-imports/_config.js b/test/chunking-form/samples/min-chunk-size/merge-dynamic-imports/_config.js index 0d5ad102f11..ea2256365f4 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-dynamic-imports/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges small chunks with side effects into suitable pure chunks', options: { output: { diff --git a/test/chunking-form/samples/min-chunk-size/merge-small-side-effect-chunks/_config.js b/test/chunking-form/samples/min-chunk-size/merge-small-side-effect-chunks/_config.js index e20c72c2043..7e23f3230e0 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-small-side-effect-chunks/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-small-side-effect-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges small chunks with side effects into suitable pure chunks', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/min-chunk-size/merge-unrelated/_config.js b/test/chunking-form/samples/min-chunk-size/merge-unrelated/_config.js index 4f1eccaf18f..5fabd4dea86 100644 --- a/test/chunking-form/samples/min-chunk-size/merge-unrelated/_config.js +++ b/test/chunking-form/samples/min-chunk-size/merge-unrelated/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges unrelated small chunks if there is no better alternative', options: { input: ['main1.js', 'main2.js', 'main3.js'], diff --git a/test/chunking-form/samples/min-chunk-size/no-merge-for-big-chunks/_config.js b/test/chunking-form/samples/min-chunk-size/no-merge-for-big-chunks/_config.js index 3ec549701a1..0a5af5cbeb6 100644 --- a/test/chunking-form/samples/min-chunk-size/no-merge-for-big-chunks/_config.js +++ b/test/chunking-form/samples/min-chunk-size/no-merge-for-big-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not merge chunks if all chunks are below the size limit', options: { input: ['main1.js', 'main2.js', 'main3.js'], diff --git a/test/chunking-form/samples/min-chunk-size/no-merge-side-effects/_config.js b/test/chunking-form/samples/min-chunk-size/no-merge-side-effects/_config.js index b9e1a59437f..f45f896c20c 100644 --- a/test/chunking-form/samples/min-chunk-size/no-merge-side-effects/_config.js +++ b/test/chunking-form/samples/min-chunk-size/no-merge-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not merge small chunks that have side effects', options: { input: ['main1.js', 'main2.js', 'main3.js'], diff --git a/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-a/_config.js b/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-a/_config.js index de182bdb25e..18809bd51c7 100644 --- a/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-a/_config.js +++ b/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-a/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'when there are two valid merge targets, the one that is loaded under more similar conditions is preferred', options: { diff --git a/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-b/_config.js b/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-b/_config.js index de182bdb25e..18809bd51c7 100644 --- a/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-b/_config.js +++ b/test/chunking-form/samples/min-chunk-size/prefer-close-merge-target-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'when there are two valid merge targets, the one that is loaded under more similar conditions is preferred', options: { diff --git a/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-a/_config.js b/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-a/_config.js index 17cccb80f4c..77cd812c0c9 100644 --- a/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-a/_config.js +++ b/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-a/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'when there are two equally valid merge targets, the smaller is preferred', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'], diff --git a/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-b/_config.js b/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-b/_config.js index 17cccb80f4c..77cd812c0c9 100644 --- a/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-b/_config.js +++ b/test/chunking-form/samples/min-chunk-size/prefer-small-merge-target-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'when there are two equally valid merge targets, the smaller is preferred', options: { input: ['main1.js', 'main2.js', 'main3.js', 'main4.js'], diff --git a/test/chunking-form/samples/minify-internal-exports/_config.js b/test/chunking-form/samples/minify-internal-exports/_config.js index c0fc57b45bc..aff56c6f69d 100644 --- a/test/chunking-form/samples/minify-internal-exports/_config.js +++ b/test/chunking-form/samples/minify-internal-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to force the minification of internal exports', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/missing-export-compact/_config.js b/test/chunking-form/samples/missing-export-compact/_config.js index 807b53a0be9..f7b35f0f4e4 100644 --- a/test/chunking-form/samples/missing-export-compact/_config.js +++ b/test/chunking-form/samples/missing-export-compact/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'missing export compact', expectedWarnings: ['SHIMMED_EXPORT'], options: { diff --git a/test/chunking-form/samples/missing-export-reused-deconflicting/_config.js b/test/chunking-form/samples/missing-export-reused-deconflicting/_config.js index 328a10b44cf..1f82231f9ca 100644 --- a/test/chunking-form/samples/missing-export-reused-deconflicting/_config.js +++ b/test/chunking-form/samples/missing-export-reused-deconflicting/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles using dependencies with shimmed missing exports as ', expectedWarnings: ['SHIMMED_EXPORT'], options: { diff --git a/test/chunking-form/samples/missing-export/_config.js b/test/chunking-form/samples/missing-export/_config.js index 6fb44fec3d2..3681e1060c0 100644 --- a/test/chunking-form/samples/missing-export/_config.js +++ b/test/chunking-form/samples/missing-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'missing export', expectedWarnings: ['SHIMMED_EXPORT', 'MIXED_EXPORTS'], options: { diff --git a/test/chunking-form/samples/multi-chunking/_config.js b/test/chunking-form/samples/multi-chunking/_config.js index d9c55b44b29..3ad13c73f33 100644 --- a/test/chunking-form/samples/multi-chunking/_config.js +++ b/test/chunking-form/samples/multi-chunking/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'simple chunking', options: { input: ['main1.js', 'main2.js', 'main3.js'] diff --git a/test/chunking-form/samples/multiple-entry-points/_config.js b/test/chunking-form/samples/multiple-entry-points/_config.js index 33381de6df1..4ca7d1a2563 100644 --- a/test/chunking-form/samples/multiple-entry-points/_config.js +++ b/test/chunking-form/samples/multiple-entry-points/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles multiple entry points with a shared dependency', options: { input: ['main', 'other'], diff --git a/test/chunking-form/samples/namespace-imports-from-chunks/_config.js b/test/chunking-form/samples/namespace-imports-from-chunks/_config.js index 121868615fe..88847634fb8 100644 --- a/test/chunking-form/samples/namespace-imports-from-chunks/_config.js +++ b/test/chunking-form/samples/namespace-imports-from-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handle namespace imports from chunks', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/namespace-object-import/_config.js b/test/chunking-form/samples/namespace-object-import/_config.js index 2b9df55e0ae..a1e72cbf8ec 100644 --- a/test/chunking-form/samples/namespace-object-import/_config.js +++ b/test/chunking-form/samples/namespace-object-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'namespace object import', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/samples/namespace-reexport-name-conflict/_config.js b/test/chunking-form/samples/namespace-reexport-name-conflict/_config.js index 6a914901aef..20533781645 100644 --- a/test/chunking-form/samples/namespace-reexport-name-conflict/_config.js +++ b/test/chunking-form/samples/namespace-reexport-name-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renders namespaces with reexports that conflict with existing imports', options: { input: ['main1.js', 'main2.js', 'main3.js'], diff --git a/test/chunking-form/samples/namespace-reexports/_config.js b/test/chunking-form/samples/namespace-reexports/_config.js index ae50022e5c7..aee9dcd1d1a 100644 --- a/test/chunking-form/samples/namespace-reexports/_config.js +++ b/test/chunking-form/samples/namespace-reexports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'namespace rendering with reexports', options: { input: ['main.js', 'hsl2hsv.js', 'index.js'], diff --git a/test/chunking-form/samples/namespace-retracing/_config.js b/test/chunking-form/samples/namespace-retracing/_config.js index 9de889a3d98..81c0950bea2 100644 --- a/test/chunking-form/samples/namespace-retracing/_config.js +++ b/test/chunking-form/samples/namespace-retracing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'internal reexported namespaces over chunk boundaries', options: { input: ['main-a.js', 'main-b.js'] diff --git a/test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.js b/test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.js index 7ec599c2e29..d396528a6e9 100644 --- a/test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.js +++ b/test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', options: { diff --git a/test/chunking-form/samples/namespace-tostring/dynamic-import/_config.js b/test/chunking-form/samples/namespace-tostring/dynamic-import/_config.js index 1b28b020380..fd0d299f4a6 100644 --- a/test/chunking-form/samples/namespace-tostring/dynamic-import/_config.js +++ b/test/chunking-form/samples/namespace-tostring/dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to dynamic imports', options: { output: { diff --git a/test/chunking-form/samples/namespace-tracing/_config.js b/test/chunking-form/samples/namespace-tracing/_config.js index 8ef12626be3..2e3781c5ad2 100644 --- a/test/chunking-form/samples/namespace-tracing/_config.js +++ b/test/chunking-form/samples/namespace-tracing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Something', options: { input: ['main-a.js', 'main-b.js', 'main-c.js'] diff --git a/test/chunking-form/samples/nested-chunks/_config.js b/test/chunking-form/samples/nested-chunks/_config.js index 10d8f5490ab..9d312e61ab8 100644 --- a/test/chunking-form/samples/nested-chunks/_config.js +++ b/test/chunking-form/samples/nested-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'nested chunks', options: { input: { main1: 'main1', 'nested/main2': 'main2' }, diff --git a/test/chunking-form/samples/nested-dynamic-imports/_config.js b/test/chunking-form/samples/nested-dynamic-imports/_config.js index 8cde419ff76..26be48ddbea 100644 --- a/test/chunking-form/samples/nested-dynamic-imports/_config.js +++ b/test/chunking-form/samples/nested-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles dynamic imports containing dynamic imports', options: { input: 'main' diff --git a/test/chunking-form/samples/no-minify-internal-exports/_config.js b/test/chunking-form/samples/no-minify-internal-exports/_config.js index 007b4b3d7fe..a6d329040ea 100644 --- a/test/chunking-form/samples/no-minify-internal-exports/_config.js +++ b/test/chunking-form/samples/no-minify-internal-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to disable the minification of internal exports', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/no-treeshake-imports/_config.js b/test/chunking-form/samples/no-treeshake-imports/_config.js index b941534b90b..260389b9f7e 100644 --- a/test/chunking-form/samples/no-treeshake-imports/_config.js +++ b/test/chunking-form/samples/no-treeshake-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes all imports when setting moduleSideEffects to "no-treeshake"', options: { input: ['main1', 'main2'], diff --git a/test/chunking-form/samples/preserve-entry-signatures/allow-extension/_config.js b/test/chunking-form/samples/preserve-entry-signatures/allow-extension/_config.js index d3fdeba75c8..d62c434a28f 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/allow-extension/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/allow-extension/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Never creates facades for allow-extension', options: { preserveEntrySignatures: 'allow-extension' diff --git a/test/chunking-form/samples/preserve-entry-signatures/exports-only-no-exports/_config.js b/test/chunking-form/samples/preserve-entry-signatures/exports-only-no-exports/_config.js index 3865340d1dd..94a26a987c1 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/exports-only-no-exports/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/exports-only-no-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Does not create a facade for exports-only if there are no exports', options: { preserveEntrySignatures: 'exports-only' diff --git a/test/chunking-form/samples/preserve-entry-signatures/exports-only/_config.js b/test/chunking-form/samples/preserve-entry-signatures/exports-only/_config.js index 2202db546aa..60bfa49a3a7 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/exports-only/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/exports-only/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Creates a facade if necessary for exports-only if there are exports', options: { preserveEntrySignatures: 'exports-only' diff --git a/test/chunking-form/samples/preserve-entry-signatures/false/_config.js b/test/chunking-form/samples/preserve-entry-signatures/false/_config.js index c759457e255..f38aeae9f00 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/false/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Does not include entry exports and does not preserve the signature', options: { preserveEntrySignatures: false diff --git a/test/chunking-form/samples/preserve-entry-signatures/override-via-plugin/_config.js b/test/chunking-form/samples/preserve-entry-signatures/override-via-plugin/_config.js index adbfebdb92b..3614e1b10d5 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/override-via-plugin/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/override-via-plugin/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Allows overriding behaviour for emitted chunks', options: { input: [], diff --git a/test/chunking-form/samples/preserve-entry-signatures/strict/_config.js b/test/chunking-form/samples/preserve-entry-signatures/strict/_config.js index e294cfe45b2..ce374249b17 100644 --- a/test/chunking-form/samples/preserve-entry-signatures/strict/_config.js +++ b/test/chunking-form/samples/preserve-entry-signatures/strict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Creates a facade if necessary for strict entry signatures', options: { preserveEntrySignatures: 'strict' diff --git a/test/chunking-form/samples/preserve-modules-auto-export-mode/_config.js b/test/chunking-form/samples/preserve-modules-auto-export-mode/_config.js index a34d524ab6e..fd549715124 100644 --- a/test/chunking-form/samples/preserve-modules-auto-export-mode/_config.js +++ b/test/chunking-form/samples/preserve-modules-auto-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Uses entry point semantics for all files when preserving modules', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules-commonjs/_config.js b/test/chunking-form/samples/preserve-modules-commonjs/_config.js index c546dd2aa0e..9b98044a176 100644 --- a/test/chunking-form/samples/preserve-modules-commonjs/_config.js +++ b/test/chunking-form/samples/preserve-modules-commonjs/_config.js @@ -1,6 +1,6 @@ const commonjs = require('@rollup/plugin-commonjs'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Handles output from @rollup/plugin-commonjs', expectedWarnings: ['MIXED_EXPORTS'], options: { diff --git a/test/chunking-form/samples/preserve-modules-default-mode-namespace/_config.js b/test/chunking-form/samples/preserve-modules-default-mode-namespace/_config.js index b9659d7acdf..3cdaf10c851 100644 --- a/test/chunking-form/samples/preserve-modules-default-mode-namespace/_config.js +++ b/test/chunking-form/samples/preserve-modules-default-mode-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'import namespace from chunks with default export mode when preserving modules', options: { input: ['main', 'lib'], diff --git a/test/chunking-form/samples/preserve-modules-default-mode-namespace2/_config.js b/test/chunking-form/samples/preserve-modules-default-mode-namespace2/_config.js index b9659d7acdf..3cdaf10c851 100644 --- a/test/chunking-form/samples/preserve-modules-default-mode-namespace2/_config.js +++ b/test/chunking-form/samples/preserve-modules-default-mode-namespace2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'import namespace from chunks with default export mode when preserving modules', options: { input: ['main', 'lib'], diff --git a/test/chunking-form/samples/preserve-modules-dynamic-imports/_config.js b/test/chunking-form/samples/preserve-modules-dynamic-imports/_config.js index db4fb811297..5046f3f8aec 100644 --- a/test/chunking-form/samples/preserve-modules-dynamic-imports/_config.js +++ b/test/chunking-form/samples/preserve-modules-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'dynamic imports are handled correctly when preserving modules', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/preserve-modules-dynamic-namespace/_config.js b/test/chunking-form/samples/preserve-modules-dynamic-namespace/_config.js index 15cb68c04a2..a1eb968e676 100644 --- a/test/chunking-form/samples/preserve-modules-dynamic-namespace/_config.js +++ b/test/chunking-form/samples/preserve-modules-dynamic-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Preserve modules properly handles internal namespace imports (#2576)', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/preserve-modules-empty/_config.js b/test/chunking-form/samples/preserve-modules-empty/_config.js index 543e43f0754..1e169c004f9 100644 --- a/test/chunking-form/samples/preserve-modules-empty/_config.js +++ b/test/chunking-form/samples/preserve-modules-empty/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Preserve modules remove empty dependencies', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules-export-alias/_config.js b/test/chunking-form/samples/preserve-modules-export-alias/_config.js index 6158ea525de..e85d07a9b9e 100644 --- a/test/chunking-form/samples/preserve-modules-export-alias/_config.js +++ b/test/chunking-form/samples/preserve-modules-export-alias/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'confirm export aliases are preserved in modules', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/preserve-modules-filename-pattern/_config.js b/test/chunking-form/samples/preserve-modules-filename-pattern/_config.js index 66a224dca57..798beadfb1f 100644 --- a/test/chunking-form/samples/preserve-modules-filename-pattern/_config.js +++ b/test/chunking-form/samples/preserve-modules-filename-pattern/_config.js @@ -14,7 +14,7 @@ const expectedNames = new Set([ 'no-ext' ]); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'entryFileNames pattern supported in combination with preserveModules', options: { input: 'src/main.js', diff --git a/test/chunking-form/samples/preserve-modules-id-case-sensitive/_config.js b/test/chunking-form/samples/preserve-modules-id-case-sensitive/_config.js index 73c52535dd8..ccdcb862f4b 100644 --- a/test/chunking-form/samples/preserve-modules-id-case-sensitive/_config.js +++ b/test/chunking-form/samples/preserve-modules-id-case-sensitive/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Preserve modules id case sensitive', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules-named-export-mode/_config.js b/test/chunking-form/samples/preserve-modules-named-export-mode/_config.js index 6ce1e6897a2..f122cde6746 100644 --- a/test/chunking-form/samples/preserve-modules-named-export-mode/_config.js +++ b/test/chunking-form/samples/preserve-modules-named-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects "named" export mode in all chunks when preserving modules', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_config.js b/test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_config.js index 181e5489ef1..5500db098f9 100644 --- a/test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_config.js +++ b/test/chunking-form/samples/preserve-modules-namespace-reexport-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles doing a namespace reexport of a reexport', options: { output: { diff --git a/test/chunking-form/samples/preserve-modules-nested-barrel-es-export/_config.js b/test/chunking-form/samples/preserve-modules-nested-barrel-es-export/_config.js index 24996b2915e..35fa916f7ea 100644 --- a/test/chunking-form/samples/preserve-modules-nested-barrel-es-export/_config.js +++ b/test/chunking-form/samples/preserve-modules-nested-barrel-es-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'confirm exports are deconflicted when exporting nested index aliases', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules-nested-export/_config.js b/test/chunking-form/samples/preserve-modules-nested-export/_config.js index 9669a56b868..adec95d353a 100644 --- a/test/chunking-form/samples/preserve-modules-nested-export/_config.js +++ b/test/chunking-form/samples/preserve-modules-nested-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'confirm exports are preserved when exporting a module', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules-non-entry-imports/_config.js b/test/chunking-form/samples/preserve-modules-non-entry-imports/_config.js index d1018a906d9..d1e1a6df084 100644 --- a/test/chunking-form/samples/preserve-modules-non-entry-imports/_config.js +++ b/test/chunking-form/samples/preserve-modules-non-entry-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports and exports of non-entry points are tracked', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules-proxy-import/_config.js b/test/chunking-form/samples/preserve-modules-proxy-import/_config.js index 2984a845abb..b4a3b14ba8b 100644 --- a/test/chunking-form/samples/preserve-modules-proxy-import/_config.js +++ b/test/chunking-form/samples/preserve-modules-proxy-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly resolves imports via a proxy module as direct imports when preserving modules', options: { diff --git a/test/chunking-form/samples/preserve-modules-reaching-outside/_config.js b/test/chunking-form/samples/preserve-modules-reaching-outside/_config.js index 3e3af8ac52c..0eeb2359c12 100644 --- a/test/chunking-form/samples/preserve-modules-reaching-outside/_config.js +++ b/test/chunking-form/samples/preserve-modules-reaching-outside/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'change the module destination', options: { input: 'src/lib/main.js', diff --git a/test/chunking-form/samples/preserve-modules-root/_config.js b/test/chunking-form/samples/preserve-modules-root/_config.js index 8d9194723f7..f9390f4e298 100644 --- a/test/chunking-form/samples/preserve-modules-root/_config.js +++ b/test/chunking-form/samples/preserve-modules-root/_config.js @@ -1,7 +1,7 @@ const commonjs = require('@rollup/plugin-commonjs'); const resolve = require('@rollup/plugin-node-resolve').default; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'confirm preserveModulesRoot restructures src appropriately', expectedWarnings: ['MIXED_EXPORTS'], options: { diff --git a/test/chunking-form/samples/preserve-modules-scriptified-assets/_config.js b/test/chunking-form/samples/preserve-modules-scriptified-assets/_config.js index 03e72da25f8..3ab8101f7a5 100644 --- a/test/chunking-form/samples/preserve-modules-scriptified-assets/_config.js +++ b/test/chunking-form/samples/preserve-modules-scriptified-assets/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'scriptified assets have extension in preserveModules output filename', options: { input: 'src/main.js', diff --git a/test/chunking-form/samples/preserve-modules-single-entry/_config.js b/test/chunking-form/samples/preserve-modules-single-entry/_config.js index 50a9248646a..f9d48d1e891 100644 --- a/test/chunking-form/samples/preserve-modules-single-entry/_config.js +++ b/test/chunking-form/samples/preserve-modules-single-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'single entry names file correctly', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules-special-chunk-names/_config.js b/test/chunking-form/samples/preserve-modules-special-chunk-names/_config.js index ad7db05a1cc..8c139e437c0 100644 --- a/test/chunking-form/samples/preserve-modules-special-chunk-names/_config.js +++ b/test/chunking-form/samples/preserve-modules-special-chunk-names/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Supports chunk names from config when preserving modules', options: { input: { 'main-entry': 'main.js' }, diff --git a/test/chunking-form/samples/preserve-modules-virtual-modules-filename-pattern/_config.js b/test/chunking-form/samples/preserve-modules-virtual-modules-filename-pattern/_config.js index db8a4d84c4c..5c22c2167db 100644 --- a/test/chunking-form/samples/preserve-modules-virtual-modules-filename-pattern/_config.js +++ b/test/chunking-form/samples/preserve-modules-virtual-modules-filename-pattern/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Generates actual files whose filename adheres to entryFileNames for virtual modules when preserving modules', options: { diff --git a/test/chunking-form/samples/preserve-modules-virtual-modules/_config.js b/test/chunking-form/samples/preserve-modules-virtual-modules/_config.js index 9902dbb0676..59601cf9557 100644 --- a/test/chunking-form/samples/preserve-modules-virtual-modules/_config.js +++ b/test/chunking-form/samples/preserve-modules-virtual-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { input: 'main.js', diff --git a/test/chunking-form/samples/preserve-modules/_config.js b/test/chunking-form/samples/preserve-modules/_config.js index 8a6d3fbedc1..6f3d052f35a 100644 --- a/test/chunking-form/samples/preserve-modules/_config.js +++ b/test/chunking-form/samples/preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Rewrite modules in-place', options: { input: ['main1.js', 'main2.js'], diff --git a/test/chunking-form/samples/reexport-from-entry/_config.js b/test/chunking-form/samples/reexport-from-entry/_config.js index 2cc27d25a84..9973acbb734 100644 --- a/test/chunking-form/samples/reexport-from-entry/_config.js +++ b/test/chunking-form/samples/reexport-from-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows reexporting from other entry points', options: { input: ['main', 'otherEntry'] diff --git a/test/chunking-form/samples/reexport-shortpaths/_config.js b/test/chunking-form/samples/reexport-shortpaths/_config.js index 19d217176c3..0be61507777 100644 --- a/test/chunking-form/samples/reexport-shortpaths/_config.js +++ b/test/chunking-form/samples/reexport-shortpaths/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Tracing reexport shortpaths to entry points', options: { input: ['main1.js', 'main2.js', 'main3.js'] diff --git a/test/chunking-form/samples/render-chunk-transform/_config.js b/test/chunking-form/samples/render-chunk-transform/_config.js index c7d038e8a4b..69abcb18320 100644 --- a/test/chunking-form/samples/render-chunk-transform/_config.js +++ b/test/chunking-form/samples/render-chunk-transform/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { replaceDirectoryInStringifiedObject } = require('../../../utils'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'replaces hashes when mutating chunk info in renderChunk', options: { input: ['main1', 'main2'], diff --git a/test/chunking-form/samples/render-chunk/_config.js b/test/chunking-form/samples/render-chunk/_config.js index 6c8bbeee1a9..73c0117a60d 100644 --- a/test/chunking-form/samples/render-chunk/_config.js +++ b/test/chunking-form/samples/render-chunk/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { replaceDirectoryInStringifiedObject } = require('../../../utils'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'transforms chunks in the renderChunk hook, also transforming hashes added in the hook', options: { diff --git a/test/chunking-form/samples/render-dynamic-import/_config.js b/test/chunking-form/samples/render-dynamic-import/_config.js index 986a61e63ba..6c4d9f60823 100644 --- a/test/chunking-form/samples/render-dynamic-import/_config.js +++ b/test/chunking-form/samples/render-dynamic-import/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports custom rendering for dynamic imports', options: { plugins: { diff --git a/test/chunking-form/samples/resolve-dynamic-import/_config.js b/test/chunking-form/samples/resolve-dynamic-import/_config.js index aea65588da5..18a97107189 100644 --- a/test/chunking-form/samples/resolve-dynamic-import/_config.js +++ b/test/chunking-form/samples/resolve-dynamic-import/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const EXISTING = path.resolve(__dirname, 'existing.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Supports all resolution formats for dynamic imports', options: { plugins: { diff --git a/test/chunking-form/samples/resolve-file-url/_config.js b/test/chunking-form/samples/resolve-file-url/_config.js index 82c294addf3..eb4921765c1 100644 --- a/test/chunking-form/samples/resolve-file-url/_config.js +++ b/test/chunking-form/samples/resolve-file-url/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to configure file urls', options: { output: { diff --git a/test/chunking-form/samples/sanitize-chunk-names/_config.js b/test/chunking-form/samples/sanitize-chunk-names/_config.js index 8283e5cd786..88231449099 100644 --- a/test/chunking-form/samples/sanitize-chunk-names/_config.js +++ b/test/chunking-form/samples/sanitize-chunk-names/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'sanitizes chunk names from virtual entry points', options: { input: ['main1'], diff --git a/test/chunking-form/samples/sanitize-internal-exports/_config.js b/test/chunking-form/samples/sanitize-internal-exports/_config.js index c409d13f4db..bc1bda3508b 100644 --- a/test/chunking-form/samples/sanitize-internal-exports/_config.js +++ b/test/chunking-form/samples/sanitize-internal-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'make sure internal exports are sanitized', options: { input: ['main.js'] diff --git a/test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_config.js index 2baf5d5450c..f705ab8af4b 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/avoid-imports-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids empty imports if they do not have side-effects when preserving modules (#3359)', options: { diff --git a/test/chunking-form/samples/side-effect-free-dependencies/avoid-side-effect-free-empty-imports/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/avoid-side-effect-free-empty-imports/_config.js index b7e8ab412af..c558939ed93 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/avoid-side-effect-free-empty-imports/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/avoid-side-effect-free-empty-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids empty imports if they do not have side-effects', options: { input: ['main1', 'main2'], diff --git a/test/chunking-form/samples/side-effect-free-dependencies/hoist-side-effect-modules/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/hoist-side-effect-modules/_config.js index 62488d720d7..96fd2d53044 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/hoist-side-effect-modules/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/hoist-side-effect-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'hoist side-effect imports when avoiding empty imports', options: { input: ['main1', 'main2', 'main3'] diff --git a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-empty-imports/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-empty-imports/_config.js index 5f84252baf7..6855779e88e 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-empty-imports/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-empty-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids empty imports if moduleSideEffects are false', options: { input: ['main1', 'main2'], diff --git a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-1/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-1/_config.js index a679fb83d37..a47b3d02f34 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-1/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-1/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles re-exports in entry points if moduleSideEffects are false', options: { treeshake: { diff --git a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-2/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-2/_config.js index a679fb83d37..a47b3d02f34 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-2/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles re-exports in entry points if moduleSideEffects are false', options: { treeshake: { diff --git a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-3/_config.js b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-3/_config.js index a679fb83d37..a47b3d02f34 100644 --- a/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-3/_config.js +++ b/test/chunking-form/samples/side-effect-free-dependencies/module-side-effects-reexports-3/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles re-exports in entry points if moduleSideEffects are false', options: { treeshake: { diff --git a/test/chunking-form/samples/single-file-manual-chunk/_config.js b/test/chunking-form/samples/single-file-manual-chunk/_config.js index c166b0d842c..ad4828a51a5 100644 --- a/test/chunking-form/samples/single-file-manual-chunk/_config.js +++ b/test/chunking-form/samples/single-file-manual-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'chunk aliasing with extensions', options: { output: { diff --git a/test/chunking-form/samples/synthetic-named-exports/chained-default-reexport/_config.js b/test/chunking-form/samples/synthetic-named-exports/chained-default-reexport/_config.js index f15f7b9cde7..a30da76068b 100644 --- a/test/chunking-form/samples/synthetic-named-exports/chained-default-reexport/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/chained-default-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles synthetic named exports that are reexported as a default export over several stages', options: { diff --git a/test/chunking-form/samples/synthetic-named-exports/deduplicate-synthetic-named-exports-and-default/_config.js b/test/chunking-form/samples/synthetic-named-exports/deduplicate-synthetic-named-exports-and-default/_config.js index 804048efb41..55d81a22772 100644 --- a/test/chunking-form/samples/synthetic-named-exports/deduplicate-synthetic-named-exports-and-default/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/deduplicate-synthetic-named-exports-and-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles importing a synthetic named export together with the default export', options: { input: ['main1', 'main2', 'main3'], diff --git a/test/chunking-form/samples/synthetic-named-exports/default-reexport/_config.js b/test/chunking-form/samples/synthetic-named-exports/default-reexport/_config.js index 52482ee067c..45fab3730c5 100644 --- a/test/chunking-form/samples/synthetic-named-exports/default-reexport/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/default-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles synthetic named exports that are reexported as a default export where both the default and a named export is used', options: { diff --git a/test/chunking-form/samples/synthetic-named-exports/dynamic-import/_config.js b/test/chunking-form/samples/synthetic-named-exports/dynamic-import/_config.js index 4e81ee4d4ac..a0df85e8d12 100644 --- a/test/chunking-form/samples/synthetic-named-exports/dynamic-import/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'synthetic named exports', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/synthetic-named-exports/entry/_config.js b/test/chunking-form/samples/synthetic-named-exports/entry/_config.js index 4c1fa87eaec..f89a194c13b 100644 --- a/test/chunking-form/samples/synthetic-named-exports/entry/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not expose the synthetic namespace if an entry point uses a string value', options: { input: ['main', 'other'], diff --git a/test/chunking-form/samples/synthetic-named-exports/global-conflict/_config.js b/test/chunking-form/samples/synthetic-named-exports/global-conflict/_config.js index df0b7b540b5..d1f812437d6 100644 --- a/test/chunking-form/samples/synthetic-named-exports/global-conflict/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/global-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids conflicts with global variables when re-exporting synthetic named exports', options: { plugins: [ diff --git a/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports-2/_config.js b/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports-2/_config.js index 3fbe8f426fa..2bfd99aa85f 100644 --- a/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports-2/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports-2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'mixed synthetic named exports 2', options: { input: ['main.js', 'main2.js'], diff --git a/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports/_config.js b/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports/_config.js index 183d830d106..c1236b71da2 100644 --- a/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/mixed-synthetic-named-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'mixed synthetic named exports', options: { input: ['main.js'], diff --git a/test/chunking-form/samples/synthetic-named-exports/multi-level/_config.js b/test/chunking-form/samples/synthetic-named-exports/multi-level/_config.js index b6583198392..ca7cb93658c 100644 --- a/test/chunking-form/samples/synthetic-named-exports/multi-level/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/multi-level/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles multiple levels of synthetic named exports', options: { input: ['main.js', 'main2.js', 'main3.js', 'main4.js', 'main5.js'], diff --git a/test/chunking-form/samples/synthetic-named-exports/namespace/_config.js b/test/chunking-form/samples/synthetic-named-exports/namespace/_config.js index 9f63509ea65..3882d278781 100644 --- a/test/chunking-form/samples/synthetic-named-exports/namespace/_config.js +++ b/test/chunking-form/samples/synthetic-named-exports/namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports re-exported synthetic exports in namespace objects', options: { plugins: [ diff --git a/test/chunking-form/samples/system-exports-wrap-pure-annotation/_config.js b/test/chunking-form/samples/system-exports-wrap-pure-annotation/_config.js index 7954286990e..ccde3427005 100644 --- a/test/chunking-form/samples/system-exports-wrap-pure-annotation/_config.js +++ b/test/chunking-form/samples/system-exports-wrap-pure-annotation/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'system exports should wrap pure annotations', options: { input: ['main1.js', 'main2.js'] diff --git a/test/chunking-form/tsconfig.json b/test/chunking-form/tsconfig.json new file mode 100644 index 00000000000..4a26f3ee84c --- /dev/null +++ b/test/chunking-form/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "include": [ + "**/_config.js", + "./index.js", + "./define.d.ts" + ] +} diff --git a/test/cli/define.d.ts b/test/cli/define.d.ts new file mode 100644 index 00000000000..6e172947d43 --- /dev/null +++ b/test/cli/define.d.ts @@ -0,0 +1,5 @@ +import type { TestConfigCli } from '../types'; + +declare global { + function defineTest(config: TestConfigCli): TestConfigCli; +} diff --git a/test/cli/index.js b/test/cli/index.js index d59012df8bc..02f667cabde 100644 --- a/test/cli/index.js +++ b/test/cli/index.js @@ -18,6 +18,9 @@ copySync(resolve(__dirname, 'node_modules_rename_me'), resolve(__dirname, 'node_ runTestSuiteWithSamples( 'cli', resolve(__dirname, 'samples'), + /** + * @param {import('../types').TestConfigCli} config + */ (directory, config) => { (config.skip ? it.skip : config.solo ? it.only : it)( basename(directory) + ': ' + config.description, diff --git a/test/cli/samples/allow-output-prefix/_config.js b/test/cli/samples/allow-output-prefix/_config.js index aeba98b0545..4cf8e90b2a6 100644 --- a/test/cli/samples/allow-output-prefix/_config.js +++ b/test/cli/samples/allow-output-prefix/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows output options to be prefixed with "output."', command: 'rollup main.js --output.format es --output.footer "console.log(\'Rollup!\')"' }); diff --git a/test/cli/samples/amd/_config.js b/test/cli/samples/amd/_config.js index 8417bfed016..7b84bb42d5e 100644 --- a/test/cli/samples/amd/_config.js +++ b/test/cli/samples/amd/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'sets AMD module ID and define function', command: 'rollup -i main.js -f amd --amd.id foo --amd.define defn' }); diff --git a/test/cli/samples/banner-intro-outro-footer/_config.js b/test/cli/samples/banner-intro-outro-footer/_config.js index ce46e710499..adfc25b205b 100644 --- a/test/cli/samples/banner-intro-outro-footer/_config.js +++ b/test/cli/samples/banner-intro-outro-footer/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds banner/intro/outro/footer', command: 'rollup -i main.js -f iife --indent --banner "// banner" --intro "// intro" --outro "// outro" --footer "// footer"' diff --git a/test/cli/samples/code-splitting-named-default-inputs/_config.js b/test/cli/samples/code-splitting-named-default-inputs/_config.js index e1e3a9421db..9bb1db99c46 100644 --- a/test/cli/samples/code-splitting-named-default-inputs/_config.js +++ b/test/cli/samples/code-splitting-named-default-inputs/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows defining names via CLI', command: 'rollup entry1=main1.js "Entry 2"="main 2.js" "main3.js" --entryFileNames [name]-[hash].js -f es', diff --git a/test/cli/samples/code-splitting-named-inputs/_config.js b/test/cli/samples/code-splitting-named-inputs/_config.js index 2ea23242d18..e22f53d98b2 100644 --- a/test/cli/samples/code-splitting-named-inputs/_config.js +++ b/test/cli/samples/code-splitting-named-inputs/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows defining names via CLI', command: 'rollup --entryFileNames [name]-[hash].js --input entry1=main1.js -i "Entry 2"="main 2.js" -i "main3.js" -f es', diff --git a/test/cli/samples/config-async-function/_config.js b/test/cli/samples/config-async-function/_config.js index e8d0389afc1..941479c1dfb 100644 --- a/test/cli/samples/config-async-function/_config.js +++ b/test/cli/samples/config-async-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports using an async function as config', command: 'rollup -c' }); diff --git a/test/cli/samples/config-cjs-dirname/_config.js b/test/cli/samples/config-cjs-dirname/_config.js index cf46da4aace..b9d37f7721a 100644 --- a/test/cli/samples/config-cjs-dirname/_config.js +++ b/test/cli/samples/config-cjs-dirname/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not transpile cjs configs and provides correct __filename', command: 'rollup -c' }); diff --git a/test/cli/samples/config-cwd-case-insensitive-es6/_config.js b/test/cli/samples/config-cwd-case-insensitive-es6/_config.js index 5414ef9c8a4..62dd7886aeb 100644 --- a/test/cli/samples/config-cwd-case-insensitive-es6/_config.js +++ b/test/cli/samples/config-cwd-case-insensitive-es6/_config.js @@ -2,7 +2,7 @@ function toggleCase(s) { return s == s.toLowerCase() ? s.toUpperCase() : s.toLowerCase(); } -module.exports = defineRollupTest({ +module.exports = defineTest({ onlyWindows: true, description: "can load ES6 config with cwd that doesn't match realpath", command: 'rollup -c', diff --git a/test/cli/samples/config-cwd-case-insensitive/_config.js b/test/cli/samples/config-cwd-case-insensitive/_config.js index 7c274cb6120..afda7be92dc 100644 --- a/test/cli/samples/config-cwd-case-insensitive/_config.js +++ b/test/cli/samples/config-cwd-case-insensitive/_config.js @@ -2,7 +2,7 @@ function toggleCase(s) { return s == s.toLowerCase() ? s.toUpperCase() : s.toLowerCase(); } -module.exports = defineRollupTest({ +module.exports = defineTest({ onlyWindows: true, description: "can load config with cwd that doesn't match realpath", command: 'rollup -c', diff --git a/test/cli/samples/config-defineConfig-cjs/_config.js b/test/cli/samples/config-defineConfig-cjs/_config.js index 5a98174efd1..6319cd39237 100644 --- a/test/cli/samples/config-defineConfig-cjs/_config.js +++ b/test/cli/samples/config-defineConfig-cjs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses cjs config file which return config wrapped by defineConfig', command: 'rollup --config rollup.config.js', execute: true diff --git a/test/cli/samples/config-defineConfig-mjs/_config.js b/test/cli/samples/config-defineConfig-mjs/_config.js index 72ce93af594..f08742d7bd8 100644 --- a/test/cli/samples/config-defineConfig-mjs/_config.js +++ b/test/cli/samples/config-defineConfig-mjs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses mjs config file which return config wrapped by defineConfig', command: 'rollup --config rollup.config.mjs', execute: true diff --git a/test/cli/samples/config-env-multiple/_config.js b/test/cli/samples/config-env-multiple/_config.js index 0cf82fb60e2..997fd6227ed 100644 --- a/test/cli/samples/config-env-multiple/_config.js +++ b/test/cli/samples/config-env-multiple/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'passes environment variables to config file via multiple --environment values', command: 'rollup --config --environment PRODUCTION,FOO:bar --environment SECOND,KEY:value --environment FOO:foo', diff --git a/test/cli/samples/config-env/_config.js b/test/cli/samples/config-env/_config.js index 7f98b9c48bb..14cd8d6adbd 100644 --- a/test/cli/samples/config-env/_config.js +++ b/test/cli/samples/config-env/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'passes environment variables to config file', command: 'rollup --config --environment PRODUCTION,FOO:bar,HOST:http://localhost:4000', execute: true diff --git a/test/cli/samples/config-es6/_config.js b/test/cli/samples/config-es6/_config.js index e7355e85f72..e575fb5e72e 100644 --- a/test/cli/samples/config-es6/_config.js +++ b/test/cli/samples/config-es6/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses ES6 module config file', command: 'rollup --config rollup.config.js --bundleConfigAsCjs', execute: true diff --git a/test/cli/samples/config-external-function/_config.js b/test/cli/samples/config-external-function/_config.js index 226010ff1f6..05560999890 100644 --- a/test/cli/samples/config-external-function/_config.js +++ b/test/cli/samples/config-external-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external option gets passed from config', command: 'rollup -c -e assert,external-module' }); diff --git a/test/cli/samples/config-external/_config.js b/test/cli/samples/config-external/_config.js index 4bcebf9e128..67a0257392f 100644 --- a/test/cli/samples/config-external/_config.js +++ b/test/cli/samples/config-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external option gets passed from config', command: 'rollup -c' }); diff --git a/test/cli/samples/config-function-modify-command/_config.js b/test/cli/samples/config-function-modify-command/_config.js index d167bea8f74..f2343fd941e 100644 --- a/test/cli/samples/config-function-modify-command/_config.js +++ b/test/cli/samples/config-function-modify-command/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows cleaning up and modifying the command args in the config file', command: 'rollup --config rollup.config.mjs --some-option="foo" --another-option=42', execute: true diff --git a/test/cli/samples/config-function/_config.js b/test/cli/samples/config-function/_config.js index ebe21af4eca..640ddc4f806 100644 --- a/test/cli/samples/config-function/_config.js +++ b/test/cli/samples/config-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'if the config file returns a function then this will be called with the command args', command: 'rollup --config rollup.config.mjs --silent', diff --git a/test/cli/samples/config-import-meta/_config.js b/test/cli/samples/config-import-meta/_config.js index cf5aebff998..e5a746b0711 100644 --- a/test/cli/samples/config-import-meta/_config.js +++ b/test/cli/samples/config-import-meta/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct import.meta.url in config files', command: 'rollup -c --bundleConfigAsCjs' }); diff --git a/test/cli/samples/config-json/_config.js b/test/cli/samples/config-json/_config.js index ae022a99da0..1791c32172a 100644 --- a/test/cli/samples/config-json/_config.js +++ b/test/cli/samples/config-json/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows config file to import json', command: 'rollup --config rollup.config.js --bundleConfigAsCjs', execute: true diff --git a/test/cli/samples/config-missing-export/_config.js b/test/cli/samples/config-missing-export/_config.js index 6cc0b5c92ba..b43ae2afdf9 100644 --- a/test/cli/samples/config-missing-export/_config.js +++ b/test/cli/samples/config-missing-export/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws error if config does not export an object', command: 'rollup -c', error(error) { diff --git a/test/cli/samples/config-mjs-plugins/_config.js b/test/cli/samples/config-mjs-plugins/_config.js index e7249b4b3a9..ba7b260f804 100644 --- a/test/cli/samples/config-mjs-plugins/_config.js +++ b/test/cli/samples/config-mjs-plugins/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports native esm as well as CJS plugins when using .mjs in Node 13+', command: 'rollup -c' }); diff --git a/test/cli/samples/config-mjs/_config.js b/test/cli/samples/config-mjs/_config.js index a07be4ab42d..f86efe57acc 100644 --- a/test/cli/samples/config-mjs/_config.js +++ b/test/cli/samples/config-mjs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses config file (.mjs)', command: 'rollup --config rollup.config.mjs', execute: true diff --git a/test/cli/samples/config-multiple-getfilename/_config.js b/test/cli/samples/config-multiple-getfilename/_config.js index fc724f86f46..16d4a577f2b 100644 --- a/test/cli/samples/config-multiple-getfilename/_config.js +++ b/test/cli/samples/config-multiple-getfilename/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'returns correct file names for multiple outputs (#3467)', command: 'rollup -c' }); diff --git a/test/cli/samples/config-multiple-source-maps/_config.js b/test/cli/samples/config-multiple-source-maps/_config.js index 72b2c2ba846..eaaff96129f 100644 --- a/test/cli/samples/config-multiple-source-maps/_config.js +++ b/test/cli/samples/config-multiple-source-maps/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly generates sourcemaps for multiple outputs', command: 'rollup -c --bundleConfigAsCjs' }); diff --git a/test/cli/samples/config-no-output/_config.js b/test/cli/samples/config-no-output/_config.js index f278f1aacad..0e0c3f4d942 100644 --- a/test/cli/samples/config-no-output/_config.js +++ b/test/cli/samples/config-no-output/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { readFileSync, unlinkSync } = require('node:fs'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses -o from CLI', command: 'rollup -c -o output.js', test() { diff --git a/test/cli/samples/config-override/_config.js b/test/cli/samples/config-override/_config.js index c30e54a5d4e..c0beeadba92 100644 --- a/test/cli/samples/config-override/_config.js +++ b/test/cli/samples/config-override/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'overrides config file with command line arguments', command: 'rollup -c -i main.js -f cjs', execute: true diff --git a/test/cli/samples/config-plugin-entry/_config.js b/test/cli/samples/config-plugin-entry/_config.js index f7356abddb4..7885059aae8 100644 --- a/test/cli/samples/config-plugin-entry/_config.js +++ b/test/cli/samples/config-plugin-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows plugins to set options.entry', command: 'rollup -c --bundleConfigAsCjs' }); diff --git a/test/cli/samples/config-promise-cjs/_config.js b/test/cli/samples/config-promise-cjs/_config.js index af8a4e904af..e88cc3f32f0 100644 --- a/test/cli/samples/config-promise-cjs/_config.js +++ b/test/cli/samples/config-promise-cjs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses cjs config file which returns a Promise', command: 'rollup --config rollup.config.cjs', execute: true diff --git a/test/cli/samples/config-promise-mjs/_config.js b/test/cli/samples/config-promise-mjs/_config.js index 73c4397dcfd..868630206ad 100644 --- a/test/cli/samples/config-promise-mjs/_config.js +++ b/test/cli/samples/config-promise-mjs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses mjs config file which returns a Promise', command: 'rollup --config rollup.config.mjs', execute: true diff --git a/test/cli/samples/config-promise/_config.js b/test/cli/samples/config-promise/_config.js index 08a5a5b48b0..b8dd5a16556 100644 --- a/test/cli/samples/config-promise/_config.js +++ b/test/cli/samples/config-promise/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses config file which returns a Promise', command: 'rollup --config rollup.config.mjs', execute: true diff --git a/test/cli/samples/config-true/_config.js b/test/cli/samples/config-true/_config.js index 194c136c10b..3b432cd1ac0 100644 --- a/test/cli/samples/config-true/_config.js +++ b/test/cli/samples/config-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'defaults to rollup.config.js', command: 'rollup -c --bundleConfigAsCjs', execute: true diff --git a/test/cli/samples/config-ts/_config.js b/test/cli/samples/config-ts/_config.js index 7d8c28a0106..ae776a49fab 100644 --- a/test/cli/samples/config-ts/_config.js +++ b/test/cli/samples/config-ts/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports loading TypeScript config files via plugin option', command: 'rollup --config rollup.config.ts --configPlugin typescript', execute: true diff --git a/test/cli/samples/config-type-module/_config.js b/test/cli/samples/config-type-module/_config.js index 1e9681874e1..f586b2ac67f 100644 --- a/test/cli/samples/config-type-module/_config.js +++ b/test/cli/samples/config-type-module/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tries to load .js config file if package type is "module"', command: 'cd sub && rollup -c rollup.config.js', error: () => true, diff --git a/test/cli/samples/config-warnings/_config.js b/test/cli/samples/config-warnings/_config.js index e88f2be60ab..d61f41abf5f 100644 --- a/test/cli/samples/config-warnings/_config.js +++ b/test/cli/samples/config-warnings/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'displays warnings when a config is loaded', command: 'rollup -c --bundleConfigAsCjs', stderr: stderr => diff --git a/test/cli/samples/config/_config.js b/test/cli/samples/config/_config.js index 7ad42c80c53..542a86cdacc 100644 --- a/test/cli/samples/config/_config.js +++ b/test/cli/samples/config/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses config file', command: 'rollup --config rollup.config.js', execute: true diff --git a/test/cli/samples/context/_config.js b/test/cli/samples/context/_config.js index 232185a606e..5e3baab3e5c 100644 --- a/test/cli/samples/context/_config.js +++ b/test/cli/samples/context/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Uses --context to set `this` value', command: 'rollup main.js --format commonjs --context window' }); diff --git a/test/cli/samples/custom-frame-with-pos/_config.js b/test/cli/samples/custom-frame-with-pos/_config.js index fc1518f557c..a4d39f61ba6 100644 --- a/test/cli/samples/custom-frame-with-pos/_config.js +++ b/test/cli/samples/custom-frame-with-pos/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'custom (plugin generated) code frame taking priority over pos generated one', command: 'rollup -c', error: () => true, diff --git a/test/cli/samples/custom-frame/_config.js b/test/cli/samples/custom-frame/_config.js index 887606facec..18a92db801a 100644 --- a/test/cli/samples/custom-frame/_config.js +++ b/test/cli/samples/custom-frame/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'errors with plugin generated code frames also contain stack', command: 'rollup -c', error: () => true, diff --git a/test/cli/samples/deconflict-entry-point-in-subdir/_config.js b/test/cli/samples/deconflict-entry-point-in-subdir/_config.js index 5b2652a1a4b..691614b5a9d 100644 --- a/test/cli/samples/deconflict-entry-point-in-subdir/_config.js +++ b/test/cli/samples/deconflict-entry-point-in-subdir/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflict entry points with the same name in different directories', command: 'rollup --input main.js --input sub/main.js --format es --dir _actual' }); diff --git a/test/cli/samples/duplicate-import-options/_config.js b/test/cli/samples/duplicate-import-options/_config.js index 6814bba2d15..bcc81aa5679 100644 --- a/test/cli/samples/duplicate-import-options/_config.js +++ b/test/cli/samples/duplicate-import-options/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws if different types of entries are combined', command: 'rollup main.js --format es --input main.js', error: () => true, diff --git a/test/cli/samples/emit-file-multiple-dirs/_config.js b/test/cli/samples/emit-file-multiple-dirs/_config.js index d5f4f63f9fb..021f8f92fbd 100644 --- a/test/cli/samples/emit-file-multiple-dirs/_config.js +++ b/test/cli/samples/emit-file-multiple-dirs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'writes files emitted by plugins in different output dirs', command: 'rollup -c' }); diff --git a/test/cli/samples/empty-chunk-multiple/_config.js b/test/cli/samples/empty-chunk-multiple/_config.js index 1863196f92c..9a27c125145 100644 --- a/test/cli/samples/empty-chunk-multiple/_config.js +++ b/test/cli/samples/empty-chunk-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'shows warning when multiple chunks empty', command: 'rollup -c', error: () => true, diff --git a/test/cli/samples/empty-chunk/_config.js b/test/cli/samples/empty-chunk/_config.js index 5220c40467f..7a2e3d50f9c 100644 --- a/test/cli/samples/empty-chunk/_config.js +++ b/test/cli/samples/empty-chunk/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'shows warning when chunk empty', command: 'rollup -c', error: () => true, diff --git a/test/cli/samples/external-modules-auto-global/_config.js b/test/cli/samples/external-modules-auto-global/_config.js index 7aa41a0d0dd..610d1a88c41 100644 --- a/test/cli/samples/external-modules-auto-global/_config.js +++ b/test/cli/samples/external-modules-auto-global/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'populates options.external with --global keys', command: 'rollup main.js --format iife --globals mathematics:Math,promises:Promise --external promises', diff --git a/test/cli/samples/external-modules/_config.js b/test/cli/samples/external-modules/_config.js index 9b03c93528a..d4d118c9d7c 100644 --- a/test/cli/samples/external-modules/_config.js +++ b/test/cli/samples/external-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows external modules to be specified with --external=foo,bar,baz', command: 'rollup main.js --format cjs --external=path,util', execute: true, diff --git a/test/cli/samples/fail-after-warnings/_config.js b/test/cli/samples/fail-after-warnings/_config.js index bec5070e370..a691f17f6b0 100644 --- a/test/cli/samples/fail-after-warnings/_config.js +++ b/test/cli/samples/fail-after-warnings/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'errors on warnings with --failAfterWarnings', command: 'rollup -i main.js --failAfterWarnings', error: () => true, diff --git a/test/cli/samples/format-aliases/_config.js b/test/cli/samples/format-aliases/_config.js index 2dc28220619..3385c838d78 100644 --- a/test/cli/samples/format-aliases/_config.js +++ b/test/cli/samples/format-aliases/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports format aliases', command: 'rollup --config' }); diff --git a/test/cli/samples/generated-code-preset-override/_config.js b/test/cli/samples/generated-code-preset-override/_config.js index cdcd9c5bd14..88324d35763 100644 --- a/test/cli/samples/generated-code-preset-override/_config.js +++ b/test/cli/samples/generated-code-preset-override/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'overrides the generatedCode option when using presets', command: 'rollup --config --generatedCode es5 --generatedCode.arrowFunctions' }); diff --git a/test/cli/samples/generated-code-unknown-preset/_config.js b/test/cli/samples/generated-code-unknown-preset/_config.js index 4b5dba0e6c3..59097909324 100644 --- a/test/cli/samples/generated-code-unknown-preset/_config.js +++ b/test/cli/samples/generated-code-unknown-preset/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'overrides the generatedCode option when using presets', command: 'rollup main.js --format es --generatedCode unknown', error: () => true, diff --git a/test/cli/samples/import-esm-package/_config.js b/test/cli/samples/import-esm-package/_config.js index 1fa22b206b6..799eee235bd 100644 --- a/test/cli/samples/import-esm-package/_config.js +++ b/test/cli/samples/import-esm-package/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to import ESM dependencies from transpiled config files', skipIfWindows: true, command: "rollup --config --configPlugin '{transform:c => c}'" diff --git a/test/cli/samples/indent-none/_config.js b/test/cli/samples/indent-none/_config.js index f13384ef19b..8012ec9b115 100644 --- a/test/cli/samples/indent-none/_config.js +++ b/test/cli/samples/indent-none/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disables indentation with --no-indent', command: 'rollup main.js --format umd --no-indent' }); diff --git a/test/cli/samples/interop/_config.js b/test/cli/samples/interop/_config.js index a63fda0fb2c..05758269016 100644 --- a/test/cli/samples/interop/_config.js +++ b/test/cli/samples/interop/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include the interop block', command: 'rollup -i main.js -f cjs --external test --interop default' }); diff --git a/test/cli/samples/log-side-effects/_config.js b/test/cli/samples/log-side-effects/_config.js index d312c4ea748..be96afd8421 100644 --- a/test/cli/samples/log-side-effects/_config.js +++ b/test/cli/samples/log-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'logs side effects', command: 'rollup --config' }); diff --git a/test/cli/samples/merge-deprecations/_config.js b/test/cli/samples/merge-deprecations/_config.js index 167f1573200..e2fe3932b16 100644 --- a/test/cli/samples/merge-deprecations/_config.js +++ b/test/cli/samples/merge-deprecations/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges deprecated with current options', command: 'rollup --config rollup.config.js' }); diff --git a/test/cli/samples/merge-treeshake-false/_config.js b/test/cli/samples/merge-treeshake-false/_config.js index ae63dbecb97..0196a32ef0a 100644 --- a/test/cli/samples/merge-treeshake-false/_config.js +++ b/test/cli/samples/merge-treeshake-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'sets all tree-shaking to false if one option disables it', command: 'rollup main.js --format es --external external --treeshake.moduleSideEffects no-external --no-treeshake --no-treeshake.unknownGlobalSideEffects' diff --git a/test/cli/samples/merge-treeshake/_config.js b/test/cli/samples/merge-treeshake/_config.js index 500a822432d..3ef30501c95 100644 --- a/test/cli/samples/merge-treeshake/_config.js +++ b/test/cli/samples/merge-treeshake/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges treeshake options', command: 'rollup main.js --format es --external external --treeshake.moduleSideEffects no-external --treeshake --no-treeshake.unknownGlobalSideEffects' diff --git a/test/cli/samples/module-name/_config.js b/test/cli/samples/module-name/_config.js index 30f5ff5b252..f00059c308d 100644 --- a/test/cli/samples/module-name/_config.js +++ b/test/cli/samples/module-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generates UMD export with correct name', command: 'rollup main.js --format umd --name myBundle --indent' }); diff --git a/test/cli/samples/multiple-configs/_config.js b/test/cli/samples/multiple-configs/_config.js index ea0274fa471..2b051280552 100644 --- a/test/cli/samples/multiple-configs/_config.js +++ b/test/cli/samples/multiple-configs/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generates output file when multiple configurations are specified and one build fails', command: 'rollup -c', diff --git a/test/cli/samples/multiple-targets-different-plugins/_config.js b/test/cli/samples/multiple-targets-different-plugins/_config.js index 2fd8cf5b839..ef1717d65e5 100644 --- a/test/cli/samples/multiple-targets-different-plugins/_config.js +++ b/test/cli/samples/multiple-targets-different-plugins/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generates multiple output files, only one of which is minified', command: 'rollup -c' }); diff --git a/test/cli/samples/multiple-targets-shared-config/_config.js b/test/cli/samples/multiple-targets-shared-config/_config.js index c9ae22ba67f..c967ec06e1a 100644 --- a/test/cli/samples/multiple-targets-shared-config/_config.js +++ b/test/cli/samples/multiple-targets-shared-config/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses shared config for each target', command: 'rollup -c' }); diff --git a/test/cli/samples/multiple-targets/_config.js b/test/cli/samples/multiple-targets/_config.js index 64dc50541d6..8055513278e 100644 --- a/test/cli/samples/multiple-targets/_config.js +++ b/test/cli/samples/multiple-targets/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generates multiple output files when multiple targets are specified', command: 'rollup -c' }); diff --git a/test/cli/samples/no-color/_config.js b/test/cli/samples/no-color/_config.js index 39afeabc663..243974c0076 100644 --- a/test/cli/samples/no-color/_config.js +++ b/test/cli/samples/no-color/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects the NO_COLOR environment variable', command: 'rollup -i main1.js -i main2.js -f es', env: { FORCE_COLOR: undefined, NO_COLOR: true }, diff --git a/test/cli/samples/no-conflict/_config.js b/test/cli/samples/no-conflict/_config.js index 8afdd40dc89..1c83f52e828 100644 --- a/test/cli/samples/no-conflict/_config.js +++ b/test/cli/samples/no-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects noConflict option', command: 'rollup --config rollup.config.js' }); diff --git a/test/cli/samples/no-strict/_config.js b/test/cli/samples/no-strict/_config.js index 5eabf69084b..d3292d10c04 100644 --- a/test/cli/samples/no-strict/_config.js +++ b/test/cli/samples/no-strict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'use no strict option', command: 'rollup -i main.js -f iife --no-strict --indent' }); diff --git a/test/cli/samples/no-treeshake/_config.js b/test/cli/samples/no-treeshake/_config.js index bdb0e927ded..a43b8ff098d 100644 --- a/test/cli/samples/no-treeshake/_config.js +++ b/test/cli/samples/no-treeshake/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generates IIFE export with all code and overrides config', command: 'rollup -c --no-treeshake' }); diff --git a/test/cli/samples/node-config-auto-prefix/_config.js b/test/cli/samples/node-config-auto-prefix/_config.js index 39f707815b6..01a704703aa 100644 --- a/test/cli/samples/node-config-auto-prefix/_config.js +++ b/test/cli/samples/node-config-auto-prefix/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses config file installed from npm, automatically adding a rollup-config- prefix', command: 'rollup --config node:foo', execute: true diff --git a/test/cli/samples/node-config-not-found/_config.js b/test/cli/samples/node-config-not-found/_config.js index 75a50f6bb67..8f15f8fcefe 100644 --- a/test/cli/samples/node-config-not-found/_config.js +++ b/test/cli/samples/node-config-not-found/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws if a config in node_modules cannot be found', command: 'rollup --config node:baz', error: () => true, diff --git a/test/cli/samples/node-config/_config.js b/test/cli/samples/node-config/_config.js index 72f70540846..3c64202229b 100644 --- a/test/cli/samples/node-config/_config.js +++ b/test/cli/samples/node-config/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses config file installed from npm', command: 'rollup --config node:bar', cwd: __dirname, diff --git a/test/cli/samples/paths-output-option/_config.js b/test/cli/samples/paths-output-option/_config.js index 7c43df391d3..bd7e413a3ca 100644 --- a/test/cli/samples/paths-output-option/_config.js +++ b/test/cli/samples/paths-output-option/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows paths to be set as an output option', command: 'rollup --config rollup.config.js' }); diff --git a/test/cli/samples/plugin/absolute-esm/_config.js b/test/cli/samples/plugin/absolute-esm/_config.js index 37141c0536e..4d26c4ec133 100644 --- a/test/cli/samples/plugin/absolute-esm/_config.js +++ b/test/cli/samples/plugin/absolute-esm/_config.js @@ -1,6 +1,6 @@ const { sep } = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ESM CLI --plugin /absolute/path', command: `rollup main.js -p "${__dirname}${sep}my-esm-plugin.mjs={comment: 'Absolute ESM'}"` }); diff --git a/test/cli/samples/plugin/absolute/_config.js b/test/cli/samples/plugin/absolute/_config.js index 17e62026b24..63e8931820c 100644 --- a/test/cli/samples/plugin/absolute/_config.js +++ b/test/cli/samples/plugin/absolute/_config.js @@ -1,6 +1,6 @@ const { sep } = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'CLI --plugin /absolute/path', command: `rollup main.js -p "${__dirname}${sep}my-plugin.js={VALUE: 'absolute', ZZZ: 1}"` }); diff --git a/test/cli/samples/plugin/advanced-esm/_config.js b/test/cli/samples/plugin/advanced-esm/_config.js index e01a4c16d2b..c5f8b989499 100644 --- a/test/cli/samples/plugin/advanced-esm/_config.js +++ b/test/cli/samples/plugin/advanced-esm/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'load an ESM-only rollup plugin from node_modules as well as CJS plugins', skipIfWindows: true, diff --git a/test/cli/samples/plugin/advanced/_config.js b/test/cli/samples/plugin/advanced/_config.js index d9414aaae75..448ab2ef5af 100644 --- a/test/cli/samples/plugin/advanced/_config.js +++ b/test/cli/samples/plugin/advanced/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'advanced CLI --plugin functionality with rollup config', command: `rollup -c -p node-resolve,commonjs -p "terser={output: {beautify: true, indent_level: 2}}"` }); diff --git a/test/cli/samples/plugin/basic/_config.js b/test/cli/samples/plugin/basic/_config.js index 0000f9c15be..9ed1c48800e 100644 --- a/test/cli/samples/plugin/basic/_config.js +++ b/test/cli/samples/plugin/basic/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'basic CLI --plugin functionality', command: `rollup main.js -f cjs --plugin @rollup/plugin-buble` }); diff --git a/test/cli/samples/plugin/cannot-load/_config.js b/test/cli/samples/plugin/cannot-load/_config.js index 9f85d1de527..0281e5446bc 100644 --- a/test/cli/samples/plugin/cannot-load/_config.js +++ b/test/cli/samples/plugin/cannot-load/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'unknown CLI --plugin results in an error', skipIfWindows: true, command: `echo "console.log(123);" | rollup --plugin foobar`, diff --git a/test/cli/samples/plugin/default-export/_config.js b/test/cli/samples/plugin/default-export/_config.js index d3078d5e22b..c30a5078550 100644 --- a/test/cli/samples/plugin/default-export/_config.js +++ b/test/cli/samples/plugin/default-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'CLI --plugin with default export', skipIfWindows: true, command: `echo 'console.log(VALUE);' | rollup -p "./my-plugin={VALUE: 'default', ZZZ: 1}"` diff --git a/test/cli/samples/plugin/export-not-found/_config.js b/test/cli/samples/plugin/export-not-found/_config.js index 8dfa0ec70af..fbffef44ec8 100644 --- a/test/cli/samples/plugin/export-not-found/_config.js +++ b/test/cli/samples/plugin/export-not-found/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Throws when the plugin export cannot be found', skipIfWindows: true, command: `echo 'console.log("ignored");' | rollup -p "./my-missing-plugin"`, diff --git a/test/cli/samples/plugin/invalid-argument/_config.js b/test/cli/samples/plugin/invalid-argument/_config.js index 7ef2b12004f..a6e103e73a6 100644 --- a/test/cli/samples/plugin/invalid-argument/_config.js +++ b/test/cli/samples/plugin/invalid-argument/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'invalid CLI --plugin argument format', skipIfWindows: true, command: `echo "console.log(123);" | rollup --plugin 'foo bar'`, diff --git a/test/cli/samples/plugin/object/_config.js b/test/cli/samples/plugin/object/_config.js index a46d76b3b39..935d3d82c89 100644 --- a/test/cli/samples/plugin/object/_config.js +++ b/test/cli/samples/plugin/object/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'CLI --plugin object', skipIfWindows: true, command: `echo 'console.log(42);' | rollup -f cjs -p '{transform: c => c + String.fromCharCode(10) + c}'` diff --git a/test/cli/samples/plugin/relative-camelized/_config.js b/test/cli/samples/plugin/relative-camelized/_config.js index 28047b247c6..b6f0e4b8fa3 100644 --- a/test/cli/samples/plugin/relative-camelized/_config.js +++ b/test/cli/samples/plugin/relative-camelized/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles plugins where the export name is the camelized file name', skipIfWindows: true, command: diff --git a/test/cli/samples/plugin/relative-esm/_config.js b/test/cli/samples/plugin/relative-esm/_config.js index c4bc44cc88e..2ba56b771ce 100644 --- a/test/cli/samples/plugin/relative-esm/_config.js +++ b/test/cli/samples/plugin/relative-esm/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ESM CLI --plugin ../relative/path', skipIfWindows: true, command: `echo 'console.log(1 ? 2 : 3);' | rollup -p "../absolute-esm/my-esm-plugin.mjs={comment: 'Relative ESM'}"` diff --git a/test/cli/samples/plugin/relative/_config.js b/test/cli/samples/plugin/relative/_config.js index ccc3dfd5bdb..fb09dc5b717 100644 --- a/test/cli/samples/plugin/relative/_config.js +++ b/test/cli/samples/plugin/relative/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'CLI --plugin ../relative/path', skipIfWindows: true, command: `echo 'console.log(VALUE);' | rollup -p "../absolute/my-plugin={VALUE: 'relative', ZZZ: 1}"` diff --git a/test/cli/samples/property-read-side-effects/_config.js b/test/cli/samples/property-read-side-effects/_config.js index 0be8c64d676..3f5fc3d58f9 100644 --- a/test/cli/samples/property-read-side-effects/_config.js +++ b/test/cli/samples/property-read-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows disabling side-effects when accessing properties', command: 'rollup main.js --format es --no-treeshake.propertyReadSideEffects' }); diff --git a/test/cli/samples/propertyReadSideEffects-always/_config.js b/test/cli/samples/propertyReadSideEffects-always/_config.js index 8b9442a0d5c..1c1c85a86c4 100644 --- a/test/cli/samples/propertyReadSideEffects-always/_config.js +++ b/test/cli/samples/propertyReadSideEffects-always/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'verify property accesses are retained for getters with side effects', command: `rollup main.js --validate --treeshake.propertyReadSideEffects=always` }); diff --git a/test/cli/samples/silent-onwarn/_config.js b/test/cli/samples/silent-onwarn/_config.js index d31fa5e613f..dfde8172a3a 100644 --- a/test/cli/samples/silent-onwarn/_config.js +++ b/test/cli/samples/silent-onwarn/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'triggers onwarn with --silent', command: 'rollup -c --silent', stderr: stderr => { diff --git a/test/cli/samples/silent/_config.js b/test/cli/samples/silent/_config.js index 515b2dd7b0e..e16f664b934 100644 --- a/test/cli/samples/silent/_config.js +++ b/test/cli/samples/silent/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not print warnings with --silent', command: 'rollup -i main.js -f cjs --silent', stderr: stderr => { diff --git a/test/cli/samples/sourcemap-hidden/_config.js b/test/cli/samples/sourcemap-hidden/_config.js index 12a2a3499ac..3b221c556e0 100644 --- a/test/cli/samples/sourcemap-hidden/_config.js +++ b/test/cli/samples/sourcemap-hidden/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { readFileSync, unlinkSync } = require('node:fs'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'omits sourcemap comments', command: 'rollup -i main.js -f es -m hidden -o output.js', test() { diff --git a/test/cli/samples/sourcemap-newline/_config.js b/test/cli/samples/sourcemap-newline/_config.js index 3c2f6459c9b..4249a9a6dd0 100644 --- a/test/cli/samples/sourcemap-newline/_config.js +++ b/test/cli/samples/sourcemap-newline/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds a newline after the sourceMappingURL comment (#756)', command: 'rollup -i main.js -f es -m inline', result: code => { diff --git a/test/cli/samples/stdin/commonjs/_config.js b/test/cli/samples/stdin/commonjs/_config.js index 21e68564a25..1fd14514f58 100644 --- a/test/cli/samples/stdin/commonjs/_config.js +++ b/test/cli/samples/stdin/commonjs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses stdin to inline a require()', skipIfWindows: true, command: `echo 'console.log(require("./add.js")(2, 1));' | rollup --stdin=js -p commonjs -f cjs --exports=auto` diff --git a/test/cli/samples/stdin/config-file/_config.js b/test/cli/samples/stdin/config-file/_config.js index 0f614efc1f8..ae73172b6dd 100644 --- a/test/cli/samples/stdin/config-file/_config.js +++ b/test/cli/samples/stdin/config-file/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not replace input with stdin but allows referencing it when using a config file', skipIfWindows: true, diff --git a/test/cli/samples/stdin/force-stdin-tty/_config.js b/test/cli/samples/stdin/force-stdin-tty/_config.js index 7a5785b595f..65d6b5f2314 100644 --- a/test/cli/samples/stdin/force-stdin-tty/_config.js +++ b/test/cli/samples/stdin/force-stdin-tty/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows forcing stdin input on TTY interfaces via option', skipIfWindows: true, command: `echo "console.log('PASS');" | ./wrapper.js -f es --stdin` diff --git a/test/cli/samples/stdin/json/_config.js b/test/cli/samples/stdin/json/_config.js index 45b3b41e652..00f0d2528d0 100644 --- a/test/cli/samples/stdin/json/_config.js +++ b/test/cli/samples/stdin/json/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'pipe JSON over stdin to create a module', skipIfWindows: true, command: `echo '{"foo": 42, "bar": "ok"}' | rollup --stdin=json -p json` diff --git a/test/cli/samples/stdin/no-dash/_config.js b/test/cli/samples/stdin/no-dash/_config.js index 1ea321667fa..71524f914b5 100644 --- a/test/cli/samples/stdin/no-dash/_config.js +++ b/test/cli/samples/stdin/no-dash/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses stdin input when piping into Rollup without an input', skipIfWindows: true, command: `echo "0 && fail() || console.log('PASS');" | rollup` diff --git a/test/cli/samples/stdin/no-stdin-config-file/_config.js b/test/cli/samples/stdin/no-stdin-config-file/_config.js index cc5e7292995..ead4a2e286a 100644 --- a/test/cli/samples/stdin/no-stdin-config-file/_config.js +++ b/test/cli/samples/stdin/no-stdin-config-file/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows using "-" as a regular file name via flag', skipIfWindows: true, command: `echo "console.log('IGNORED');" | rollup -c --no-stdin` diff --git a/test/cli/samples/stdin/no-stdin-tty/_config.js b/test/cli/samples/stdin/no-stdin-tty/_config.js index d89b31df15f..3a78e0ab7d8 100644 --- a/test/cli/samples/stdin/no-stdin-tty/_config.js +++ b/test/cli/samples/stdin/no-stdin-tty/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use input as stdin on TTY interfaces', skipIfWindows: true, command: `echo "console.log('PASS');" | ./wrapper.js -f es`, diff --git a/test/cli/samples/stdin/self-import/_config.js b/test/cli/samples/stdin/self-import/_config.js index 69ca91769e1..ec1f5195976 100644 --- a/test/cli/samples/stdin/self-import/_config.js +++ b/test/cli/samples/stdin/self-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'stdin input of code that imports a copy of itself', skipIfWindows: true, command: `cat input.txt | rollup -f cjs --silent` diff --git a/test/cli/samples/stdin/stdin-error/_config.js b/test/cli/samples/stdin/stdin-error/_config.js index a379ca72efb..116566d816c 100644 --- a/test/cli/samples/stdin/stdin-error/_config.js +++ b/test/cli/samples/stdin/stdin-error/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles stdin errors', command: `node wrapper.js`, error(error) { diff --git a/test/cli/samples/stdin/with-dash/_config.js b/test/cli/samples/stdin/with-dash/_config.js index dac20b7aef4..780147e9ed8 100644 --- a/test/cli/samples/stdin/with-dash/_config.js +++ b/test/cli/samples/stdin/with-dash/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'stdin input with dash on CLI', skipIfWindows: true, command: `echo "0 && fail() || console.log('PASS');" | rollup -` diff --git a/test/cli/samples/stdout-code-splitting/_config.js b/test/cli/samples/stdout-code-splitting/_config.js index 1d116d0fbb8..597aa432073 100644 --- a/test/cli/samples/stdout-code-splitting/_config.js +++ b/test/cli/samples/stdout-code-splitting/_config.js @@ -3,7 +3,7 @@ const assert = require('node:assert'); const COLOR = '\u001B[36m\u001B[1m'; const STANDARD = '\u001B[22m\u001B[39m'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'bundles multiple files to stdout while adding file names', skipIfWindows: true, command: diff --git a/test/cli/samples/stdout-only-inline-sourcemaps/_config.js b/test/cli/samples/stdout-only-inline-sourcemaps/_config.js index 591920f7b1c..8e945ad5b97 100644 --- a/test/cli/samples/stdout-only-inline-sourcemaps/_config.js +++ b/test/cli/samples/stdout-only-inline-sourcemaps/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'fails when using non-inline sourcemaps when bundling to stdout', command: 'rollup -i main.js -f es -m', error: () => true, diff --git a/test/cli/samples/stdout-single-input/_config.js b/test/cli/samples/stdout-single-input/_config.js index 69fcbc24e6c..8b28aaf07ab 100644 --- a/test/cli/samples/stdout-single-input/_config.js +++ b/test/cli/samples/stdout-single-input/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'bundles a single input to stdout without modifications', command: 'rollup -i main.js -f es -m inline' }); diff --git a/test/cli/samples/symlinked-config/_config.js b/test/cli/samples/symlinked-config/_config.js index aeb39bb6387..eac8148ee67 100644 --- a/test/cli/samples/symlinked-config/_config.js +++ b/test/cli/samples/symlinked-config/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'loads a symlinked config file', command: 'rollup -c --bundleConfigAsCjs', execute: true diff --git a/test/cli/samples/symlinked-named-config/_config.js b/test/cli/samples/symlinked-named-config/_config.js index de9ffa23d1a..ce2277bf94b 100644 --- a/test/cli/samples/symlinked-named-config/_config.js +++ b/test/cli/samples/symlinked-named-config/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'loads a symlinked config file with the given name', command: 'rollup --config my.rollup.config.js --bundleConfigAsCjs', execute: true diff --git a/test/cli/samples/treeshake-preset-override/_config.js b/test/cli/samples/treeshake-preset-override/_config.js index 7f4bca1187a..236ccabcf16 100644 --- a/test/cli/samples/treeshake-preset-override/_config.js +++ b/test/cli/samples/treeshake-preset-override/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'overrides the treeshake option when using presets', command: 'rollup --config --treeshake recommended --treeshake.unknownGlobalSideEffects --no-treeshake.moduleSideEffects' diff --git a/test/cli/samples/treeshake-unknown-preset/_config.js b/test/cli/samples/treeshake-unknown-preset/_config.js index 35bd3ecaf65..4c02801f011 100644 --- a/test/cli/samples/treeshake-unknown-preset/_config.js +++ b/test/cli/samples/treeshake-unknown-preset/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'overrides the treeshake option when using presets', command: 'rollup main.js --format es --treeshake unknown', error: () => true, diff --git a/test/cli/samples/unfulfilled-hook-actions-error/_config.js b/test/cli/samples/unfulfilled-hook-actions-error/_config.js index f6adcf5ea83..a0231f2fbab 100644 --- a/test/cli/samples/unfulfilled-hook-actions-error/_config.js +++ b/test/cli/samples/unfulfilled-hook-actions-error/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { assertIncludes, assertDoesNotInclude } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not show unfulfilled hook actions if there are errors', command: 'node build.mjs', after(error) { diff --git a/test/cli/samples/unfulfilled-hook-actions-manual-exit/_config.js b/test/cli/samples/unfulfilled-hook-actions-manual-exit/_config.js index c804c39e419..f924a3f4657 100644 --- a/test/cli/samples/unfulfilled-hook-actions-manual-exit/_config.js +++ b/test/cli/samples/unfulfilled-hook-actions-manual-exit/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const { assertDoesNotInclude } = require('../../../utils'); const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not show unfulfilled hook actions when exiting manually with a non-zero exit code', command: 'rollup -c --silent', diff --git a/test/cli/samples/unfulfilled-hook-actions/_config.js b/test/cli/samples/unfulfilled-hook-actions/_config.js index 1aa7e6c76d3..9a093ed7afe 100644 --- a/test/cli/samples/unfulfilled-hook-actions/_config.js +++ b/test/cli/samples/unfulfilled-hook-actions/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'show errors with non-zero exit code for unfulfilled async plugin actions on exit', command: 'rollup -c --silent', after(error) { diff --git a/test/cli/samples/validate/_config.js b/test/cli/samples/validate/_config.js index ccf21b02005..5fb3da2f69b 100644 --- a/test/cli/samples/validate/_config.js +++ b/test/cli/samples/validate/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'use CLI --validate to test whether output is well formed', skipIfWindows: true, command: `rollup main.js --silent --outro 'console.log("end"); /*' -o _actual/out.js --validate`, diff --git a/test/cli/samples/wait-for-bundle-input-object/_config.js b/test/cli/samples/wait-for-bundle-input-object/_config.js index c87e90a0f8e..2596753440f 100644 --- a/test/cli/samples/wait-for-bundle-input-object/_config.js +++ b/test/cli/samples/wait-for-bundle-input-object/_config.js @@ -5,7 +5,7 @@ const { atomicWriteFileSync } = require('../../../utils'); let second; let third; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'waits for multiple named bundle inputs', command: 'rollup -c --waitForBundleInput', before() { diff --git a/test/cli/samples/wait-for-bundle-input/_config.js b/test/cli/samples/wait-for-bundle-input/_config.js index c56823ed94d..1e7538e0c41 100644 --- a/test/cli/samples/wait-for-bundle-input/_config.js +++ b/test/cli/samples/wait-for-bundle-input/_config.js @@ -4,7 +4,7 @@ const { atomicWriteFileSync } = require('../../../utils'); let mainFile; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'waits for bundle input', command: 'rollup -c --waitForBundleInput', before() { diff --git a/test/cli/samples/warn-broken-sourcemap/_config.js b/test/cli/samples/warn-broken-sourcemap/_config.js index 36de59ce3f5..96b1bb07d5a 100644 --- a/test/cli/samples/warn-broken-sourcemap/_config.js +++ b/test/cli/samples/warn-broken-sourcemap/_config.js @@ -2,7 +2,7 @@ const { unlinkSync } = require('node:fs'); const path = require('node:path'); const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'displays warnings for broken sourcemaps', command: 'rollup -c', stderr: stderr => { diff --git a/test/cli/samples/warn-broken-sourcemaps/_config.js b/test/cli/samples/warn-broken-sourcemaps/_config.js index fa77899e6c4..98441384b3e 100644 --- a/test/cli/samples/warn-broken-sourcemaps/_config.js +++ b/test/cli/samples/warn-broken-sourcemaps/_config.js @@ -2,7 +2,7 @@ const { unlinkSync } = require('node:fs'); const path = require('node:path'); const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'displays warnings for broken sourcemaps', command: 'rollup -c', stderr: stderr => { diff --git a/test/cli/samples/warn-circular-multiple/_config.js b/test/cli/samples/warn-circular-multiple/_config.js index 738d42abf8e..6922df7811b 100644 --- a/test/cli/samples/warn-circular-multiple/_config.js +++ b/test/cli/samples/warn-circular-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns for multiple circular dependencies', command: 'rollup -c', stderr: stderr => diff --git a/test/cli/samples/warn-circular/_config.js b/test/cli/samples/warn-circular/_config.js index e6c0f1d3134..b92d9f3eecc 100644 --- a/test/cli/samples/warn-circular/_config.js +++ b/test/cli/samples/warn-circular/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns for circular dependencies', command: 'rollup -c', stderr(stderr) { diff --git a/test/cli/samples/warn-eval-multiple/_config.js b/test/cli/samples/warn-eval-multiple/_config.js index 19d4b3ede64..2366fee118f 100644 --- a/test/cli/samples/warn-eval-multiple/_config.js +++ b/test/cli/samples/warn-eval-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when eval is used multiple times', command: 'rollup -c', stderr: stderr => diff --git a/test/cli/samples/warn-eval/_config.js b/test/cli/samples/warn-eval/_config.js index 11731ed57cb..1f3bfdf3927 100644 --- a/test/cli/samples/warn-eval/_config.js +++ b/test/cli/samples/warn-eval/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when eval is used', command: 'rollup -c', stderr: stderr => diff --git a/test/cli/samples/warn-import-export/_config.js b/test/cli/samples/warn-import-export/_config.js index 3b7ce9db6e1..a0509bef540 100644 --- a/test/cli/samples/warn-import-export/_config.js +++ b/test/cli/samples/warn-import-export/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns about import and export related issues', command: 'rollup -c', stderr: stderr => { diff --git a/test/cli/samples/warn-missing-global-multiple/_config.js b/test/cli/samples/warn-missing-global-multiple/_config.js index 0651d1b9dec..2114d64aac0 100644 --- a/test/cli/samples/warn-missing-global-multiple/_config.js +++ b/test/cli/samples/warn-missing-global-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when there are multiple missing globals', command: 'rollup -c', stderr: stderr => diff --git a/test/cli/samples/warn-missing-global/_config.js b/test/cli/samples/warn-missing-global/_config.js index 9a810684ce5..8506ae1f1fb 100644 --- a/test/cli/samples/warn-missing-global/_config.js +++ b/test/cli/samples/warn-missing-global/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when there is a missing global variable name', command: 'rollup -c', stderr: stderr => diff --git a/test/cli/samples/warn-mixed-exports-multiple/_config.js b/test/cli/samples/warn-mixed-exports-multiple/_config.js index 54f0039d3bd..3aa16c21fc1 100644 --- a/test/cli/samples/warn-mixed-exports-multiple/_config.js +++ b/test/cli/samples/warn-mixed-exports-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when mixed exports are used', command: 'rollup -c', stderr: stderr => { diff --git a/test/cli/samples/warn-multiple/_config.js b/test/cli/samples/warn-multiple/_config.js index a222e84b60c..d069fc6035b 100644 --- a/test/cli/samples/warn-multiple/_config.js +++ b/test/cli/samples/warn-multiple/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'aggregates warnings of different types', command: 'rollup -c', stderr: stderr => { diff --git a/test/cli/samples/warn-plugin-loc/_config.js b/test/cli/samples/warn-plugin-loc/_config.js index 4dd243aedb3..2e773991428 100644 --- a/test/cli/samples/warn-plugin-loc/_config.js +++ b/test/cli/samples/warn-plugin-loc/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly adds locations to plugin warnings', command: 'rollup -c', stderr: stderr => { diff --git a/test/cli/samples/warn-plugin/_config.js b/test/cli/samples/warn-plugin/_config.js index 4638b1c35b9..2b4760ab4be 100644 --- a/test/cli/samples/warn-plugin/_config.js +++ b/test/cli/samples/warn-plugin/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'displays warnings from plugins', command: 'rollup -c', stderr: stderr => diff --git a/test/cli/samples/warn-this/_config.js b/test/cli/samples/warn-this/_config.js index 777c725cf4b..021269a0606 100644 --- a/test/cli/samples/warn-this/_config.js +++ b/test/cli/samples/warn-this/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns "this" is used on the top level', command: 'rollup -c', stderr: stderr => diff --git a/test/cli/samples/warn-unknown-options/_config.js b/test/cli/samples/warn-unknown-options/_config.js index a830b3183a9..2f8284348e9 100644 --- a/test/cli/samples/warn-unknown-options/_config.js +++ b/test/cli/samples/warn-unknown-options/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns about unknown CLI options', command: 'rollup --config rollup.config.js --format es --configAnswer 42 --unknownOption' }); diff --git a/test/cli/samples/watch/bundle-error/_config.js b/test/cli/samples/watch/bundle-error/_config.js index 5fa2ef620d9..09425be2612 100644 --- a/test/cli/samples/watch/bundle-error/_config.js +++ b/test/cli/samples/watch/bundle-error/_config.js @@ -4,7 +4,7 @@ const { atomicWriteFileSync } = require('../../../../utils'); let mainFile; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'recovers from errors during bundling', command: 'rollup -cw --bundleConfigAsCjs', before() { diff --git a/test/cli/samples/watch/clearScreen/_config.js b/test/cli/samples/watch/clearScreen/_config.js index 4dd319baf93..92ee02ced74 100644 --- a/test/cli/samples/watch/clearScreen/_config.js +++ b/test/cli/samples/watch/clearScreen/_config.js @@ -3,7 +3,7 @@ const assert = require('node:assert'); const CLEAR_SCREEN = '\u001Bc'; const UNDERLINE = '\u001B[4m'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'clears the screen before bundling', command: 'node wrapper.js -cw', env: { FORCE_COLOR: '1', TERM: 'xterm' }, diff --git a/test/cli/samples/watch/close-error/_config.js b/test/cli/samples/watch/close-error/_config.js index 1ccedbfd460..c7d16051421 100644 --- a/test/cli/samples/watch/close-error/_config.js +++ b/test/cli/samples/watch/close-error/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'displays errors when closing the watcher', command: 'rollup -cw', abortOnStderr(data) { diff --git a/test/cli/samples/watch/close-on-generate-error/_config.js b/test/cli/samples/watch/close-on-generate-error/_config.js index 1a1075181d1..458dda70c51 100644 --- a/test/cli/samples/watch/close-on-generate-error/_config.js +++ b/test/cli/samples/watch/close-on-generate-error/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'closes the bundle on generate errors', command: 'rollup -cw', abortOnStderr(data) { diff --git a/test/cli/samples/watch/close-stdin/_config.js b/test/cli/samples/watch/close-stdin/_config.js index 2af5dbb7e53..9ccc16e4fd8 100644 --- a/test/cli/samples/watch/close-stdin/_config.js +++ b/test/cli/samples/watch/close-stdin/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'closes the watcher when stdin closes', retry: true, command: 'node wrapper.js main.js --watch --format es --file _actual/out.js' diff --git a/test/cli/samples/watch/no-clearScreen-command/_config.js b/test/cli/samples/watch/no-clearScreen-command/_config.js index ed6eba8741f..ca121bf2cdc 100644 --- a/test/cli/samples/watch/no-clearScreen-command/_config.js +++ b/test/cli/samples/watch/no-clearScreen-command/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const UNDERLINE = '\u001B[4m'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows disabling clearing the screen from the command line', command: 'node wrapper.js main.js --format es --file _actual.js --watch --no-watch.clearScreen', env: { FORCE_COLOR: '1', TERM: 'xterm' }, diff --git a/test/cli/samples/watch/no-clearScreen/_config.js b/test/cli/samples/watch/no-clearScreen/_config.js index 6f149fa8d76..e55d9acff3a 100644 --- a/test/cli/samples/watch/no-clearScreen/_config.js +++ b/test/cli/samples/watch/no-clearScreen/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const UNDERLINE = '\u001B[4m'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows disabling clearing the screen', command: 'node wrapper.js -cw', env: { FORCE_COLOR: '1', TERM: 'xterm' }, diff --git a/test/cli/samples/watch/no-config-file/_config.js b/test/cli/samples/watch/no-config-file/_config.js index 738c7431540..8c5aeefdd91 100644 --- a/test/cli/samples/watch/no-config-file/_config.js +++ b/test/cli/samples/watch/no-config-file/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'watches without a config file', command: 'rollup main.js --watch --format es --file _actual/main.js', abortOnStderr(data) { diff --git a/test/cli/samples/watch/no-watch-by-default/_config.js b/test/cli/samples/watch/no-watch-by-default/_config.js index 62655fc2f26..7f38a585cad 100644 --- a/test/cli/samples/watch/no-watch-by-default/_config.js +++ b/test/cli/samples/watch/no-watch-by-default/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not watch if --watch is missing', command: 'node wrapper.js -c --no-watch.clearScreen', stderr: stderr => assertIncludes(stderr, 'main.js → _actual.js...\ncreated _actual.js in'), diff --git a/test/cli/samples/watch/no-watched-config/_config.js b/test/cli/samples/watch/no-watched-config/_config.js index 70aaacada41..16105ce3fec 100644 --- a/test/cli/samples/watch/no-watched-config/_config.js +++ b/test/cli/samples/watch/no-watched-config/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws if no config is watched', command: 'rollup -cw', error: () => true, diff --git a/test/cli/samples/watch/node-config-file/_config.js b/test/cli/samples/watch/node-config-file/_config.js index c46133e5587..cfc9cfd8a06 100644 --- a/test/cli/samples/watch/node-config-file/_config.js +++ b/test/cli/samples/watch/node-config-file/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'watches using a node_modules config files', command: 'rollup --watch --config node:custom', abortOnStderr(data) { diff --git a/test/cli/samples/watch/watch-config-early-update/_config.js b/test/cli/samples/watch/watch-config-early-update/_config.js index 24baa817139..14407dc9eba 100644 --- a/test/cli/samples/watch/watch-config-early-update/_config.js +++ b/test/cli/samples/watch/watch-config-early-update/_config.js @@ -5,7 +5,7 @@ const { wait, writeAndSync, writeAndRetry } = require('../../../../utils'); const configFile = path.join(__dirname, 'rollup.config.mjs'); let stopUpdate; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'immediately reloads the config file if a change happens while it is parsed', command: 'rollup -cw', before() { diff --git a/test/cli/samples/watch/watch-config-error/_config.js b/test/cli/samples/watch/watch-config-error/_config.js index 20c85e245ec..19e46528133 100644 --- a/test/cli/samples/watch/watch-config-error/_config.js +++ b/test/cli/samples/watch/watch-config-error/_config.js @@ -4,7 +4,7 @@ const { atomicWriteFileSync } = require('../../../../utils'); let configFile; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps watching the config file in case the config is changed to an invalid state', command: 'rollup -cw', before() { diff --git a/test/cli/samples/watch/watch-config-initial-error/_config.js b/test/cli/samples/watch/watch-config-initial-error/_config.js index c798a95b319..54fd977b695 100644 --- a/test/cli/samples/watch/watch-config-initial-error/_config.js +++ b/test/cli/samples/watch/watch-config-initial-error/_config.js @@ -4,7 +4,7 @@ const { atomicWriteFileSync } = require('../../../../utils'); let configFile; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps watching the config file in case the initial file contains an error', command: 'rollup -cw', before() { diff --git a/test/cli/samples/watch/watch-config-no-update/_config.js b/test/cli/samples/watch/watch-config-no-update/_config.js index 5946c0c1310..5c49f13ca02 100644 --- a/test/cli/samples/watch/watch-config-no-update/_config.js +++ b/test/cli/samples/watch/watch-config-no-update/_config.js @@ -12,7 +12,7 @@ const configContent = '\t}\n' + '};'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not rebuild if the config file is updated without change', command: 'rollup -cw', before() { diff --git a/test/cli/samples/watch/watch-event-hooks-error/_config.js b/test/cli/samples/watch/watch-event-hooks-error/_config.js index cfd33d0dd77..7c438f181ca 100644 --- a/test/cli/samples/watch/watch-event-hooks-error/_config.js +++ b/test/cli/samples/watch/watch-event-hooks-error/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'onError event hook shell commands write to stderr', command: 'node wrapper.js -cw --watch.onError "echo error"', abortOnStderr(data) { diff --git a/test/cli/samples/watch/watch-event-hooks/_config.js b/test/cli/samples/watch/watch-event-hooks/_config.js index 8f5d17d02cb..917301e9e74 100644 --- a/test/cli/samples/watch/watch-event-hooks/_config.js +++ b/test/cli/samples/watch/watch-event-hooks/_config.js @@ -1,6 +1,6 @@ const { assertIncludes } = require('../../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'event hook shell commands write to stderr', retry: true, command: diff --git a/test/cli/tsconfig.json b/test/cli/tsconfig.json new file mode 100644 index 00000000000..4a26f3ee84c --- /dev/null +++ b/test/cli/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "include": [ + "**/_config.js", + "./index.js", + "./define.d.ts" + ] +} diff --git a/test/file-hashes/define.d.ts b/test/file-hashes/define.d.ts new file mode 100644 index 00000000000..e44c14045fa --- /dev/null +++ b/test/file-hashes/define.d.ts @@ -0,0 +1,5 @@ +import type { TestConfigFileHash } from '../types'; + +declare global { + function defineTest(config: TestConfigFileHash): TestConfigFileHash; +} diff --git a/test/file-hashes/index.js b/test/file-hashes/index.js index 8dbe2d11709..74e5ed61446 100644 --- a/test/file-hashes/index.js +++ b/test/file-hashes/index.js @@ -5,46 +5,53 @@ const path = require('node:path'); const rollup = require('../../dist/rollup'); const { runTestSuiteWithSamples } = require('../utils.js'); -runTestSuiteWithSamples('file hashes', path.resolve(__dirname, 'samples'), (directory, config) => { - (config.skip ? describe.skip : config.solo ? describe.only : describe)( - path.basename(directory) + ': ' + config.description, - () => { - it(`generates correct hashes`, () => { - process.chdir(directory); - return Promise.all( - [config.options1, config.options2].map(options => - rollup.rollup(options).then(bundle => - bundle.generate({ - format: 'es', - chunkFileNames: '[hash]', - entryFileNames: '[hash]', - ...options.output - }) +runTestSuiteWithSamples( + 'file hashes', + path.resolve(__dirname, 'samples'), + /** + * @param {import('../types').TestConfigFileHash} config + */ + (directory, config) => { + (config.skip ? describe.skip : config.solo ? describe.only : describe)( + path.basename(directory) + ': ' + config.description, + () => { + it(`generates correct hashes`, () => { + process.chdir(directory); + return Promise.all( + [config.options1, config.options2].map(options => + rollup.rollup(options).then(bundle => + bundle.generate({ + format: 'es', + chunkFileNames: '[hash]', + entryFileNames: '[hash]', + ...options.output + }) + ) ) - ) - ).then(([generated1, generated2]) => { - const fileContentsByHash = new Map(); - addFileContentsByFileName(fileContentsByHash, generated1); - addFileContentsByFileName(fileContentsByHash, generated2); - if (config.show) { - console.log(fileContentsByHash); - } - for (const contents of fileContentsByHash.values()) { - if (contents.size > 1) { - throw new Error( - `Two chunks contained different code even though the hashes were the same: ${[ - ...contents - ] - .map(JSON.stringify) - .join(' != ')}` - ); + ).then(([generated1, generated2]) => { + const fileContentsByHash = new Map(); + addFileContentsByFileName(fileContentsByHash, generated1); + addFileContentsByFileName(fileContentsByHash, generated2); + if (config.show) { + console.log(fileContentsByHash); } - } + for (const contents of fileContentsByHash.values()) { + if (contents.size > 1) { + throw new Error( + `Two chunks contained different code even though the hashes were the same: ${[ + ...contents + ] + .map(error => JSON.stringify(error)) + .join(' != ')}` + ); + } + } + }); }); - }); - } - ); -}); + } + ); + } +); function addFileContentsByFileName(fileContentsByFileName, generated) { for (const chunk of generated.output) { diff --git a/test/file-hashes/samples/augment-chunk-hash/_config.js b/test/file-hashes/samples/augment-chunk-hash/_config.js index 0b0c5165737..a8fe2f2e7bf 100644 --- a/test/file-hashes/samples/augment-chunk-hash/_config.js +++ b/test/file-hashes/samples/augment-chunk-hash/_config.js @@ -1,7 +1,7 @@ const augment1 = '/*foo*/'; const augment2 = '/*bar*/'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'augmentChunkHash updates hashes across all modules when returning something', options1: { input: 'main', diff --git a/test/file-hashes/samples/banner/_config.js b/test/file-hashes/samples/banner/_config.js index 63a0c11f6ea..b4224453c28 100644 --- a/test/file-hashes/samples/banner/_config.js +++ b/test/file-hashes/samples/banner/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the banner differs', options1: { input: 'main', diff --git a/test/file-hashes/samples/chunk-name/_config.js b/test/file-hashes/samples/chunk-name/_config.js index fd4206a95b2..b1fb6968483 100644 --- a/test/file-hashes/samples/chunk-name/_config.js +++ b/test/file-hashes/samples/chunk-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the name pattern differs', options1: { input: { diff --git a/test/file-hashes/samples/content/_config.js b/test/file-hashes/samples/content/_config.js index d7708439a53..ccc0f9fca85 100644 --- a/test/file-hashes/samples/content/_config.js +++ b/test/file-hashes/samples/content/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the content differs', options1: { input: { main: 'main1', dep: 'dep1' } diff --git a/test/file-hashes/samples/dependency-content/_config.js b/test/file-hashes/samples/dependency-content/_config.js index 82e692bf429..325e0523415 100644 --- a/test/file-hashes/samples/dependency-content/_config.js +++ b/test/file-hashes/samples/dependency-content/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the content of dependencies differs', options1: { input: { main: 'main1', dep: 'dep1' } diff --git a/test/file-hashes/samples/export-order-2/_config.js b/test/file-hashes/samples/export-order-2/_config.js index 871d99f77be..5e4d37e6aad 100644 --- a/test/file-hashes/samples/export-order-2/_config.js +++ b/test/file-hashes/samples/export-order-2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if different variables are exported under the same name', options1: { input: ['main1', 'dep'] diff --git a/test/file-hashes/samples/export-order/_config.js b/test/file-hashes/samples/export-order/_config.js index 5c558313f29..022540c31aa 100644 --- a/test/file-hashes/samples/export-order/_config.js +++ b/test/file-hashes/samples/export-order/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if different variables are exported under the same name', options1: { input: ['main1'] diff --git a/test/file-hashes/samples/exports/_config.js b/test/file-hashes/samples/exports/_config.js index 3bd8c6c3463..bd16c09f922 100644 --- a/test/file-hashes/samples/exports/_config.js +++ b/test/file-hashes/samples/exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the generated exports differ', options1: { input: ['main1', 'other'] diff --git a/test/file-hashes/samples/external-dependency-names/_config.js b/test/file-hashes/samples/external-dependency-names/_config.js index 2fbc7bd04f3..3bf0ce57c8a 100644 --- a/test/file-hashes/samples/external-dependency-names/_config.js +++ b/test/file-hashes/samples/external-dependency-names/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the names of external dependencies differ', options1: { input: { mainA: 'main1a', mainB: 'main1b' }, diff --git a/test/file-hashes/samples/footer/_config.js b/test/file-hashes/samples/footer/_config.js index 0c014a13a36..8d637560b9a 100644 --- a/test/file-hashes/samples/footer/_config.js +++ b/test/file-hashes/samples/footer/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the footer differs', options1: { input: 'main', diff --git a/test/file-hashes/samples/format/_config.js b/test/file-hashes/samples/format/_config.js index 394222f4d5c..bf79a5a8e50 100644 --- a/test/file-hashes/samples/format/_config.js +++ b/test/file-hashes/samples/format/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the format differs', options1: { input: 'main', diff --git a/test/file-hashes/samples/internal-exports/_config.js b/test/file-hashes/samples/internal-exports/_config.js index 2ba1d023e00..0632fb47d0b 100644 --- a/test/file-hashes/samples/internal-exports/_config.js +++ b/test/file-hashes/samples/internal-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if generated internal exports differ', options1: { input: ['main1', 'other'] diff --git a/test/file-hashes/samples/intro/_config.js b/test/file-hashes/samples/intro/_config.js index 9ca52299214..d95710ecb1b 100644 --- a/test/file-hashes/samples/intro/_config.js +++ b/test/file-hashes/samples/intro/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the intro differs', options1: { input: 'main', diff --git a/test/file-hashes/samples/name-pattern/_config.js b/test/file-hashes/samples/name-pattern/_config.js index 7327321bb40..ea118ef4545 100644 --- a/test/file-hashes/samples/name-pattern/_config.js +++ b/test/file-hashes/samples/name-pattern/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the name pattern differs', options1: { input: 'main', diff --git a/test/file-hashes/samples/outro/_config.js b/test/file-hashes/samples/outro/_config.js index f39b65af30e..a7d0c40d7e4 100644 --- a/test/file-hashes/samples/outro/_config.js +++ b/test/file-hashes/samples/outro/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates different hashes if the outro differs', options1: { input: 'main', diff --git a/test/file-hashes/samples/render-chunk-changes/_config.js b/test/file-hashes/samples/render-chunk-changes/_config.js index 754bb293c5e..c0222125e59 100644 --- a/test/file-hashes/samples/render-chunk-changes/_config.js +++ b/test/file-hashes/samples/render-chunk-changes/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reflects changes in renderChunk', options1: { input: 'main', diff --git a/test/file-hashes/tsconfig.json b/test/file-hashes/tsconfig.json new file mode 100644 index 00000000000..4a26f3ee84c --- /dev/null +++ b/test/file-hashes/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "include": [ + "**/_config.js", + "./index.js", + "./define.d.ts" + ] +} diff --git a/test/form/define.d.ts b/test/form/define.d.ts new file mode 100644 index 00000000000..70a9f24e7b0 --- /dev/null +++ b/test/form/define.d.ts @@ -0,0 +1,5 @@ +import type { TestConfigForm } from '../types'; + +declare global { + function defineTest(config: TestConfigForm): TestConfigForm; +} diff --git a/test/form/samples/absolute-path-resolver/_config.js b/test/form/samples/absolute-path-resolver/_config.js index 25b24f1a54f..a55c2a374b0 100644 --- a/test/form/samples/absolute-path-resolver/_config.js +++ b/test/form/samples/absolute-path-resolver/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'normalizes absolute ids', options: { plugins: [ diff --git a/test/form/samples/acorn-external-plugins/_config.js b/test/form/samples/acorn-external-plugins/_config.js index e7e829029f1..2789b15c199 100644 --- a/test/form/samples/acorn-external-plugins/_config.js +++ b/test/form/samples/acorn-external-plugins/_config.js @@ -1,6 +1,6 @@ const jsx = require('acorn-jsx'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports official acorn plugins that may rely on a shared acorn instance', options: { acornInjectPlugins: [jsx()] diff --git a/test/form/samples/addon-functions/_config.js b/test/form/samples/addon-functions/_config.js index 8884d8a6feb..b7c5b899b3b 100644 --- a/test/form/samples/addon-functions/_config.js +++ b/test/form/samples/addon-functions/_config.js @@ -31,7 +31,7 @@ const assertChunkData = chunk => '}' ); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides module information when adding addons', options: { output: { diff --git a/test/form/samples/amd-id-auto/_config.js b/test/form/samples/amd-id-auto/_config.js index 082b6131948..0d8bb4090c8 100644 --- a/test/form/samples/amd-id-auto/_config.js +++ b/test/form/samples/amd-id-auto/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to use amd.autoId', options: { output: { amd: { autoId: true } } } }); diff --git a/test/form/samples/amd-id/_config.js b/test/form/samples/amd-id/_config.js index 187adad03f1..25ebcbd5193 100644 --- a/test/form/samples/amd-id/_config.js +++ b/test/form/samples/amd-id/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to declare an AMD id', options: { output: { amd: { id: 'my-id' } } } }); diff --git a/test/form/samples/amd-keep-extension/_config.js b/test/form/samples/amd-keep-extension/_config.js index 20fe1c5c752..9076ff7fa96 100644 --- a/test/form/samples/amd-keep-extension/_config.js +++ b/test/form/samples/amd-keep-extension/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keep extension for AMD modules', options: { external: ['./relative', 'abso/lute', './relative.js', 'abso/lute.js'], diff --git a/test/form/samples/argument-deoptimization/no-default-deoptimization/_config.js b/test/form/samples/argument-deoptimization/no-default-deoptimization/_config.js index 2f3a78538d3..6d2d48368e9 100644 --- a/test/form/samples/argument-deoptimization/no-default-deoptimization/_config.js +++ b/test/form/samples/argument-deoptimization/no-default-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not deoptimize call arguments by default' }); diff --git a/test/form/samples/argument-deoptimization/no-global-call-deoptimization/_config.js b/test/form/samples/argument-deoptimization/no-global-call-deoptimization/_config.js index deb451145be..0b2c36660ab 100644 --- a/test/form/samples/argument-deoptimization/no-global-call-deoptimization/_config.js +++ b/test/form/samples/argument-deoptimization/no-global-call-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not deoptimize call arguments of calls to globals by default' }); diff --git a/test/form/samples/argument-deoptimization/return-function-deoptimization/_config.js b/test/form/samples/argument-deoptimization/return-function-deoptimization/_config.js index e97bcd37102..111afff1537 100644 --- a/test/form/samples/argument-deoptimization/return-function-deoptimization/_config.js +++ b/test/form/samples/argument-deoptimization/return-function-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not deoptimize call arguments of returned functions by default' }); diff --git a/test/form/samples/array-element-tracking/array-elements/_config.js b/test/form/samples/array-element-tracking/array-elements/_config.js index 4940e9c0b6a..33a97fb0a9e 100644 --- a/test/form/samples/array-element-tracking/array-elements/_config.js +++ b/test/form/samples/array-element-tracking/array-elements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks elements of arrays' }); diff --git a/test/form/samples/array-element-tracking/array-mutation/_config.js b/test/form/samples/array-element-tracking/array-mutation/_config.js index 7e4b91617b7..65ce34ca346 100644 --- a/test/form/samples/array-element-tracking/array-mutation/_config.js +++ b/test/form/samples/array-element-tracking/array-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of array elements' }); diff --git a/test/form/samples/array-element-tracking/array-spread/_config.js b/test/form/samples/array-element-tracking/array-spread/_config.js index e5738bbdb72..d29aa6bf18e 100644 --- a/test/form/samples/array-element-tracking/array-spread/_config.js +++ b/test/form/samples/array-element-tracking/array-spread/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks elements of arrays with spread elements' }); diff --git a/test/form/samples/array-element-tracking/spread-element-deoptimization/_config.js b/test/form/samples/array-element-tracking/spread-element-deoptimization/_config.js index f47330df7c9..ad7ae85213c 100644 --- a/test/form/samples/array-element-tracking/spread-element-deoptimization/_config.js +++ b/test/form/samples/array-element-tracking/spread-element-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes array spread elements' }); diff --git a/test/form/samples/arrow-function-call-parameters/_config.js b/test/form/samples/arrow-function-call-parameters/_config.js index 345139a8424..ced3d3e3a24 100644 --- a/test/form/samples/arrow-function-call-parameters/_config.js +++ b/test/form/samples/arrow-function-call-parameters/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'take actual parameters into account when determining side-effects of calls to arrow functions' }); diff --git a/test/form/samples/arrow-function-return-values/_config.js b/test/form/samples/arrow-function-return-values/_config.js index 4b460ec2cd3..81fabffcdd2 100644 --- a/test/form/samples/arrow-function-return-values/_config.js +++ b/test/form/samples/arrow-function-return-values/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'forwards return values of arrow functions' }); diff --git a/test/form/samples/assignment-to-array-buffer-view/_config.js b/test/form/samples/assignment-to-array-buffer-view/_config.js index 679ac3d7cf5..74f502ac83d 100644 --- a/test/form/samples/assignment-to-array-buffer-view/_config.js +++ b/test/form/samples/assignment-to-array-buffer-view/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'assignment to views of buffers should be kept', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/assignment-to-exports-class-declaration/_config.js b/test/form/samples/assignment-to-exports-class-declaration/_config.js index a27f25c06bc..512ae789de2 100644 --- a/test/form/samples/assignment-to-exports-class-declaration/_config.js +++ b/test/form/samples/assignment-to-exports-class-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not rewrite class expression IDs', options: { output: { name: 'myModule' } } }); diff --git a/test/form/samples/assignment-to-exports/_config.js b/test/form/samples/assignment-to-exports/_config.js index 6645300b3d2..548407a86e1 100644 --- a/test/form/samples/assignment-to-exports/_config.js +++ b/test/form/samples/assignment-to-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'declares updated variable in ES output (#755)', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/assignment-to-global/_config.js b/test/form/samples/assignment-to-global/_config.js index 42e3bc5a127..df48d86d200 100644 --- a/test/form/samples/assignment-to-global/_config.js +++ b/test/form/samples/assignment-to-global/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Assignments to global variables should be effects (#1587)' }); diff --git a/test/form/samples/async-function-effects/_config.js b/test/form/samples/async-function-effects/_config.js index c08994c80e4..ce3f3de1bb2 100644 --- a/test/form/samples/async-function-effects/_config.js +++ b/test/form/samples/async-function-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks effects when awaiting thenables' }); diff --git a/test/form/samples/async-function-unused/_config.js b/test/form/samples/async-function-unused/_config.js index 1a58b514b2b..d6ec16b8d2e 100644 --- a/test/form/samples/async-function-unused/_config.js +++ b/test/form/samples/async-function-unused/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treeshakes async functions (#492)' }); diff --git a/test/form/samples/automatic-semicolon-insertion-var/_config.js b/test/form/samples/automatic-semicolon-insertion-var/_config.js index 67e616a9398..2b6f0339bfc 100644 --- a/test/form/samples/automatic-semicolon-insertion-var/_config.js +++ b/test/form/samples/automatic-semicolon-insertion-var/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Adds trailing semicolons for modules' }); diff --git a/test/form/samples/avoid-unnecessary-conditional-deopt/_config.js b/test/form/samples/avoid-unnecessary-conditional-deopt/_config.js index a6f640732e4..4d3ddb9f77f 100644 --- a/test/form/samples/avoid-unnecessary-conditional-deopt/_config.js +++ b/test/form/samples/avoid-unnecessary-conditional-deopt/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids unnecessary deoptimizations of conditional expressions' }); diff --git a/test/form/samples/banner-and-footer/_config.js b/test/form/samples/banner-and-footer/_config.js index 544e64e192b..81e6d956c01 100644 --- a/test/form/samples/banner-and-footer/_config.js +++ b/test/form/samples/banner-and-footer/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds a banner/footer', options: { output: { diff --git a/test/form/samples/base64-deshadow/_config.js b/test/form/samples/base64-deshadow/_config.js index 03c080c67cd..77f1c1e1cf9 100644 --- a/test/form/samples/base64-deshadow/_config.js +++ b/test/form/samples/base64-deshadow/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'base64 deshadowing indices' }); diff --git a/test/form/samples/big-int/_config.js b/test/form/samples/big-int/_config.js index c6f4ffc6390..cdd9c242449 100644 --- a/test/form/samples/big-int/_config.js +++ b/test/form/samples/big-int/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports bigint via acorn plugin' }); diff --git a/test/form/samples/binary-expressions/_config.js b/test/form/samples/binary-expressions/_config.js index 6c4ce271668..2e2230aca35 100644 --- a/test/form/samples/binary-expressions/_config.js +++ b/test/form/samples/binary-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles binary expression side-effects' }); diff --git a/test/form/samples/block-comments/_config.js b/test/form/samples/block-comments/_config.js index 73361adf2ad..3c5a1b11616 100644 --- a/test/form/samples/block-comments/_config.js +++ b/test/form/samples/block-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'block comments are printed correctly' }); diff --git a/test/form/samples/body-less-for-loops/_config.js b/test/form/samples/body-less-for-loops/_config.js index 56fc1879016..20b681adcf9 100644 --- a/test/form/samples/body-less-for-loops/_config.js +++ b/test/form/samples/body-less-for-loops/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports body-less for loops' }); diff --git a/test/form/samples/break-control-flow/break-statement-labels-in-loops/_config.js b/test/form/samples/break-control-flow/break-statement-labels-in-loops/_config.js index 6f76737e2df..ac0341f1214 100644 --- a/test/form/samples/break-control-flow/break-statement-labels-in-loops/_config.js +++ b/test/form/samples/break-control-flow/break-statement-labels-in-loops/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles breaking to loops inside labeled statements' }); diff --git a/test/form/samples/break-control-flow/break-statement-labels-switch/_config.js b/test/form/samples/break-control-flow/break-statement-labels-switch/_config.js index e158043ffe5..76f7dbde3c6 100644 --- a/test/form/samples/break-control-flow/break-statement-labels-switch/_config.js +++ b/test/form/samples/break-control-flow/break-statement-labels-switch/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports labels when breaking control flow from a switch statement' }); diff --git a/test/form/samples/break-control-flow/break-statement-labels/_config.js b/test/form/samples/break-control-flow/break-statement-labels/_config.js index a136d15a8a2..7566e972006 100644 --- a/test/form/samples/break-control-flow/break-statement-labels/_config.js +++ b/test/form/samples/break-control-flow/break-statement-labels/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports labels when breaking control flow' }); diff --git a/test/form/samples/break-control-flow/break-statement-loops/_config.js b/test/form/samples/break-control-flow/break-statement-loops/_config.js index 482aae827ed..d3f588fa7e7 100644 --- a/test/form/samples/break-control-flow/break-statement-loops/_config.js +++ b/test/form/samples/break-control-flow/break-statement-loops/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'breaks control flow when a break statement is encountered inside a loop' }); diff --git a/test/form/samples/break-control-flow/caught-errors/_config.js b/test/form/samples/break-control-flow/caught-errors/_config.js index d35b98aeb2b..46e851e64fa 100644 --- a/test/form/samples/break-control-flow/caught-errors/_config.js +++ b/test/form/samples/break-control-flow/caught-errors/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'breaks control flow when an error is thrown inside a catch block', options: { treeshake: { tryCatchDeoptimization: false } diff --git a/test/form/samples/break-control-flow/hoisted-declarations/_config.js b/test/form/samples/break-control-flow/hoisted-declarations/_config.js index 5a4a5972ba0..c6cd817604f 100644 --- a/test/form/samples/break-control-flow/hoisted-declarations/_config.js +++ b/test/form/samples/break-control-flow/hoisted-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes hoisted declarations when control flow is broken' }); diff --git a/test/form/samples/break-control-flow/if-statement-breaks/_config.js b/test/form/samples/break-control-flow/if-statement-breaks/_config.js index 6bd7813c0d4..7324bb6a309 100644 --- a/test/form/samples/break-control-flow/if-statement-breaks/_config.js +++ b/test/form/samples/break-control-flow/if-statement-breaks/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles conditionally broken execution' }); diff --git a/test/form/samples/break-control-flow/if-statement-errors/_config.js b/test/form/samples/break-control-flow/if-statement-errors/_config.js index 4c883cfb4f9..8a2b54134e0 100644 --- a/test/form/samples/break-control-flow/if-statement-errors/_config.js +++ b/test/form/samples/break-control-flow/if-statement-errors/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles conditionally thrown errors' }); diff --git a/test/form/samples/break-control-flow/loop-errors/_config.js b/test/form/samples/break-control-flow/loop-errors/_config.js index 1b181768427..567b4e9ac85 100644 --- a/test/form/samples/break-control-flow/loop-errors/_config.js +++ b/test/form/samples/break-control-flow/loop-errors/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not break flow from inside loops that may not have executed' }); diff --git a/test/form/samples/break-control-flow/return-statements/_config.js b/test/form/samples/break-control-flow/return-statements/_config.js index a933ee11ae3..b7b18f5f469 100644 --- a/test/form/samples/break-control-flow/return-statements/_config.js +++ b/test/form/samples/break-control-flow/return-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'breaks control flow when a return statement is encountered' }); diff --git a/test/form/samples/break-control-flow/switch-errors/_config.js b/test/form/samples/break-control-flow/switch-errors/_config.js index 6f4b03f39dd..23da799b6ed 100644 --- a/test/form/samples/break-control-flow/switch-errors/_config.js +++ b/test/form/samples/break-control-flow/switch-errors/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles errors in switch statements' }); diff --git a/test/form/samples/break-control-flow/thrown-errors/_config.js b/test/form/samples/break-control-flow/thrown-errors/_config.js index 72707c35869..8f3eda10b57 100644 --- a/test/form/samples/break-control-flow/thrown-errors/_config.js +++ b/test/form/samples/break-control-flow/thrown-errors/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'breaks control flow when an error is thrown' }); diff --git a/test/form/samples/builtin-prototypes/array-expression/_config.js b/test/form/samples/builtin-prototypes/array-expression/_config.js index 60b267b0118..5649d4c8cae 100644 --- a/test/form/samples/builtin-prototypes/array-expression/_config.js +++ b/test/form/samples/builtin-prototypes/array-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Tree-shake known array prototype functions' }); diff --git a/test/form/samples/builtin-prototypes/check-tree-shake-on-regexp-if-it-is-used/_config.js b/test/form/samples/builtin-prototypes/check-tree-shake-on-regexp-if-it-is-used/_config.js index cf7620e7c12..98135a3c698 100644 --- a/test/form/samples/builtin-prototypes/check-tree-shake-on-regexp-if-it-is-used/_config.js +++ b/test/form/samples/builtin-prototypes/check-tree-shake-on-regexp-if-it-is-used/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'check tree-shake on RegExp if it is used' }); diff --git a/test/form/samples/builtin-prototypes/literal/_config.js b/test/form/samples/builtin-prototypes/literal/_config.js index 0c4c0bcb5c9..24ca1bdb44a 100644 --- a/test/form/samples/builtin-prototypes/literal/_config.js +++ b/test/form/samples/builtin-prototypes/literal/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Tree-shake known literal prototype functions' }); diff --git a/test/form/samples/builtin-prototypes/object-expression/_config.js b/test/form/samples/builtin-prototypes/object-expression/_config.js index d162735008e..8f33ba0787f 100644 --- a/test/form/samples/builtin-prototypes/object-expression/_config.js +++ b/test/form/samples/builtin-prototypes/object-expression/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Tree-shake known object prototype functions', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/builtin-prototypes/side-effect-free-array-expression/_config.js b/test/form/samples/builtin-prototypes/side-effect-free-array-expression/_config.js index d91b2b29099..277135ac8b1 100644 --- a/test/form/samples/builtin-prototypes/side-effect-free-array-expression/_config.js +++ b/test/form/samples/builtin-prototypes/side-effect-free-array-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Tree-shakes side-effect-free array functions if only their return value is unused' }); diff --git a/test/form/samples/builtin-prototypes/template-literal/_config.js b/test/form/samples/builtin-prototypes/template-literal/_config.js index a8925db2195..297cb8bb116 100644 --- a/test/form/samples/builtin-prototypes/template-literal/_config.js +++ b/test/form/samples/builtin-prototypes/template-literal/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Tree-shake known string template literal prototype functions' }); diff --git a/test/form/samples/catch-parameter-shadowing/_config.js b/test/form/samples/catch-parameter-shadowing/_config.js index 28cc5f4824d..8a5be57bcbf 100644 --- a/test/form/samples/catch-parameter-shadowing/_config.js +++ b/test/form/samples/catch-parameter-shadowing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'the parameter of a catch block should correctly shadow an import (#1391)', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/chained-assignments/_config.js b/test/form/samples/chained-assignments/_config.js index d8661446143..3711528c63b 100644 --- a/test/form/samples/chained-assignments/_config.js +++ b/test/form/samples/chained-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treeshakes chained assignments' }); diff --git a/test/form/samples/circular-member-expression/_config.js b/test/form/samples/circular-member-expression/_config.js index 8f953ebad08..4041b64baa4 100644 --- a/test/form/samples/circular-member-expression/_config.js +++ b/test/form/samples/circular-member-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'circular member expression' }); diff --git a/test/form/samples/class-constructor-side-effect/_config.js b/test/form/samples/class-constructor-side-effect/_config.js index 1ea4bc2b9a5..92a7c200ed6 100644 --- a/test/form/samples/class-constructor-side-effect/_config.js +++ b/test/form/samples/class-constructor-side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves side-effects in a class constructor (#1233)' }); diff --git a/test/form/samples/class-fields/_config.js b/test/form/samples/class-fields/_config.js index 829f1e2161d..ca98033f2c7 100644 --- a/test/form/samples/class-fields/_config.js +++ b/test/form/samples/class-fields/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports class fields' }); diff --git a/test/form/samples/class-method-access/_config.js b/test/form/samples/class-method-access/_config.js index 20c66a5b7be..c0005ee1516 100644 --- a/test/form/samples/class-method-access/_config.js +++ b/test/form/samples/class-method-access/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks side-effects when accessing class methods' }); diff --git a/test/form/samples/class-static-initialization-block/_config.js b/test/form/samples/class-static-initialization-block/_config.js index 75677c5825c..1a4a4fd8972 100644 --- a/test/form/samples/class-static-initialization-block/_config.js +++ b/test/form/samples/class-static-initialization-block/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports class static initialization blocks' }); diff --git a/test/form/samples/class-without-new/_config.js b/test/form/samples/class-without-new/_config.js index 3abc4ecaf35..ca7d246380e 100644 --- a/test/form/samples/class-without-new/_config.js +++ b/test/form/samples/class-without-new/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'instantiating a class without "new" is a side-effect' }); diff --git a/test/form/samples/comment-before-import/_config.js b/test/form/samples/comment-before-import/_config.js index 2638c8b47fd..4dac0737c5f 100644 --- a/test/form/samples/comment-before-import/_config.js +++ b/test/form/samples/comment-before-import/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves comments before imports' }); diff --git a/test/form/samples/comment-start-inside-comment/_config.js b/test/form/samples/comment-start-inside-comment/_config.js index ea795842cde..fba7e976cad 100644 --- a/test/form/samples/comment-start-inside-comment/_config.js +++ b/test/form/samples/comment-start-inside-comment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly remove coments above import statements' }); diff --git a/test/form/samples/compact-empty-external/_config.js b/test/form/samples/compact-empty-external/_config.js index 7a1148b6493..5ddc7cd7bf9 100644 --- a/test/form/samples/compact-empty-external/_config.js +++ b/test/form/samples/compact-empty-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles empty external imports in compact mode', options: { external: ['external'], diff --git a/test/form/samples/compact-multiple-imports/_config.js b/test/form/samples/compact-multiple-imports/_config.js index 1c3c482df88..f3cc88b91ea 100644 --- a/test/form/samples/compact-multiple-imports/_config.js +++ b/test/form/samples/compact-multiple-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles empty external imports in compact mode', options: { external(id) { diff --git a/test/form/samples/compact-named-export/_config.js b/test/form/samples/compact-named-export/_config.js index 2bff578ed53..602a6480c76 100644 --- a/test/form/samples/compact-named-export/_config.js +++ b/test/form/samples/compact-named-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly handles named export live bindings in compact mode', options: { output: { diff --git a/test/form/samples/compact/_config.js b/test/form/samples/compact/_config.js index 635b3d6e16c..bb9b84a67e8 100644 --- a/test/form/samples/compact/_config.js +++ b/test/form/samples/compact/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports compact output with compact: true', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/form/samples/computed-member-expression-assignments/_config.js b/test/form/samples/computed-member-expression-assignments/_config.js index 6016bd19538..6ad78ce80a4 100644 --- a/test/form/samples/computed-member-expression-assignments/_config.js +++ b/test/form/samples/computed-member-expression-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detect side-effects in assignments involving computed members' }); diff --git a/test/form/samples/computed-properties/_config.js b/test/form/samples/computed-properties/_config.js index d9a490fcfde..8319b816557 100644 --- a/test/form/samples/computed-properties/_config.js +++ b/test/form/samples/computed-properties/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'computed property keys include declarations of referenced identifiers', options: { output: { name: 'computedProperties' } } }); diff --git a/test/form/samples/conditional-expression-deopzimize-while-included/_config.js b/test/form/samples/conditional-expression-deopzimize-while-included/_config.js index 1fd8e5d3fe0..aba539b2fdb 100644 --- a/test/form/samples/conditional-expression-deopzimize-while-included/_config.js +++ b/test/form/samples/conditional-expression-deopzimize-while-included/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deoptimizations of logical expression while they are inlcuded (#3324)' }); diff --git a/test/form/samples/conditional-expression-paths/_config.js b/test/form/samples/conditional-expression-paths/_config.js index 771fcdd4294..b712273200b 100644 --- a/test/form/samples/conditional-expression-paths/_config.js +++ b/test/form/samples/conditional-expression-paths/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'only retain branches with side-effects' }); diff --git a/test/form/samples/conditional-expression/_config.js b/test/form/samples/conditional-expression/_config.js index 771fcdd4294..b712273200b 100644 --- a/test/form/samples/conditional-expression/_config.js +++ b/test/form/samples/conditional-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'only retain branches with side-effects' }); diff --git a/test/form/samples/conditional-put-parens-around-sequence/_config.js b/test/form/samples/conditional-put-parens-around-sequence/_config.js index 7af20bb54c6..78ba85bf809 100644 --- a/test/form/samples/conditional-put-parens-around-sequence/_config.js +++ b/test/form/samples/conditional-put-parens-around-sequence/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'put parens around sequences if conditional simplified (#1311)' }); diff --git a/test/form/samples/configure-file-url/_config.js b/test/form/samples/configure-file-url/_config.js index 779eb96e95f..00694969f61 100644 --- a/test/form/samples/configure-file-url/_config.js +++ b/test/form/samples/configure-file-url/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to configure file urls', options: { plugins: [ diff --git a/test/form/samples/conflicting-imports/_config.js b/test/form/samples/conflicting-imports/_config.js index ecbf4da4b4f..cf75f094f0b 100644 --- a/test/form/samples/conflicting-imports/_config.js +++ b/test/form/samples/conflicting-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ensures bundle imports are deconflicted (#659)', options: { external: ['foo', 'bar'], diff --git a/test/form/samples/curried-function/_config.js b/test/form/samples/curried-function/_config.js index 6b66eac6a7e..63ce038bce0 100644 --- a/test/form/samples/curried-function/_config.js +++ b/test/form/samples/curried-function/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly handles a curried function' }); diff --git a/test/form/samples/custom-context/_config.js b/test/form/samples/custom-context/_config.js index 721c615e5c4..02b233fe3a7 100644 --- a/test/form/samples/custom-context/_config.js +++ b/test/form/samples/custom-context/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows custom context', options: { context: `lolwut` diff --git a/test/form/samples/custom-dynamic-import-no-interop/_config.js b/test/form/samples/custom-dynamic-import-no-interop/_config.js index e475f2f16fe..9abc9668ea0 100644 --- a/test/form/samples/custom-dynamic-import-no-interop/_config.js +++ b/test/form/samples/custom-dynamic-import-no-interop/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not add any interop when using a custom dynamic import handler', options: { external: 'external', diff --git a/test/form/samples/custom-module-context-function/_config.js b/test/form/samples/custom-module-context-function/_config.js index 02cc33a7f3d..e0b7153fb0c 100644 --- a/test/form/samples/custom-module-context-function/_config.js +++ b/test/form/samples/custom-module-context-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows custom module-specific context with a function option', expectedWarnings: ['THIS_IS_UNDEFINED'], options: { diff --git a/test/form/samples/custom-module-context/_config.js b/test/form/samples/custom-module-context/_config.js index edbf42050aa..d34d646df5d 100644 --- a/test/form/samples/custom-module-context/_config.js +++ b/test/form/samples/custom-module-context/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows custom module-specific context', expectedWarnings: ['THIS_IS_UNDEFINED'], options: { diff --git a/test/form/samples/declarations-with-side-effects/_config.js b/test/form/samples/declarations-with-side-effects/_config.js index 5faf89e46ea..8905efcd41f 100644 --- a/test/form/samples/declarations-with-side-effects/_config.js +++ b/test/form/samples/declarations-with-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains side-effects in declarations will tree-shaking the declared variable' }); diff --git a/test/form/samples/deconflict-format-specific-exports/_config.js b/test/form/samples/deconflict-format-specific-exports/_config.js index c6c49098b8c..6603d8c137f 100644 --- a/test/form/samples/deconflict-format-specific-exports/_config.js +++ b/test/form/samples/deconflict-format-specific-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'only deconflict "exports" for formats where it is necessary', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/deconflict-format-specific-globals/_config.js b/test/form/samples/deconflict-format-specific-globals/_config.js index d2a7a5555d2..fd70960bc55 100644 --- a/test/form/samples/deconflict-format-specific-globals/_config.js +++ b/test/form/samples/deconflict-format-specific-globals/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts format specific globals', options: { external: 'external', diff --git a/test/form/samples/deconflict-module-priority/_config.js b/test/form/samples/deconflict-module-priority/_config.js index e4c4470111d..e19c23a79b9 100644 --- a/test/form/samples/deconflict-module-priority/_config.js +++ b/test/form/samples/deconflict-module-priority/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prioritizes entry modules over dependencies when deconflicting' }); diff --git a/test/form/samples/deconflict-nested-tree-shaking/_config.js b/test/form/samples/deconflict-nested-tree-shaking/_config.js index 31edbb36b23..c9c747df289 100644 --- a/test/form/samples/deconflict-nested-tree-shaking/_config.js +++ b/test/form/samples/deconflict-nested-tree-shaking/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not consider nested tree-shaken variables when deconflicting' }); diff --git a/test/form/samples/deconflict-tree-shaken-globals/_config.js b/test/form/samples/deconflict-tree-shaken-globals/_config.js index 04f22a5df46..d1f174625b8 100644 --- a/test/form/samples/deconflict-tree-shaken-globals/_config.js +++ b/test/form/samples/deconflict-tree-shaken-globals/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not deconflict due to tree-shaken global variables' }); diff --git a/test/form/samples/deconflict-tree-shaken/_config.js b/test/form/samples/deconflict-tree-shaken/_config.js index 532265067e0..2fab7e1bb32 100644 --- a/test/form/samples/deconflict-tree-shaken/_config.js +++ b/test/form/samples/deconflict-tree-shaken/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not consider tree-shaken variables when deconflicting' }); diff --git a/test/form/samples/dedupes-external-imports/_config.js b/test/form/samples/dedupes-external-imports/_config.js index ad7663004e3..2827740b09e 100644 --- a/test/form/samples/dedupes-external-imports/_config.js +++ b/test/form/samples/dedupes-external-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'dedupes external imports', options: { external: ['external'], diff --git a/test/form/samples/deep-properties-access/_config.js b/test/form/samples/deep-properties-access/_config.js index 956a670519a..7b4d8d4a237 100644 --- a/test/form/samples/deep-properties-access/_config.js +++ b/test/form/samples/deep-properties-access/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deeply nested property accesses' }); diff --git a/test/form/samples/deep-properties/_config.js b/test/form/samples/deep-properties/_config.js index e5cf11beed1..57dc036e406 100644 --- a/test/form/samples/deep-properties/_config.js +++ b/test/form/samples/deep-properties/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deeply nested properties', options: { treeshake: { propertyReadSideEffects: false } diff --git a/test/form/samples/deep-switch-declarations/_config.js b/test/form/samples/deep-switch-declarations/_config.js index 4aa1aeb6fc3..889608337ff 100644 --- a/test/form/samples/deep-switch-declarations/_config.js +++ b/test/form/samples/deep-switch-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles hoisted declarations in deeply nested switch statements' }); diff --git a/test/form/samples/default-export-anonymous-class-extends/_config.js b/test/form/samples/default-export-anonymous-class-extends/_config.js index 65912ad3180..090c96a8f59 100644 --- a/test/form/samples/default-export-anonymous-class-extends/_config.js +++ b/test/form/samples/default-export-anonymous-class-extends/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default exported classes extending a regular expression argument (#4783)' }); diff --git a/test/form/samples/default-export-class/_config.js b/test/form/samples/default-export-class/_config.js index 997d2a8d2ce..b665d6b7bfb 100644 --- a/test/form/samples/default-export-class/_config.js +++ b/test/form/samples/default-export-class/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'puts the export after the declaration for default exported classes in SystemJS', options: { output: { diff --git a/test/form/samples/default-export-live-binding/_config.js b/test/form/samples/default-export-live-binding/_config.js index 675f20d281d..123b4620673 100644 --- a/test/form/samples/default-export-live-binding/_config.js +++ b/test/form/samples/default-export-live-binding/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows live bindings for default exports', options: { output: { exports: 'named', name: 'bundle' } diff --git a/test/form/samples/default-export-mode/_config.js b/test/form/samples/default-export-mode/_config.js index 789aed8b7b2..c3e9935ba77 100644 --- a/test/form/samples/default-export-mode/_config.js +++ b/test/form/samples/default-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows specifying the export mode to be "default"', options: { output: { diff --git a/test/form/samples/default-identifier-deshadowing/_config.js b/test/form/samples/default-identifier-deshadowing/_config.js index faad3154a60..ed2c7173d11 100644 --- a/test/form/samples/default-identifier-deshadowing/_config.js +++ b/test/form/samples/default-identifier-deshadowing/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Handles export default identifier reassignment deshadowing' }); diff --git a/test/form/samples/define-es-modules-false/_config.js b/test/form/samples/define-es-modules-false/_config.js index 6eb138f0005..332ff8fb294 100644 --- a/test/form/samples/define-es-modules-false/_config.js +++ b/test/form/samples/define-es-modules-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Not add __esModule property to exports with esModule: false', options: { output: { name: 'foo', esModule: false } diff --git a/test/form/samples/define-replacement/_config.js b/test/form/samples/define-replacement/_config.js index 941836792fd..6920038fcff 100644 --- a/test/form/samples/define-replacement/_config.js +++ b/test/form/samples/define-replacement/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'amd.define', options: { output: { diff --git a/test/form/samples/deopt-regexp-type/_config.js b/test/form/samples/deopt-regexp-type/_config.js index d3d6ccd4b01..5745d07af27 100644 --- a/test/form/samples/deopt-regexp-type/_config.js +++ b/test/form/samples/deopt-regexp-type/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes typeof for regular expressions to better support es6-sim' }); diff --git a/test/form/samples/deopt-string-concatenation/_config.js b/test/form/samples/deopt-string-concatenation/_config.js index 5e71d1ff22d..1326c114d68 100644 --- a/test/form/samples/deopt-string-concatenation/_config.js +++ b/test/form/samples/deopt-string-concatenation/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimize concatenation when used as an expression statement to better support es5-shim' }); diff --git a/test/form/samples/deoptimize-superclass/_config.js b/test/form/samples/deoptimize-superclass/_config.js index 29b322d218f..de245c1cb5b 100644 --- a/test/form/samples/deoptimize-superclass/_config.js +++ b/test/form/samples/deoptimize-superclass/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not deoptimize the entire superclass when reassigning a property' }); diff --git a/test/form/samples/deoptimize-var-in-hoisted-scopes/_config.js b/test/form/samples/deoptimize-var-in-hoisted-scopes/_config.js index 166268bbd08..47826267e90 100644 --- a/test/form/samples/deoptimize-var-in-hoisted-scopes/_config.js +++ b/test/form/samples/deoptimize-var-in-hoisted-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes var variables in hoisted scopes' }); diff --git a/test/form/samples/deprecated/dynamic-import-inlining-array/_config.js b/test/form/samples/deprecated/dynamic-import-inlining-array/_config.js index c9bc009082c..dcdb14a779d 100644 --- a/test/form/samples/deprecated/dynamic-import-inlining-array/_config.js +++ b/test/form/samples/deprecated/dynamic-import-inlining-array/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports an array with a single entry when inlining dynamic imports', options: { strictDeprecations: false, diff --git a/test/form/samples/deprecated/dynamic-import-inlining/_config.js b/test/form/samples/deprecated/dynamic-import-inlining/_config.js index 24984035481..1c08b44c215 100644 --- a/test/form/samples/deprecated/dynamic-import-inlining/_config.js +++ b/test/form/samples/deprecated/dynamic-import-inlining/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'dynamic import inlining', options: { strictDeprecations: false, diff --git a/test/form/samples/deprecated/inlined-treeshaken-dynamic-import/_config.js b/test/form/samples/deprecated/inlined-treeshaken-dynamic-import/_config.js index eb10394b1c6..bd9972fd9c2 100644 --- a/test/form/samples/deprecated/inlined-treeshaken-dynamic-import/_config.js +++ b/test/form/samples/deprecated/inlined-treeshaken-dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'completely removes tree-shaken dynamic imports ', options: { strictDeprecations: false, diff --git a/test/form/samples/deprecated/namespace-tostring/entry-default/_config.js b/test/form/samples/deprecated/namespace-tostring/entry-default/_config.js index c9620e9be59..9edd41090d8 100644 --- a/test/form/samples/deprecated/namespace-tostring/entry-default/_config.js +++ b/test/form/samples/deprecated/namespace-tostring/entry-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not add Symbol.toStringTag property to entry chunks with default export mode', options: { strictDeprecations: false, diff --git a/test/form/samples/deprecated/namespace-tostring/entry-named/_config.js b/test/form/samples/deprecated/namespace-tostring/entry-named/_config.js index f4fb3cca8b9..fdb9c53e7d2 100644 --- a/test/form/samples/deprecated/namespace-tostring/entry-named/_config.js +++ b/test/form/samples/deprecated/namespace-tostring/entry-named/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to entry chunks with named exports', options: { strictDeprecations: false, diff --git a/test/form/samples/deprecated/namespace-tostring/external-namespaces/_config.js b/test/form/samples/deprecated/namespace-tostring/external-namespaces/_config.js index 55805d20a58..a0c4e871735 100644 --- a/test/form/samples/deprecated/namespace-tostring/external-namespaces/_config.js +++ b/test/form/samples/deprecated/namespace-tostring/external-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to external namespaces', options: { strictDeprecations: false, diff --git a/test/form/samples/deprecated/namespace-tostring/inlined-namespace/_config.js b/test/form/samples/deprecated/namespace-tostring/inlined-namespace/_config.js index 89d932bb835..38a04e821a3 100644 --- a/test/form/samples/deprecated/namespace-tostring/inlined-namespace/_config.js +++ b/test/form/samples/deprecated/namespace-tostring/inlined-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to inlined namespaces', options: { strictDeprecations: false, diff --git a/test/form/samples/deprecated/nested-inlined-dynamic-import/_config.js b/test/form/samples/deprecated/nested-inlined-dynamic-import/_config.js index 3f83388e591..9b4467d5c71 100644 --- a/test/form/samples/deprecated/nested-inlined-dynamic-import/_config.js +++ b/test/form/samples/deprecated/nested-inlined-dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts variables when nested dynamic imports are inlined', options: { strictDeprecations: false, diff --git a/test/form/samples/deprecated/prefer-const/_config.js b/test/form/samples/deprecated/prefer-const/_config.js index 391e231224f..ce844d456a3 100644 --- a/test/form/samples/deprecated/prefer-const/_config.js +++ b/test/form/samples/deprecated/prefer-const/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses const instead of var if specified (#653)', options: { strictDeprecations: false, diff --git a/test/form/samples/duplicated-var-declarations/_config.js b/test/form/samples/duplicated-var-declarations/_config.js index 2eca0f76aaf..fedf39bb118 100644 --- a/test/form/samples/duplicated-var-declarations/_config.js +++ b/test/form/samples/duplicated-var-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not remove duplicated var declarations (#716)' }); diff --git a/test/form/samples/dynamic-import-inlining-array/_config.js b/test/form/samples/dynamic-import-inlining-array/_config.js index c4c5dc7f83f..dec5250f526 100644 --- a/test/form/samples/dynamic-import-inlining-array/_config.js +++ b/test/form/samples/dynamic-import-inlining-array/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports an array with a single entry when inlining dynamic imports', options: { output: { inlineDynamicImports: true }, diff --git a/test/form/samples/dynamic-import-inlining/_config.js b/test/form/samples/dynamic-import-inlining/_config.js index 2caca2c37f4..044e3ad0dad 100644 --- a/test/form/samples/dynamic-import-inlining/_config.js +++ b/test/form/samples/dynamic-import-inlining/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'dynamic import inlining', options: { output: { inlineDynamicImports: true } diff --git a/test/form/samples/dynamic-import-this-arrow/_config.js b/test/form/samples/dynamic-import-this-arrow/_config.js index 5b620219e72..8a8f67ad5aa 100644 --- a/test/form/samples/dynamic-import-this-arrow/_config.js +++ b/test/form/samples/dynamic-import-this-arrow/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct "this" in dynamic imports when using arrow functions', options: { external: ['input', 'output'], diff --git a/test/form/samples/dynamic-import-this-function/_config.js b/test/form/samples/dynamic-import-this-function/_config.js index da5af99be6b..2fb7f917a47 100644 --- a/test/form/samples/dynamic-import-this-function/_config.js +++ b/test/form/samples/dynamic-import-this-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct "this" in dynamic imports when not using arrow functions', options: { external: ['input', 'output'], diff --git a/test/form/samples/dynamic-import-unresolvable/_config.js b/test/form/samples/dynamic-import-unresolvable/_config.js index 39468b093a4..75dc777f95c 100644 --- a/test/form/samples/dynamic-import-unresolvable/_config.js +++ b/test/form/samples/dynamic-import-unresolvable/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Returns the raw AST nodes for unresolvable dynamic imports', options: { plugins: [ diff --git a/test/form/samples/dynamic-resolvable-if-statements/_config.js b/test/form/samples/dynamic-resolvable-if-statements/_config.js index 545ec2eb94c..5e014dd0e7e 100644 --- a/test/form/samples/dynamic-resolvable-if-statements/_config.js +++ b/test/form/samples/dynamic-resolvable-if-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows using variables to resolve conditionals' }); diff --git a/test/form/samples/early-bind-member-expressions/_config.js b/test/form/samples/early-bind-member-expressions/_config.js index d18a55d5154..8a6ee776cdf 100644 --- a/test/form/samples/early-bind-member-expressions/_config.js +++ b/test/form/samples/early-bind-member-expressions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly resolves namespace members when accessed early (#2895)', options: { external: 'external' } }); diff --git a/test/form/samples/effect-in-for-of-loop-in-functions/_config.js b/test/form/samples/effect-in-for-of-loop-in-functions/_config.js index dbdb827ab1a..6077ac42d3a 100644 --- a/test/form/samples/effect-in-for-of-loop-in-functions/_config.js +++ b/test/form/samples/effect-in-for-of-loop-in-functions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes effects in for-of loop (#870)' }); diff --git a/test/form/samples/effect-in-for-of-loop/_config.js b/test/form/samples/effect-in-for-of-loop/_config.js index dbdb827ab1a..6077ac42d3a 100644 --- a/test/form/samples/effect-in-for-of-loop/_config.js +++ b/test/form/samples/effect-in-for-of-loop/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes effects in for-of loop (#870)' }); diff --git a/test/form/samples/emit-asset-file/_config.js b/test/form/samples/emit-asset-file/_config.js index 58f9ed6b258..d205f5d4ab7 100644 --- a/test/form/samples/emit-asset-file/_config.js +++ b/test/form/samples/emit-asset-file/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const { readFileSync } = require('node:fs'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports emitting assets from plugin hooks', options: { plugins: { diff --git a/test/form/samples/emit-file-tree-shaken-access/_config.js b/test/form/samples/emit-file-tree-shaken-access/_config.js index 4fd983969a0..d93b3e81e1c 100644 --- a/test/form/samples/emit-file-tree-shaken-access/_config.js +++ b/test/form/samples/emit-file-tree-shaken-access/_config.js @@ -1,7 +1,7 @@ const { readFileSync } = require('node:fs'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include format globals when tree-shaking an asset access', options: { plugins: { diff --git a/test/form/samples/emit-uint8array-no-buffer/_config.js b/test/form/samples/emit-uint8array-no-buffer/_config.js index eb273130134..e6eb855182c 100644 --- a/test/form/samples/emit-uint8array-no-buffer/_config.js +++ b/test/form/samples/emit-uint8array-no-buffer/_config.js @@ -1,6 +1,6 @@ const Buffer = global.Buffer; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports emitting assets as Uint8Arrays when Buffer is not available', before() { delete global.Buffer; diff --git a/test/form/samples/empty-block-statement/_config.js b/test/form/samples/empty-block-statement/_config.js index 10069f0b59d..3915a619d31 100644 --- a/test/form/samples/empty-block-statement/_config.js +++ b/test/form/samples/empty-block-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty block statement' }); diff --git a/test/form/samples/empty-do-while-statement/_config.js b/test/form/samples/empty-do-while-statement/_config.js index bf22304b23d..6fd27ba3009 100644 --- a/test/form/samples/empty-do-while-statement/_config.js +++ b/test/form/samples/empty-do-while-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty do-while statement' }); diff --git a/test/form/samples/empty-for-in-statement/_config.js b/test/form/samples/empty-for-in-statement/_config.js index 734a8d1d12a..93cd18efe18 100644 --- a/test/form/samples/empty-for-in-statement/_config.js +++ b/test/form/samples/empty-for-in-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty for-in statement' }); diff --git a/test/form/samples/empty-for-statement/_config.js b/test/form/samples/empty-for-statement/_config.js index e77b4719365..abbbce82750 100644 --- a/test/form/samples/empty-for-statement/_config.js +++ b/test/form/samples/empty-for-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty for statement' }); diff --git a/test/form/samples/empty-if-statement/_config.js b/test/form/samples/empty-if-statement/_config.js index 63ee443dfbe..bb36f917a7f 100644 --- a/test/form/samples/empty-if-statement/_config.js +++ b/test/form/samples/empty-if-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty if statement' }); diff --git a/test/form/samples/empty-statement-consequent/_config.js b/test/form/samples/empty-statement-consequent/_config.js index d9f5bcf5305..77b0e7eb8dc 100644 --- a/test/form/samples/empty-statement-consequent/_config.js +++ b/test/form/samples/empty-statement-consequent/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves empty statements used as the consequent of conditionals' }); diff --git a/test/form/samples/empty-statement/_config.js b/test/form/samples/empty-statement/_config.js index f416707d1d8..a69a0d88686 100644 --- a/test/form/samples/empty-statement/_config.js +++ b/test/form/samples/empty-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty statement' }); diff --git a/test/form/samples/empty-switch-statement/_config.js b/test/form/samples/empty-switch-statement/_config.js index 168f1b00ae8..a77fbe2b87a 100644 --- a/test/form/samples/empty-switch-statement/_config.js +++ b/test/form/samples/empty-switch-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty switch statement' }); diff --git a/test/form/samples/empty-try-catch-statement/_config.js b/test/form/samples/empty-try-catch-statement/_config.js index 3c0bfbef66b..577d6d3cb00 100644 --- a/test/form/samples/empty-try-catch-statement/_config.js +++ b/test/form/samples/empty-try-catch-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty try-catch-finally statement' }); diff --git a/test/form/samples/empty-while-statement/_config.js b/test/form/samples/empty-while-statement/_config.js index 29bb30347c0..52b112ee82f 100644 --- a/test/form/samples/empty-while-statement/_config.js +++ b/test/form/samples/empty-while-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes an empty while statement' }); diff --git a/test/form/samples/enforce-addon-order/_config.js b/test/form/samples/enforce-addon-order/_config.js index 86da8b11650..878479c6e9b 100644 --- a/test/form/samples/enforce-addon-order/_config.js +++ b/test/form/samples/enforce-addon-order/_config.js @@ -24,7 +24,7 @@ function addPlugin(order) { plugins.push(plugin, stringPlugin); } -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to enforce addon order', options: { plugins diff --git a/test/form/samples/entry-with-unused-synthetic-exports/_config.js b/test/form/samples/entry-with-unused-synthetic-exports/_config.js index 2762dd5e904..67dd54b20a7 100644 --- a/test/form/samples/entry-with-unused-synthetic-exports/_config.js +++ b/test/form/samples/entry-with-unused-synthetic-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include unused synthetic namespace object in entry points', options: { plugins: { diff --git a/test/form/samples/erroneous-nested-member-expression/_config.js b/test/form/samples/erroneous-nested-member-expression/_config.js index c8fa9d0c2fe..c9540eb7aae 100644 --- a/test/form/samples/erroneous-nested-member-expression/_config.js +++ b/test/form/samples/erroneous-nested-member-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'erroneous nested member expression does not mess up naming' }); diff --git a/test/form/samples/exclude-unnecessary-modifications/_config.js b/test/form/samples/exclude-unnecessary-modifications/_config.js index eacb6b6d6d2..15de81719c5 100644 --- a/test/form/samples/exclude-unnecessary-modifications/_config.js +++ b/test/form/samples/exclude-unnecessary-modifications/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'statements that modify definitions within unused functions are excluded' }); diff --git a/test/form/samples/exponentiation-operator/_config.js b/test/form/samples/exponentiation-operator/_config.js index 5c0f1968056..ebbd034ae75 100644 --- a/test/form/samples/exponentiation-operator/_config.js +++ b/test/form/samples/exponentiation-operator/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'folds exponentiation operator when considering dead code' }); diff --git a/test/form/samples/export-all-before-named/_config.js b/test/form/samples/export-all-before-named/_config.js index 2e7fb5f059d..91f7f20ccb1 100644 --- a/test/form/samples/export-all-before-named/_config.js +++ b/test/form/samples/export-all-before-named/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external `export *` must not interfere with internal exports', options: { output: { diff --git a/test/form/samples/export-all-from-internal/_config.js b/test/form/samples/export-all-from-internal/_config.js index af418a7041a..a60e721b826 100644 --- a/test/form/samples/export-all-from-internal/_config.js +++ b/test/form/samples/export-all-from-internal/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'should be able to export * from the bundle', options: { output: { name: 'exposedInternals' } } }); diff --git a/test/form/samples/export-all-multiple/_config.js b/test/form/samples/export-all-multiple/_config.js index b824a07d71d..7c70deaae7b 100644 --- a/test/form/samples/export-all-multiple/_config.js +++ b/test/form/samples/export-all-multiple/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles multiple export * declarations (#1252)', options: { external: ['foo', 'bar', 'baz'], diff --git a/test/form/samples/export-default-2/_config.js b/test/form/samples/export-default-2/_config.js index f2c8c1f468c..8675d82dd4c 100644 --- a/test/form/samples/export-default-2/_config.js +++ b/test/form/samples/export-default-2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exporting a default export', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/export-default-3/_config.js b/test/form/samples/export-default-3/_config.js index f2c8c1f468c..8675d82dd4c 100644 --- a/test/form/samples/export-default-3/_config.js +++ b/test/form/samples/export-default-3/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exporting a default export', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/export-default-4/_config.js b/test/form/samples/export-default-4/_config.js index 94f3ea94108..17be4468792 100644 --- a/test/form/samples/export-default-4/_config.js +++ b/test/form/samples/export-default-4/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'single default export in deep namespace', options: { output: { name: 'my.global.namespace' } } }); diff --git a/test/form/samples/export-default-anonymous-declarations/_config.js b/test/form/samples/export-default-anonymous-declarations/_config.js index 2939cea4bdf..416f8b5ae28 100644 --- a/test/form/samples/export-default-anonymous-declarations/_config.js +++ b/test/form/samples/export-default-anonymous-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'export default [Declaration] with spaces and comments' }); diff --git a/test/form/samples/export-default-global/_config.js b/test/form/samples/export-default-global/_config.js index f2ff86f2de4..63a2bb092df 100644 --- a/test/form/samples/export-default-global/_config.js +++ b/test/form/samples/export-default-global/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default exporting global variables', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/export-default-import/_config.js b/test/form/samples/export-default-import/_config.js index 39f40ed04f3..6a5fb88b638 100644 --- a/test/form/samples/export-default-import/_config.js +++ b/test/form/samples/export-default-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly exports a default import, even in ES mode (#513)', options: { external: ['x'], diff --git a/test/form/samples/export-default/_config.js b/test/form/samples/export-default/_config.js index 519d4665906..f6dd8a9b705 100644 --- a/test/form/samples/export-default/_config.js +++ b/test/form/samples/export-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'single (default) exports', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/export-globals/_config.js b/test/form/samples/export-globals/_config.js index 6bc3bf2993a..6d54b2cfea4 100644 --- a/test/form/samples/export-globals/_config.js +++ b/test/form/samples/export-globals/_config.js @@ -1,7 +1,7 @@ // Changed due to https://github.com/acornjs/acorn/issues/806 // Consider reverting this change should this become an acorn option -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Supports reexports of globals with namespace access', options: { output: { diff --git a/test/form/samples/export-internal-namespace-as/_config.js b/test/form/samples/export-internal-namespace-as/_config.js index acde278b158..d9e1cb9af78 100644 --- a/test/form/samples/export-internal-namespace-as/_config.js +++ b/test/form/samples/export-internal-namespace-as/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports exporting and resolving internal namespaces as names' }); diff --git a/test/form/samples/export-live-bindings/_config.js b/test/form/samples/export-live-bindings/_config.js index 7629ec97daa..c8377f8dbbd 100644 --- a/test/form/samples/export-live-bindings/_config.js +++ b/test/form/samples/export-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exported live bindings', options: { output: { diff --git a/test/form/samples/export-multiple-vars/_config.js b/test/form/samples/export-multiple-vars/_config.js index c00b96f6dfb..23cf12deddd 100644 --- a/test/form/samples/export-multiple-vars/_config.js +++ b/test/form/samples/export-multiple-vars/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'splits up multiple vars in a single export declaration' }); diff --git a/test/form/samples/export-namespace-as/_config.js b/test/form/samples/export-namespace-as/_config.js index 98f5a232fe0..1020407da73 100644 --- a/test/form/samples/export-namespace-as/_config.js +++ b/test/form/samples/export-namespace-as/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports exporting namespaces as names in entry points', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/exported-class-declaration-conflict/_config.js b/test/form/samples/exported-class-declaration-conflict/_config.js index 5906ed0e73f..28937382c5b 100644 --- a/test/form/samples/exported-class-declaration-conflict/_config.js +++ b/test/form/samples/exported-class-declaration-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles exporting class declarations with name conflicts in SystemJS', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/exports-at-end-if-possible/_config.js b/test/form/samples/exports-at-end-if-possible/_config.js index 152315e0c6c..d7c16115fa6 100644 --- a/test/form/samples/exports-at-end-if-possible/_config.js +++ b/test/form/samples/exports-at-end-if-possible/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports variables at end, if possible', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/extend-exports/_config.js b/test/form/samples/extend-exports/_config.js index 8faac2b9644..de6f96f242f 100644 --- a/test/form/samples/extend-exports/_config.js +++ b/test/form/samples/extend-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'extends module correctly', options: { output: { diff --git a/test/form/samples/extend-namespaced-exports/_config.js b/test/form/samples/extend-namespaced-exports/_config.js index 80f1f9d69d7..f8d9407c1bf 100644 --- a/test/form/samples/extend-namespaced-exports/_config.js +++ b/test/form/samples/extend-namespaced-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'extends namespaced module name', options: { output: { diff --git a/test/form/samples/external-deshadowing/_config.js b/test/form/samples/external-deshadowing/_config.js index 324033b0352..944fd4e0b94 100644 --- a/test/form/samples/external-deshadowing/_config.js +++ b/test/form/samples/external-deshadowing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Externals aliases with deshadowing', options: { external: ['a', 'b'], diff --git a/test/form/samples/external-empty-import-no-global-b/_config.js b/test/form/samples/external-empty-import-no-global-b/_config.js index 28b1e1ae5e5..dc9e9b1cb4d 100644 --- a/test/form/samples/external-empty-import-no-global-b/_config.js +++ b/test/form/samples/external-empty-import-no-global-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not expect a global to be provided for empty imports (#1217)', options: { external: ['babel-polyfill', 'other'], diff --git a/test/form/samples/external-empty-import-no-global/_config.js b/test/form/samples/external-empty-import-no-global/_config.js index 9972312ec90..9070629e0b0 100644 --- a/test/form/samples/external-empty-import-no-global/_config.js +++ b/test/form/samples/external-empty-import-no-global/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not expect a global to be provided for empty imports (#1217)', options: { external: ['babel-polyfill'], diff --git a/test/form/samples/external-export-tracing/_config.js b/test/form/samples/external-export-tracing/_config.js index 181c0fec652..734f88b588f 100644 --- a/test/form/samples/external-export-tracing/_config.js +++ b/test/form/samples/external-export-tracing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Support external namespace reexport', options: { external: ['external'], diff --git a/test/form/samples/external-import-alias-shadow/_config.js b/test/form/samples/external-import-alias-shadow/_config.js index 16f2491f91d..5d95e9b1ea0 100644 --- a/test/form/samples/external-import-alias-shadow/_config.js +++ b/test/form/samples/external-import-alias-shadow/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles external aliased named imports that shadow another name', options: { external: ['acorn'], diff --git a/test/form/samples/external-import-order/_config.js b/test/form/samples/external-import-order/_config.js index b3141e6357e..eccb2fe28d0 100644 --- a/test/form/samples/external-import-order/_config.js +++ b/test/form/samples/external-import-order/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Retain the execution order of external imports', options: { external(id) { diff --git a/test/form/samples/external-imports-custom-names-function/_config.js b/test/form/samples/external-imports-custom-names-function/_config.js index 82f1e3f0273..68aafe26bb4 100644 --- a/test/form/samples/external-imports-custom-names-function/_config.js +++ b/test/form/samples/external-imports-custom-names-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows globals to be specified as a function', options: { external: ['a-b-c'], diff --git a/test/form/samples/external-imports-custom-names/_config.js b/test/form/samples/external-imports-custom-names/_config.js index 248f740e31a..c047d627307 100644 --- a/test/form/samples/external-imports-custom-names/_config.js +++ b/test/form/samples/external-imports-custom-names/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows global names to be specified for IIFE/UMD exports', options: { external: ['jquery'], diff --git a/test/form/samples/external-imports/_config.js b/test/form/samples/external-imports/_config.js index 2fe95aadc13..c1bd02260f1 100644 --- a/test/form/samples/external-imports/_config.js +++ b/test/form/samples/external-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prefixes global names with `global.` when creating UMD bundle (#57)', expectedWarnings: ['UNUSED_EXTERNAL_IMPORT'], options: { diff --git a/test/form/samples/external-namespace-and-named/_config.js b/test/form/samples/external-namespace-and-named/_config.js index d4a97409ed1..dba2bf0ca6c 100644 --- a/test/form/samples/external-namespace-and-named/_config.js +++ b/test/form/samples/external-namespace-and-named/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Correctly handles external namespace tracing with both namespace and named exports', options: { external: ['foo'], diff --git a/test/form/samples/external-namespace-reexport/_config.js b/test/form/samples/external-namespace-reexport/_config.js index 2bf17a8d48e..4fc57ee9de6 100644 --- a/test/form/samples/external-namespace-reexport/_config.js +++ b/test/form/samples/external-namespace-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Support external namespace reexport', options: { external: ['highcharts'], diff --git a/test/form/samples/for-in-scopes/_config.js b/test/form/samples/for-in-scopes/_config.js index 0e208e5ef7a..3960d227369 100644 --- a/test/form/samples/for-in-scopes/_config.js +++ b/test/form/samples/for-in-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly associate or shadow variables in and around for-in-loops' }); diff --git a/test/form/samples/for-loop-assignment/_config.js b/test/form/samples/for-loop-assignment/_config.js index e3d33db576e..2675850e9a2 100644 --- a/test/form/samples/for-loop-assignment/_config.js +++ b/test/form/samples/for-loop-assignment/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes assignments with computed indexes in for loops', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/for-loop-body-var-declaration/_config.js b/test/form/samples/for-loop-body-var-declaration/_config.js index 678798da278..4a81a595b59 100644 --- a/test/form/samples/for-loop-body-var-declaration/_config.js +++ b/test/form/samples/for-loop-body-var-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'use a newline for line wraps removing a necessary semicolon (#1275)' }); diff --git a/test/form/samples/for-loop-with-empty-head/_config.js b/test/form/samples/for-loop-with-empty-head/_config.js index d5f2f64d113..2c6f483247d 100644 --- a/test/form/samples/for-loop-with-empty-head/_config.js +++ b/test/form/samples/for-loop-with-empty-head/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles for loop with empty head' }); diff --git a/test/form/samples/for-of-scopes/_config.js b/test/form/samples/for-of-scopes/_config.js index d62a6f28f57..fd2c66957ca 100644 --- a/test/form/samples/for-of-scopes/_config.js +++ b/test/form/samples/for-of-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly associate or shadow variables in and around for-of-loops' }); diff --git a/test/form/samples/for-scopes/_config.js b/test/form/samples/for-scopes/_config.js index de93621f9c9..27d13b692eb 100644 --- a/test/form/samples/for-scopes/_config.js +++ b/test/form/samples/for-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly associate or shadow variables in and around for-loops' }); diff --git a/test/form/samples/freeze/_config.js b/test/form/samples/freeze/_config.js index 4b750232c6d..12ac7d22b83 100644 --- a/test/form/samples/freeze/_config.js +++ b/test/form/samples/freeze/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports opt-ing out of usage of Object.freeze', options: { output: { name: 'myBundle', freeze: false } diff --git a/test/form/samples/function-body-return-values/_config.js b/test/form/samples/function-body-return-values/_config.js index ffd7bf40fdb..df2edb7831b 100644 --- a/test/form/samples/function-body-return-values/_config.js +++ b/test/form/samples/function-body-return-values/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly extract return values from function bodies' }); diff --git a/test/form/samples/function-call-parameters/_config.js b/test/form/samples/function-call-parameters/_config.js index 0018dcaa5da..097877563f5 100644 --- a/test/form/samples/function-call-parameters/_config.js +++ b/test/form/samples/function-call-parameters/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'take actual parameters into account when determining side-effects of calls to functions' }); diff --git a/test/form/samples/function-iterable-prototype/_config.js b/test/form/samples/function-iterable-prototype/_config.js index 5e60497e737..68a969a9ddd 100644 --- a/test/form/samples/function-iterable-prototype/_config.js +++ b/test/form/samples/function-iterable-prototype/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Removes unused functions where the prototype is iterable', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/function-mutation/_config.js b/test/form/samples/function-mutation/_config.js index 4911b805d2d..6c2feccf835 100644 --- a/test/form/samples/function-mutation/_config.js +++ b/test/form/samples/function-mutation/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'function-mutations do not have effects', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/function-scopes/_config.js b/test/form/samples/function-scopes/_config.js index db79e63f5fd..9712643a9f1 100644 --- a/test/form/samples/function-scopes/_config.js +++ b/test/form/samples/function-scopes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly associate or shadow variables in and around functions' }); diff --git a/test/form/samples/generated-code-compact/arrow-functions-false/_config.js b/test/form/samples/generated-code-compact/arrow-functions-false/_config.js index 11f7d936035..87cfa0b05c1 100644 --- a/test/form/samples/generated-code-compact/arrow-functions-false/_config.js +++ b/test/form/samples/generated-code-compact/arrow-functions-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use arrow functions', options: { external: [ diff --git a/test/form/samples/generated-code-compact/arrow-functions-true/_config.js b/test/form/samples/generated-code-compact/arrow-functions-true/_config.js index 22fdc661345..1633c1df78b 100644 --- a/test/form/samples/generated-code-compact/arrow-functions-true/_config.js +++ b/test/form/samples/generated-code-compact/arrow-functions-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses arrow functions', options: { external: [ diff --git a/test/form/samples/generated-code-compact/const-bindings-false/_config.js b/test/form/samples/generated-code-compact/const-bindings-false/_config.js index 7c0d08061a4..9691c14972d 100644 --- a/test/form/samples/generated-code-compact/const-bindings-false/_config.js +++ b/test/form/samples/generated-code-compact/const-bindings-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use block bindings', expectedWarnings: ['SHIMMED_EXPORT'], options: { diff --git a/test/form/samples/generated-code-compact/const-bindings-true/_config.js b/test/form/samples/generated-code-compact/const-bindings-true/_config.js index 9265f9f753b..6ca26806987 100644 --- a/test/form/samples/generated-code-compact/const-bindings-true/_config.js +++ b/test/form/samples/generated-code-compact/const-bindings-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses block bindings', expectedWarnings: ['SHIMMED_EXPORT'], options: { diff --git a/test/form/samples/generated-code-compact/object-shorthand-false/_config.js b/test/form/samples/generated-code-compact/object-shorthand-false/_config.js index c9a001f24b1..754cb7f6c20 100644 --- a/test/form/samples/generated-code-compact/object-shorthand-false/_config.js +++ b/test/form/samples/generated-code-compact/object-shorthand-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use object shorthand syntax', options: { output: { diff --git a/test/form/samples/generated-code-compact/object-shorthand-true/_config.js b/test/form/samples/generated-code-compact/object-shorthand-true/_config.js index 8174a734e2d..ecdbd32adf6 100644 --- a/test/form/samples/generated-code-compact/object-shorthand-true/_config.js +++ b/test/form/samples/generated-code-compact/object-shorthand-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses object shorthand syntax', options: { output: { diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-false-no-external-live-bindings/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-false-no-external-live-bindings/_config.js index 8fb76684d27..72d79eee8b1 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-false-no-external-live-bindings/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-false-no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props when external live-bindings are off', options: { external: ['external'], diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js index 75346a26594..f3e0a40386f 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props', options: { external: ['external', 'external2', 'externalDefaultOnly'], diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-true-no-external-live-bindings/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-true-no-external-live-bindings/_config.js index a7f9903f2dd..90192827fa9 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-true-no-external-live-bindings/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-true-no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props when external live-bindings are off', options: { external: ['external'], diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js index f01cb5e2587..c887d33f211 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props', options: { external: ['external', 'external2', 'externalDefaultOnly'], diff --git a/test/form/samples/generated-code-presets/es2015/_config.js b/test/form/samples/generated-code-presets/es2015/_config.js index 2077a015402..8e72689d33e 100644 --- a/test/form/samples/generated-code-presets/es2015/_config.js +++ b/test/form/samples/generated-code-presets/es2015/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles generatedCode preset "es2015"', options: { output: { diff --git a/test/form/samples/generated-code-presets/es5/_config.js b/test/form/samples/generated-code-presets/es5/_config.js index 59503e74832..192e07d1975 100644 --- a/test/form/samples/generated-code-presets/es5/_config.js +++ b/test/form/samples/generated-code-presets/es5/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles generatedCode preset "es5"', options: { output: { diff --git a/test/form/samples/generated-code-presets/preset-with-override/_config.js b/test/form/samples/generated-code-presets/preset-with-override/_config.js index ed00d1d7ec1..6eb7cdd1d42 100644 --- a/test/form/samples/generated-code-presets/preset-with-override/_config.js +++ b/test/form/samples/generated-code-presets/preset-with-override/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles generatedCode preset "es2015"', options: { output: { diff --git a/test/form/samples/generated-code/arrow-functions-false/_config.js b/test/form/samples/generated-code/arrow-functions-false/_config.js index 14790217621..7e1fdb591a6 100644 --- a/test/form/samples/generated-code/arrow-functions-false/_config.js +++ b/test/form/samples/generated-code/arrow-functions-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use arrow functions', options: { external: [ diff --git a/test/form/samples/generated-code/arrow-functions-true/_config.js b/test/form/samples/generated-code/arrow-functions-true/_config.js index bd3bd911279..f384a5418b3 100644 --- a/test/form/samples/generated-code/arrow-functions-true/_config.js +++ b/test/form/samples/generated-code/arrow-functions-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses arrow functions', options: { external: [ diff --git a/test/form/samples/generated-code/const-bindings-false/_config.js b/test/form/samples/generated-code/const-bindings-false/_config.js index 83f80bbec49..15ec08c7f33 100644 --- a/test/form/samples/generated-code/const-bindings-false/_config.js +++ b/test/form/samples/generated-code/const-bindings-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use block bindings', expectedWarnings: ['SHIMMED_EXPORT'], options: { diff --git a/test/form/samples/generated-code/const-bindings-true/_config.js b/test/form/samples/generated-code/const-bindings-true/_config.js index 2c4742583ad..1047af6ecb8 100644 --- a/test/form/samples/generated-code/const-bindings-true/_config.js +++ b/test/form/samples/generated-code/const-bindings-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses block bindings', expectedWarnings: ['SHIMMED_EXPORT'], options: { diff --git a/test/form/samples/generated-code/object-shorthand-false/_config.js b/test/form/samples/generated-code/object-shorthand-false/_config.js index 2433cd854f3..dabf728a180 100644 --- a/test/form/samples/generated-code/object-shorthand-false/_config.js +++ b/test/form/samples/generated-code/object-shorthand-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use object shorthand syntax', options: { output: { diff --git a/test/form/samples/generated-code/object-shorthand-true/_config.js b/test/form/samples/generated-code/object-shorthand-true/_config.js index 9c3b5120b2f..65f0bd04d5f 100644 --- a/test/form/samples/generated-code/object-shorthand-true/_config.js +++ b/test/form/samples/generated-code/object-shorthand-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses object shorthand syntax', options: { output: { diff --git a/test/form/samples/generated-code/reserved-names-as-props-false-no-external-live-bindings/_config.js b/test/form/samples/generated-code/reserved-names-as-props-false-no-external-live-bindings/_config.js index 8fa516c69a4..67a2c60fe84 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-false-no-external-live-bindings/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-false-no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props when external live-bindings are off', options: { external: ['external'], diff --git a/test/form/samples/generated-code/reserved-names-as-props-false/_config.js b/test/form/samples/generated-code/reserved-names-as-props-false/_config.js index b3b555d8de5..aa0c9a40e22 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-false/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props', options: { external: ['external', 'external2', 'externalDefaultOnly'], diff --git a/test/form/samples/generated-code/reserved-names-as-props-true-no-external-live-bindings/_config.js b/test/form/samples/generated-code/reserved-names-as-props-true-no-external-live-bindings/_config.js index 9ec41583287..973c1253e16 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-true-no-external-live-bindings/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-true-no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props when external live-bindings are off', options: { external: ['external'], diff --git a/test/form/samples/generated-code/reserved-names-as-props-true/_config.js b/test/form/samples/generated-code/reserved-names-as-props-true/_config.js index a016b187f5a..a57f3100eaa 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-true/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'escapes reserved names used as props', options: { external: ['external', 'external2', 'externalDefaultOnly'], diff --git a/test/form/samples/getter-return-values/_config.js b/test/form/samples/getter-return-values/_config.js index 809dd3d97b3..49e4e90c27e 100644 --- a/test/form/samples/getter-return-values/_config.js +++ b/test/form/samples/getter-return-values/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'forwards return values of getters' }); diff --git a/test/form/samples/globals-function/_config.js b/test/form/samples/globals-function/_config.js index 2218245df7e..a4725202ba2 100644 --- a/test/form/samples/globals-function/_config.js +++ b/test/form/samples/globals-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Externals aliases with deshadowing', options: { external: ['a', 'b'], diff --git a/test/form/samples/globals-removes-access-to-pure-function-members/_config.js b/test/form/samples/globals-removes-access-to-pure-function-members/_config.js index 134787712d4..b3d3d53f49e 100644 --- a/test/form/samples/globals-removes-access-to-pure-function-members/_config.js +++ b/test/form/samples/globals-removes-access-to-pure-function-members/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'accessing members of pure functions and their prototypes is not a side-effect' }); diff --git a/test/form/samples/guessed-global-names/_config.js b/test/form/samples/guessed-global-names/_config.js index e89a0ff090f..5f26cbab993 100644 --- a/test/form/samples/guessed-global-names/_config.js +++ b/test/form/samples/guessed-global-names/_config.js @@ -1,6 +1,6 @@ const { resolve } = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'guesses global names if necessary', expectedWarnings: ['MISSING_GLOBAL_NAME'], options: { diff --git a/test/form/samples/handles-async-await/_config.js b/test/form/samples/handles-async-await/_config.js index ac44c37ae13..cf026ce4bd2 100644 --- a/test/form/samples/handles-async-await/_config.js +++ b/test/form/samples/handles-async-await/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly handles exporting async functions' }); diff --git a/test/form/samples/handles-empty-imports-iife/_config.js b/test/form/samples/handles-empty-imports-iife/_config.js index 3c19f3cadad..0cc79137cf7 100644 --- a/test/form/samples/handles-empty-imports-iife/_config.js +++ b/test/form/samples/handles-empty-imports-iife/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles empty imports when generating IIFE output', expectedWarnings: ['MISSING_NODE_BUILTINS', 'UNRESOLVED_IMPORT'], options: { diff --git a/test/form/samples/handles-empty-imports-umd/_config.js b/test/form/samples/handles-empty-imports-umd/_config.js index 4ea87a66b72..1226ef2187e 100644 --- a/test/form/samples/handles-empty-imports-umd/_config.js +++ b/test/form/samples/handles-empty-imports-umd/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles empty imports when generating IIFE output', expectedWarnings: ['MISSING_NODE_BUILTINS', 'UNRESOLVED_IMPORT'], options: { diff --git a/test/form/samples/hashbang/_config.js b/test/form/samples/hashbang/_config.js index 3bbf86a1bdb..36eb1925f10 100644 --- a/test/form/samples/hashbang/_config.js +++ b/test/form/samples/hashbang/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports input files with leading hashbang comment' }); diff --git a/test/form/samples/hoisted-unused-conditional/_config.js b/test/form/samples/hoisted-unused-conditional/_config.js index f51dcc48d23..8607e410006 100644 --- a/test/form/samples/hoisted-unused-conditional/_config.js +++ b/test/form/samples/hoisted-unused-conditional/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Properly renders conditionals in hoisted variables in dead branches' }); diff --git a/test/form/samples/hoisted-variable-case-stmt/_config.js b/test/form/samples/hoisted-variable-case-stmt/_config.js index 0d62218c41e..156c5550180 100644 --- a/test/form/samples/hoisted-variable-case-stmt/_config.js +++ b/test/form/samples/hoisted-variable-case-stmt/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Properly handles a variable hoisted from within a fallthrough switch case' }); diff --git a/test/form/samples/hoisted-variable-if-stmt/_config.js b/test/form/samples/hoisted-variable-if-stmt/_config.js index 220e05ab9c3..c18b43edd40 100644 --- a/test/form/samples/hoisted-variable-if-stmt/_config.js +++ b/test/form/samples/hoisted-variable-if-stmt/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Properly renders branches which refer to hoisted variables from other lexical scopes' }); diff --git a/test/form/samples/hoisted-vars-in-dead-branches/_config.js b/test/form/samples/hoisted-vars-in-dead-branches/_config.js index 28298ee7a8c..39dc21c20f7 100644 --- a/test/form/samples/hoisted-vars-in-dead-branches/_config.js +++ b/test/form/samples/hoisted-vars-in-dead-branches/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renders hoisted variables in dead branches' }); diff --git a/test/form/samples/ignore-property-access-side-effects/_config.js b/test/form/samples/ignore-property-access-side-effects/_config.js index 5fa71af82ec..005169f9446 100644 --- a/test/form/samples/ignore-property-access-side-effects/_config.js +++ b/test/form/samples/ignore-property-access-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ignore side-effects when accessing properties if treeshake.propertyReadSideEffects is false', expectedWarnings: ['EMPTY_BUNDLE'], diff --git a/test/form/samples/ignore-unknown-global-side-effects/_config.js b/test/form/samples/ignore-unknown-global-side-effects/_config.js index ed28343d5db..748249b9a28 100644 --- a/test/form/samples/ignore-unknown-global-side-effects/_config.js +++ b/test/form/samples/ignore-unknown-global-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ignore side-effects when accessing unknown globals if treeshake.unknownGlobalSideEffects is false', expectedWarnings: ['EMPTY_BUNDLE'], diff --git a/test/form/samples/implicit-undefined-assignments/_config.js b/test/form/samples/implicit-undefined-assignments/_config.js index 4d5ee8cfe86..6d5dc6e2e4c 100644 --- a/test/form/samples/implicit-undefined-assignments/_config.js +++ b/test/form/samples/implicit-undefined-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Make sure implicit undefined assignments in declarations are not ignored' }); diff --git a/test/form/samples/import-assertions/assertion-shapes/_config.js b/test/form/samples/import-assertions/assertion-shapes/_config.js index fc2dadcf720..f9cabf114a2 100644 --- a/test/form/samples/import-assertions/assertion-shapes/_config.js +++ b/test/form/samples/import-assertions/assertion-shapes/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles special shapes of assertions', expectedWarnings: 'UNRESOLVED_IMPORT', options: { diff --git a/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js b/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js index dcea363517f..73738f45247 100644 --- a/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js +++ b/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keep import assertions for dynamic imports', expectedWarnings: 'UNRESOLVED_IMPORT', options: { diff --git a/test/form/samples/import-assertions/keeps-static-assertions/_config.js b/test/form/samples/import-assertions/keeps-static-assertions/_config.js index e2b6e2fadca..8780ad60a25 100644 --- a/test/form/samples/import-assertions/keeps-static-assertions/_config.js +++ b/test/form/samples/import-assertions/keeps-static-assertions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps any import assertions on input', expectedWarnings: 'UNRESOLVED_IMPORT', options: { diff --git a/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js b/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js index 705f5372c06..4c84b75cd60 100644 --- a/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js +++ b/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows plugins to read and write import assertions in resolveDynamicImport', options: { plugins: [ diff --git a/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js b/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js index 8e1d0d22f21..888ed7debaa 100644 --- a/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js +++ b/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows plugins to read and write import assertions in resolveId', options: { output: { name: 'bundle' }, diff --git a/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js b/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js index 7b9eafb91b9..16f84153d22 100644 --- a/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js +++ b/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keep import assertions for dynamic imports', expectedWarnings: 'UNRESOLVED_IMPORT', options: { diff --git a/test/form/samples/import-assertions/removes-static-assertions/_config.js b/test/form/samples/import-assertions/removes-static-assertions/_config.js index df695082f97..e48102f7749 100644 --- a/test/form/samples/import-assertions/removes-static-assertions/_config.js +++ b/test/form/samples/import-assertions/removes-static-assertions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps any import assertions on input', expectedWarnings: 'UNRESOLVED_IMPORT', options: { diff --git a/test/form/samples/import-expression/_config.js b/test/form/samples/import-expression/_config.js index 3fffea31156..d9da2eb415a 100644 --- a/test/form/samples/import-expression/_config.js +++ b/test/form/samples/import-expression/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly transforms variables in imported expressions', options: { external: 'external', diff --git a/test/form/samples/import-external-namespace-and-default/_config.js b/test/form/samples/import-external-namespace-and-default/_config.js index 10b6cf1370a..b2346601267 100644 --- a/test/form/samples/import-external-namespace-and-default/_config.js +++ b/test/form/samples/import-external-namespace-and-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disinguishes between external default and namespace (#637)', options: { external: ['foo'], diff --git a/test/form/samples/import-meta-resolve/_config.js b/test/form/samples/import-meta-resolve/_config.js index 9305bb6d0b0..ec452a28ec0 100644 --- a/test/form/samples/import-meta-resolve/_config.js +++ b/test/form/samples/import-meta-resolve/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports import.meta.resolve' }); diff --git a/test/form/samples/import-meta-url/_config.js b/test/form/samples/import-meta-url/_config.js index 6134e26f892..4a331c30c54 100644 --- a/test/form/samples/import-meta-url/_config.js +++ b/test/form/samples/import-meta-url/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports import.meta.url' }); diff --git a/test/form/samples/import-meta/_config.js b/test/form/samples/import-meta/_config.js index 4f5c26781be..e44c1592c0d 100644 --- a/test/form/samples/import-meta/_config.js +++ b/test/form/samples/import-meta/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports directly accessing import.meta' }); diff --git a/test/form/samples/import-named-exported-global-with-alias/_config.js b/test/form/samples/import-named-exported-global-with-alias/_config.js index 4600b518eae..2be7a8e17af 100644 --- a/test/form/samples/import-named-exported-global-with-alias/_config.js +++ b/test/form/samples/import-named-exported-global-with-alias/_config.js @@ -1,7 +1,7 @@ // Changed due to https://github.com/acornjs/acorn/issues/806 // Consider reverting this change should this become an acorn option -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allow globals to be exported and imported', expectedWarnings: ['EMPTY_BUNDLE'], options: { output: { name: 'doc' } } diff --git a/test/form/samples/import-namespace-systemjs/_config.js b/test/form/samples/import-namespace-systemjs/_config.js index cad27ebbcf1..5fc7ae30401 100644 --- a/test/form/samples/import-namespace-systemjs/_config.js +++ b/test/form/samples/import-namespace-systemjs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports namespace (systemjs only)', options: { external: ['dependency'], diff --git a/test/form/samples/import-namespace/_config.js b/test/form/samples/import-namespace/_config.js index 282c01cc774..abd8444309d 100644 --- a/test/form/samples/import-namespace/_config.js +++ b/test/form/samples/import-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports external namespaces', options: { external: ['foo', 'bar'], diff --git a/test/form/samples/import-specifier-deshadowing/_config.js b/test/form/samples/import-specifier-deshadowing/_config.js index 8e97e465ed0..eb4603a66f3 100644 --- a/test/form/samples/import-specifier-deshadowing/_config.js +++ b/test/form/samples/import-specifier-deshadowing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deshadows aliased import bindings', options: { external: ['react-sticky'], diff --git a/test/form/samples/include-recursive-call-arguments/_config.js b/test/form/samples/include-recursive-call-arguments/_config.js index b6c0b74215e..5e5931e99ec 100644 --- a/test/form/samples/include-recursive-call-arguments/_config.js +++ b/test/form/samples/include-recursive-call-arguments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles recursive declarations' }); diff --git a/test/form/samples/includes-all-namespace-declarations/_config.js b/test/form/samples/includes-all-namespace-declarations/_config.js index 9bced2e495c..a0c51a54418 100644 --- a/test/form/samples/includes-all-namespace-declarations/_config.js +++ b/test/form/samples/includes-all-namespace-declarations/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes all declarations referenced by reified namespaces', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/indent-false/_config.js b/test/form/samples/indent-false/_config.js index 443d4ddb366..163c898084f 100644 --- a/test/form/samples/indent-false/_config.js +++ b/test/form/samples/indent-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not indent with indent: false', options: { output: { diff --git a/test/form/samples/indent-spaces/_config.js b/test/form/samples/indent-spaces/_config.js index 034cb694c6b..cc9b301eca6 100644 --- a/test/form/samples/indent-spaces/_config.js +++ b/test/form/samples/indent-spaces/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'auto-indents with indent: true', options: { output: { diff --git a/test/form/samples/indent-true-spaces/_config.js b/test/form/samples/indent-true-spaces/_config.js index 0ef60423d5f..a06b41859d6 100644 --- a/test/form/samples/indent-true-spaces/_config.js +++ b/test/form/samples/indent-true-spaces/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'auto-indents with spaces and indent: true', options: { output: { diff --git a/test/form/samples/indent-true/_config.js b/test/form/samples/indent-true/_config.js index 32dd149bbce..d31ad024e90 100644 --- a/test/form/samples/indent-true/_config.js +++ b/test/form/samples/indent-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'auto-indents with indent: true', options: { output: { diff --git a/test/form/samples/inlined-treeshaken-dynamic-import/_config.js b/test/form/samples/inlined-treeshaken-dynamic-import/_config.js index bb750e9d12a..58505c25d55 100644 --- a/test/form/samples/inlined-treeshaken-dynamic-import/_config.js +++ b/test/form/samples/inlined-treeshaken-dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'completely removes tree-shaken dynamic imports ', options: { output: { inlineDynamicImports: true } diff --git a/test/form/samples/internal-conflict-resolution/_config.js b/test/form/samples/internal-conflict-resolution/_config.js index 8a652879095..bd2f02eb476 100644 --- a/test/form/samples/internal-conflict-resolution/_config.js +++ b/test/form/samples/internal-conflict-resolution/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'internal name conflicts are resolved sanely' }); diff --git a/test/form/samples/interop-per-dependency-no-freeze/_config.js b/test/form/samples/interop-per-dependency-no-freeze/_config.js index b8583d2304a..643107e326b 100644 --- a/test/form/samples/interop-per-dependency-no-freeze/_config.js +++ b/test/form/samples/interop-per-dependency-no-freeze/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects the freeze option', options: { external: id => id.startsWith('external'), diff --git a/test/form/samples/interop-per-dependency-no-live-binding/_config.js b/test/form/samples/interop-per-dependency-no-live-binding/_config.js index 3d377aad157..902bb6f7ad2 100644 --- a/test/form/samples/interop-per-dependency-no-live-binding/_config.js +++ b/test/form/samples/interop-per-dependency-no-live-binding/_config.js @@ -1,6 +1,6 @@ const checkedIds = new Set(); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to configure the interop type per external dependency', options: { external: id => id.startsWith('external'), diff --git a/test/form/samples/interop-per-dependency/_config.js b/test/form/samples/interop-per-dependency/_config.js index d42a1d95645..5580001d100 100644 --- a/test/form/samples/interop-per-dependency/_config.js +++ b/test/form/samples/interop-per-dependency/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to configure the interop type per external dependency', options: { external: id => id.startsWith('external'), diff --git a/test/form/samples/interop-per-reexported-dependency/_config.js b/test/form/samples/interop-per-reexported-dependency/_config.js index 0fc17379fd2..4ae0e74a974 100644 --- a/test/form/samples/interop-per-reexported-dependency/_config.js +++ b/test/form/samples/interop-per-reexported-dependency/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to configure the interop type per reexported external dependency', options: { external: id => id.startsWith('external'), diff --git a/test/form/samples/intro-and-outro/_config.js b/test/form/samples/intro-and-outro/_config.js index 7db771251e0..f617693382b 100644 --- a/test/form/samples/intro-and-outro/_config.js +++ b/test/form/samples/intro-and-outro/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds an intro/outro', options: { output: { diff --git a/test/form/samples/invalid-binary-expressions/_config.js b/test/form/samples/invalid-binary-expressions/_config.js index 750becd6877..9793cc6d678 100644 --- a/test/form/samples/invalid-binary-expressions/_config.js +++ b/test/form/samples/invalid-binary-expressions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Does not fail when bundling code where the `in`-operator is used with invalid right sides' }); diff --git a/test/form/samples/json-parse-is-not-pure/_config.js b/test/form/samples/json-parse-is-not-pure/_config.js index 5a57e77f632..667c498f718 100644 --- a/test/form/samples/json-parse-is-not-pure/_config.js +++ b/test/form/samples/json-parse-is-not-pure/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'JSON.parse is not pure as it can throw on invalid json strings', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/json-stringify-is-not-pure/_config.js b/test/form/samples/json-stringify-is-not-pure/_config.js index 424571d2e37..9573e383bfa 100644 --- a/test/form/samples/json-stringify-is-not-pure/_config.js +++ b/test/form/samples/json-stringify-is-not-pure/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'JSON.stringify is not pure as it can throw on circular structures', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/keep-property-access-side-effects/_config.js b/test/form/samples/keep-property-access-side-effects/_config.js index 638bfe94d1d..f08c79347ca 100644 --- a/test/form/samples/keep-property-access-side-effects/_config.js +++ b/test/form/samples/keep-property-access-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keep side-effects when accessing properties if treeshake.propertyReadSideEffects is true', options: { diff --git a/test/form/samples/keep-tree-shaking-comments-no-asi/_config.js b/test/form/samples/keep-tree-shaking-comments-no-asi/_config.js index 6f0563f6f81..d0e04ee0cb5 100644 --- a/test/form/samples/keep-tree-shaking-comments-no-asi/_config.js +++ b/test/form/samples/keep-tree-shaking-comments-no-asi/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'always keep leading comments when tree-shaking and no automatic semicolons are inserted' }); diff --git a/test/form/samples/known-globals/_config.js b/test/form/samples/known-globals/_config.js index 72c13a19786..f14cb5d63a2 100644 --- a/test/form/samples/known-globals/_config.js +++ b/test/form/samples/known-globals/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not consider it a side-effect if a known global variable is accessed' }); diff --git a/test/form/samples/labeled-break-statements/_config.js b/test/form/samples/labeled-break-statements/_config.js index 19bfe578d50..20892371667 100644 --- a/test/form/samples/labeled-break-statements/_config.js +++ b/test/form/samples/labeled-break-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keep break statements if their label is included' }); diff --git a/test/form/samples/labeled-continue-statements/_config.js b/test/form/samples/labeled-continue-statements/_config.js index 1944fde4a05..9665ed990c0 100644 --- a/test/form/samples/labeled-continue-statements/_config.js +++ b/test/form/samples/labeled-continue-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keep continue statements if their label is included' }); diff --git a/test/form/samples/large-var-cnt-deduping/_config.js b/test/form/samples/large-var-cnt-deduping/_config.js index 16d2b46d07a..b26281f1e9c 100644 --- a/test/form/samples/large-var-cnt-deduping/_config.js +++ b/test/form/samples/large-var-cnt-deduping/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'large variable count deduping' }); diff --git a/test/form/samples/lazy-assignment-deoptimization/_config.js b/test/form/samples/lazy-assignment-deoptimization/_config.js index ab7c52b155f..040916440fd 100644 --- a/test/form/samples/lazy-assignment-deoptimization/_config.js +++ b/test/form/samples/lazy-assignment-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'only deoptimizes assigned variables when the assignment is included' }); diff --git a/test/form/samples/literals-from-class-statics/_config.js b/test/form/samples/literals-from-class-statics/_config.js index e3667def61f..e5a57c5caf1 100644 --- a/test/form/samples/literals-from-class-statics/_config.js +++ b/test/form/samples/literals-from-class-statics/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks literal values in class static fields' }); diff --git a/test/form/samples/literals-from-return-expressions/_config.js b/test/form/samples/literals-from-return-expressions/_config.js index 65cc8ecf1f9..e236d2ba647 100644 --- a/test/form/samples/literals-from-return-expressions/_config.js +++ b/test/form/samples/literals-from-return-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks literal values across return expressions' }); diff --git a/test/form/samples/logical-expression/deopzimize-while-included/_config.js b/test/form/samples/logical-expression/deopzimize-while-included/_config.js index 1fd8e5d3fe0..aba539b2fdb 100644 --- a/test/form/samples/logical-expression/deopzimize-while-included/_config.js +++ b/test/form/samples/logical-expression/deopzimize-while-included/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deoptimizations of logical expression while they are inlcuded (#3324)' }); diff --git a/test/form/samples/logical-expression/mutate-logical-expression/_config.js b/test/form/samples/logical-expression/mutate-logical-expression/_config.js index 57f4fd864fd..0446f8aa8be 100644 --- a/test/form/samples/logical-expression/mutate-logical-expression/_config.js +++ b/test/form/samples/logical-expression/mutate-logical-expression/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly handle the results of mutating logical expressions', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/logical-expression/simplify-non-boolean/_config.js b/test/form/samples/logical-expression/simplify-non-boolean/_config.js index 9e370979211..687f0950ff9 100644 --- a/test/form/samples/logical-expression/simplify-non-boolean/_config.js +++ b/test/form/samples/logical-expression/simplify-non-boolean/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'simplifies logical expressions that resolve statically to non-boolean values' }); diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js index aab8f51bce5..d199f6d5e55 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not normalize external paths when set to false', options: { makeAbsoluteExternalsRelative: false, diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js index 0b77a9a4d36..0271b599d0a 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'only normalizes external paths that were originally relative when set to "ifRelativeSource"', options: { diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js index e13641d2d05..9330d558d34 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'normalizes both relative and absolute external paths when set to true', options: { makeAbsoluteExternalsRelative: true, diff --git a/test/form/samples/manual-pure-functions/_config.js b/test/form/samples/manual-pure-functions/_config.js index 100bd23730f..246a6298b8b 100644 --- a/test/form/samples/manual-pure-functions/_config.js +++ b/test/form/samples/manual-pure-functions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to manually declare functions as pure by name', options: { treeshake: { manualPureFunctions: ['foo', 'bar.a'] } diff --git a/test/form/samples/merge-namespaces-non-live/_config.js b/test/form/samples/merge-namespaces-non-live/_config.js index 9fafea9ce67..7a35b13fc6d 100644 --- a/test/form/samples/merge-namespaces-non-live/_config.js +++ b/test/form/samples/merge-namespaces-non-live/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges namespaces without live-bindings', options: { external: ['external1', 'external2'], diff --git a/test/form/samples/merge-namespaces/_config.js b/test/form/samples/merge-namespaces/_config.js index 26130bb2db5..10ae05024a4 100644 --- a/test/form/samples/merge-namespaces/_config.js +++ b/test/form/samples/merge-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges namespaces with live-bindings', options: { external: ['external1', 'external2'], diff --git a/test/form/samples/minimal-this-mutation/_config.js b/test/form/samples/minimal-this-mutation/_config.js index d434e660dde..4a103617241 100644 --- a/test/form/samples/minimal-this-mutation/_config.js +++ b/test/form/samples/minimal-this-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'mutates "this" only if necessary on function calls' }); diff --git a/test/form/samples/mjs/_config.js b/test/form/samples/mjs/_config.js index c62e6488a9c..715a733d317 100644 --- a/test/form/samples/mjs/_config.js +++ b/test/form/samples/mjs/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports loading mjs with precedence', options: { output: { name: 'myBundle' } diff --git a/test/form/samples/modify-class-prototype/_config.js b/test/form/samples/modify-class-prototype/_config.js index 90e671db97f..e72a389e0d7 100644 --- a/test/form/samples/modify-class-prototype/_config.js +++ b/test/form/samples/modify-class-prototype/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tree-shakes prototype modifications of classes' }); diff --git a/test/form/samples/modify-export-semi/_config.js b/test/form/samples/modify-export-semi/_config.js index 7f64ac2c356..940d37cb3bc 100644 --- a/test/form/samples/modify-export-semi/_config.js +++ b/test/form/samples/modify-export-semi/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'inserts semicolons correctly when modifying SystemJS exports', formats: ['system'] }); diff --git a/test/form/samples/module-name-scoped-package/_config.js b/test/form/samples/module-name-scoped-package/_config.js index eefa0b281f4..f8007adfdf8 100644 --- a/test/form/samples/module-name-scoped-package/_config.js +++ b/test/form/samples/module-name-scoped-package/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows module name with dashes to be added to the global object', options: { output: { diff --git a/test/form/samples/module-name-wat/_config.js b/test/form/samples/module-name-wat/_config.js index d07ecf82ef6..ba778abf7a4 100644 --- a/test/form/samples/module-name-wat/_config.js +++ b/test/form/samples/module-name-wat/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly dereferences properties on the global object regardless of nesting', options: { output: { name: 'foo.@scoped/npm-package.bar.why-would-you-do-this' } diff --git a/test/form/samples/module-name-with-dashes/_config.js b/test/form/samples/module-name-with-dashes/_config.js index 37d5cf1266a..635eda74c3b 100644 --- a/test/form/samples/module-name-with-dashes/_config.js +++ b/test/form/samples/module-name-with-dashes/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows module name with dashes to be added to the global object', options: { output: { diff --git a/test/form/samples/module-no-treeshake/_config.js b/test/form/samples/module-no-treeshake/_config.js index 5ed69f37159..db7e5f18a88 100644 --- a/test/form/samples/module-no-treeshake/_config.js +++ b/test/form/samples/module-no-treeshake/_config.js @@ -2,7 +2,7 @@ function getCode(id) { return `const unused = 'unused in ${id}';`; } -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows disabling tree-shaking for modules', options: { plugins: { diff --git a/test/form/samples/multi-expression-calls/_config.js b/test/form/samples/multi-expression-calls/_config.js index 6795de4e18b..80292784761 100644 --- a/test/form/samples/multi-expression-calls/_config.js +++ b/test/form/samples/multi-expression-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles side-effect-free multi-expressions' }); diff --git a/test/form/samples/multiple-exports/_config.js b/test/form/samples/multiple-exports/_config.js index 369f73548c0..1ae72acd952 100644 --- a/test/form/samples/multiple-exports/_config.js +++ b/test/form/samples/multiple-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'multiple named exports', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/mutations-in-imports/_config.js b/test/form/samples/mutations-in-imports/_config.js index e87f40de584..6adcaee7b4d 100644 --- a/test/form/samples/mutations-in-imports/_config.js +++ b/test/form/samples/mutations-in-imports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track mutations of imports' }); diff --git a/test/form/samples/namespace-conflict/_config.js b/test/form/samples/namespace-conflict/_config.js index f9ca027d8bf..da7e20ebf22 100644 --- a/test/form/samples/namespace-conflict/_config.js +++ b/test/form/samples/namespace-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'replaces conflicting namespace properties with undefined', expectedWarnings: ['NAMESPACE_CONFLICT', 'MISSING_EXPORT'] }); diff --git a/test/form/samples/namespace-import-reexport-2/_config.js b/test/form/samples/namespace-import-reexport-2/_config.js index 80559ff12be..d21220d4db9 100644 --- a/test/form/samples/namespace-import-reexport-2/_config.js +++ b/test/form/samples/namespace-import-reexport-2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly associate or shadow variables in and around functions', options: { external: ['external1', 'external2'], diff --git a/test/form/samples/namespace-import-reexport/_config.js b/test/form/samples/namespace-import-reexport/_config.js index 57e5b514ccb..eaf653150ce 100644 --- a/test/form/samples/namespace-import-reexport/_config.js +++ b/test/form/samples/namespace-import-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly associate or shadow variables in and around functions', options: { external: ['external-package'], diff --git a/test/form/samples/namespace-missing-export-effects/_config.js b/test/form/samples/namespace-missing-export-effects/_config.js index 0a0160a4ddc..11446e94688 100644 --- a/test/form/samples/namespace-missing-export-effects/_config.js +++ b/test/form/samples/namespace-missing-export-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles interacting with missing namespace members', expectedWarnings: ['MISSING_EXPORT'] }); diff --git a/test/form/samples/namespace-object-import/_config.js b/test/form/samples/namespace-object-import/_config.js index 7648e545319..cdd9a10a2ce 100644 --- a/test/form/samples/namespace-object-import/_config.js +++ b/test/form/samples/namespace-object-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly encodes reserved names if namespace import is used', options: { input: ['main.js'] diff --git a/test/form/samples/namespace-optimization-b/_config.js b/test/form/samples/namespace-optimization-b/_config.js index 625773b0010..2d09245c688 100644 --- a/test/form/samples/namespace-optimization-b/_config.js +++ b/test/form/samples/namespace-optimization-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'it does static lookup optimization of internal namespaces, coping with multiple namespaces in one function' }); diff --git a/test/form/samples/namespace-optimization-computed-string/_config.js b/test/form/samples/namespace-optimization-computed-string/_config.js index f79deb7ecae..704326185fa 100644 --- a/test/form/samples/namespace-optimization-computed-string/_config.js +++ b/test/form/samples/namespace-optimization-computed-string/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'it does dynamic lookup optimization of internal namespaces for string-literal keys' }); diff --git a/test/form/samples/namespace-optimization/_config.js b/test/form/samples/namespace-optimization/_config.js index 61fbca905c9..88e1dacf88a 100644 --- a/test/form/samples/namespace-optimization/_config.js +++ b/test/form/samples/namespace-optimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'it does static lookup optimization of internal namespaces' }); diff --git a/test/form/samples/namespace-reexport-name/_config.js b/test/form/samples/namespace-reexport-name/_config.js index 0ec76de4a3b..457788b4116 100644 --- a/test/form/samples/namespace-reexport-name/_config.js +++ b/test/form/samples/namespace-reexport-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct names when reexporting from namespace reexports (#4049)', options: { external: 'external', output: { name: 'bundle' } } }); diff --git a/test/form/samples/namespace-self-import/_config.js b/test/form/samples/namespace-self-import/_config.js index aa9678ae9f9..0400c5303cb 100644 --- a/test/form/samples/namespace-self-import/_config.js +++ b/test/form/samples/namespace-self-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'namespace early import hoisting', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/form/samples/namespace-tostring/entry-default/_config.js b/test/form/samples/namespace-tostring/entry-default/_config.js index 083f5a6de58..b0971867c35 100644 --- a/test/form/samples/namespace-tostring/entry-default/_config.js +++ b/test/form/samples/namespace-tostring/entry-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not add Symbol.toStringTag property to entry chunks with default export mode', options: { output: { diff --git a/test/form/samples/namespace-tostring/entry-named/_config.js b/test/form/samples/namespace-tostring/entry-named/_config.js index 24c707b8325..b0a2337b448 100644 --- a/test/form/samples/namespace-tostring/entry-named/_config.js +++ b/test/form/samples/namespace-tostring/entry-named/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to entry chunks with named exports', options: { output: { diff --git a/test/form/samples/namespace-tostring/external-namespaces/_config.js b/test/form/samples/namespace-tostring/external-namespaces/_config.js index 0ffb031167f..ad8b50cc11a 100644 --- a/test/form/samples/namespace-tostring/external-namespaces/_config.js +++ b/test/form/samples/namespace-tostring/external-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to external namespaces', options: { external(id) { diff --git a/test/form/samples/namespace-tostring/inlined-namespace-static-resolution/_config.js b/test/form/samples/namespace-tostring/inlined-namespace-static-resolution/_config.js index ade8e99767a..0b1bcb348c6 100644 --- a/test/form/samples/namespace-tostring/inlined-namespace-static-resolution/_config.js +++ b/test/form/samples/namespace-tostring/inlined-namespace-static-resolution/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'statically resolves Symbol.toStringTag for inlined namespaces', expectedWarnings: ['MISSING_EXPORT'], options: { diff --git a/test/form/samples/namespace-tostring/inlined-namespace/_config.js b/test/form/samples/namespace-tostring/inlined-namespace/_config.js index 34c95be1857..84f1a0b3d2c 100644 --- a/test/form/samples/namespace-tostring/inlined-namespace/_config.js +++ b/test/form/samples/namespace-tostring/inlined-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to inlined namespaces', options: { output: { diff --git a/test/form/samples/namespaced-default-exports/_config.js b/test/form/samples/namespaced-default-exports/_config.js index e03a07a0ea7..78f1c95d7a1 100644 --- a/test/form/samples/namespaced-default-exports/_config.js +++ b/test/form/samples/namespaced-default-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates namespaced module names', options: { output: { name: 'foo.bar.baz' } } }); diff --git a/test/form/samples/namespaced-named-exports/_config.js b/test/form/samples/namespaced-named-exports/_config.js index e03a07a0ea7..78f1c95d7a1 100644 --- a/test/form/samples/namespaced-named-exports/_config.js +++ b/test/form/samples/namespaced-named-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates namespaced module names', options: { output: { name: 'foo.bar.baz' } } }); diff --git a/test/form/samples/namespaces-have-null-prototype/_config.js b/test/form/samples/namespaces-have-null-prototype/_config.js index e81fda2113e..01d92a96f28 100644 --- a/test/form/samples/namespaces-have-null-prototype/_config.js +++ b/test/form/samples/namespaces-have-null-prototype/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates namespaces with null prototypes', options: { output: { name: 'myBundle' } diff --git a/test/form/samples/nested-deoptimization/_config.js b/test/form/samples/nested-deoptimization/_config.js index 402bcd58d78..21cd6f596f4 100644 --- a/test/form/samples/nested-deoptimization/_config.js +++ b/test/form/samples/nested-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deoptimization of nested properties' }); diff --git a/test/form/samples/nested-inlined-dynamic-import/_config.js b/test/form/samples/nested-inlined-dynamic-import/_config.js index 78a1a88a0ad..da6eca5d69a 100644 --- a/test/form/samples/nested-inlined-dynamic-import/_config.js +++ b/test/form/samples/nested-inlined-dynamic-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts variables when nested dynamic imports are inlined', options: { output: { inlineDynamicImports: true } diff --git a/test/form/samples/nested-member-access/_config.js b/test/form/samples/nested-member-access/_config.js index 6011af56071..e15fc6430df 100644 --- a/test/form/samples/nested-member-access/_config.js +++ b/test/form/samples/nested-member-access/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throw an error when accessing members of null or undefined' }); diff --git a/test/form/samples/nested-pure-comments/_config.js b/test/form/samples/nested-pure-comments/_config.js index 0dd09a61853..0891a42f0da 100644 --- a/test/form/samples/nested-pure-comments/_config.js +++ b/test/form/samples/nested-pure-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly associates pure comments before sequence expressions etc.' }); diff --git a/test/form/samples/nested-this-expressions/_config.js b/test/form/samples/nested-this-expressions/_config.js index b8bc5b64dc4..d54b9366b3d 100644 --- a/test/form/samples/nested-this-expressions/_config.js +++ b/test/form/samples/nested-this-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly keep or ignore nested "this"-expressions' }); diff --git a/test/form/samples/nested-tree-shaking/_config.js b/test/form/samples/nested-tree-shaking/_config.js index b40b8d56c20..07001ced025 100644 --- a/test/form/samples/nested-tree-shaking/_config.js +++ b/test/form/samples/nested-tree-shaking/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unused nested statements' }); diff --git a/test/form/samples/new-target-meta-property/_config.js b/test/form/samples/new-target-meta-property/_config.js index 5b7327c2ae5..4a3867dbb81 100644 --- a/test/form/samples/new-target-meta-property/_config.js +++ b/test/form/samples/new-target-meta-property/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports the new.target meta property' }); diff --git a/test/form/samples/no-external-live-bindings-compact/_config.js b/test/form/samples/no-external-live-bindings-compact/_config.js index 05c5538a5e5..df3e7448f7b 100644 --- a/test/form/samples/no-external-live-bindings-compact/_config.js +++ b/test/form/samples/no-external-live-bindings-compact/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Allows omitting the code that handles external live bindings in compact mode', options: { external: () => true, diff --git a/test/form/samples/no-external-live-bindings/_config.js b/test/form/samples/no-external-live-bindings/_config.js index 1141f985c61..27dc80bbb56 100644 --- a/test/form/samples/no-external-live-bindings/_config.js +++ b/test/form/samples/no-external-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Allows omitting the code that handles external live bindings', options: { external: () => true, diff --git a/test/form/samples/no-imports-or-exports/_config.js b/test/form/samples/no-imports-or-exports/_config.js index e77b35b3310..aa847d49b30 100644 --- a/test/form/samples/no-imports-or-exports/_config.js +++ b/test/form/samples/no-imports-or-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'single module, no imports or exports' }); diff --git a/test/form/samples/no-treeshake-conflict/_config.js b/test/form/samples/no-treeshake-conflict/_config.js index aa79cf23fe0..eb63f37d959 100644 --- a/test/form/samples/no-treeshake-conflict/_config.js +++ b/test/form/samples/no-treeshake-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not introduce conflicting variables with treeshake: false', options: { output: { name: /* not shaken, but */ 'stirred' }, diff --git a/test/form/samples/no-treeshake-default-export-conflict/_config.js b/test/form/samples/no-treeshake-default-export-conflict/_config.js index c250014febc..0502768db48 100644 --- a/test/form/samples/no-treeshake-default-export-conflict/_config.js +++ b/test/form/samples/no-treeshake-default-export-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly deconflicts default exports when not tree-shaking', options: { treeshake: false diff --git a/test/form/samples/no-treeshake-include-labels/_config.js b/test/form/samples/no-treeshake-include-labels/_config.js index b527972ac8c..3e2a1f75970 100644 --- a/test/form/samples/no-treeshake-include-labels/_config.js +++ b/test/form/samples/no-treeshake-include-labels/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'always includes labels when tree-shaking is turned off (#3473)', expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { diff --git a/test/form/samples/no-treeshake-namespace-object/_config.js b/test/form/samples/no-treeshake-namespace-object/_config.js index 3aed395f1f7..58637fb03e5 100644 --- a/test/form/samples/no-treeshake-namespace-object/_config.js +++ b/test/form/samples/no-treeshake-namespace-object/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generates namespace objects when not tree-shaking', options: { treeshake: false diff --git a/test/form/samples/no-treeshake/_config.js b/test/form/samples/no-treeshake/_config.js index ed42d152ea9..bb626f86bb2 100644 --- a/test/form/samples/no-treeshake/_config.js +++ b/test/form/samples/no-treeshake/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'all code should be included if tree-shaking is disabled', options: { external: ['external'], diff --git a/test/form/samples/non-empty-block-statement/_config.js b/test/form/samples/non-empty-block-statement/_config.js index d750324f41d..0842b108698 100644 --- a/test/form/samples/non-empty-block-statement/_config.js +++ b/test/form/samples/non-empty-block-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not remove non an empty block statement' }); diff --git a/test/form/samples/ns-external-star-reexport/_config.js b/test/form/samples/ns-external-star-reexport/_config.js index 8e295e99b0d..506491a8046 100644 --- a/test/form/samples/ns-external-star-reexport/_config.js +++ b/test/form/samples/ns-external-star-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports namespaces with external star reexports', options: { external: ['external1', 'external2'], diff --git a/test/form/samples/nullish-coalescing/_config.js b/test/form/samples/nullish-coalescing/_config.js index f1ec28b9ef8..e5e84bbdbc1 100644 --- a/test/form/samples/nullish-coalescing/_config.js +++ b/test/form/samples/nullish-coalescing/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports tree-shaking with nullish-coalescing' }); diff --git a/test/form/samples/numeric_separators/_config.js b/test/form/samples/numeric_separators/_config.js index eb3e1a7d901..35361d09a58 100644 --- a/test/form/samples/numeric_separators/_config.js +++ b/test/form/samples/numeric_separators/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports numeric separators' }); diff --git a/test/form/samples/object-define-property/_config.js b/test/form/samples/object-define-property/_config.js index 988533b919e..db74095ed16 100644 --- a/test/form/samples/object-define-property/_config.js +++ b/test/form/samples/object-define-property/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows globals to have parameter mutation side effects' }); diff --git a/test/form/samples/object-destructuring-default-values/_config.js b/test/form/samples/object-destructuring-default-values/_config.js index 78df0505e50..2ccf86cc27a 100644 --- a/test/form/samples/object-destructuring-default-values/_config.js +++ b/test/form/samples/object-destructuring-default-values/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'object destructuring default values are preserved' }); diff --git a/test/form/samples/object-expression/computed-properties/_config.js b/test/form/samples/object-expression/computed-properties/_config.js index eb92db583ec..9d89548d6b2 100644 --- a/test/form/samples/object-expression/computed-properties/_config.js +++ b/test/form/samples/object-expression/computed-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates non-string keys with string keys' }); diff --git a/test/form/samples/object-expression/method-side-effects/_config.js b/test/form/samples/object-expression/method-side-effects/_config.js index b02e0fb3197..d6c47c7a8e4 100644 --- a/test/form/samples/object-expression/method-side-effects/_config.js +++ b/test/form/samples/object-expression/method-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Track side-effects of method calls' }); diff --git a/test/form/samples/object-expression/nested-literal-assignment-without-access-side-effect/_config.js b/test/form/samples/object-expression/nested-literal-assignment-without-access-side-effect/_config.js index c9ab4fa50fa..48a69f2f7c3 100644 --- a/test/form/samples/object-expression/nested-literal-assignment-without-access-side-effect/_config.js +++ b/test/form/samples/object-expression/nested-literal-assignment-without-access-side-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treats mutating nested properties as side effects', options: { treeshake: { propertyReadSideEffects: false } diff --git a/test/form/samples/object-expression/nested-literal-value-without-access-side-effect/_config.js b/test/form/samples/object-expression/nested-literal-value-without-access-side-effect/_config.js index dc22ed29c9c..fb7f8e68d4e 100644 --- a/test/form/samples/object-expression/nested-literal-value-without-access-side-effect/_config.js +++ b/test/form/samples/object-expression/nested-literal-value-without-access-side-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses an unknown value for nested properties', options: { treeshake: { propertyReadSideEffects: false } diff --git a/test/form/samples/object-expression/proto-property/_config.js b/test/form/samples/object-expression/proto-property/_config.js index 56dba4fd77d..6d30962f73e 100644 --- a/test/form/samples/object-expression/proto-property/_config.js +++ b/test/form/samples/object-expression/proto-property/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Deoptimize when __proto__ is used' }); diff --git a/test/form/samples/object-expression/reassign-prop-without-proto/_config.js b/test/form/samples/object-expression/reassign-prop-without-proto/_config.js index 93cca1a2661..131e3581fbf 100644 --- a/test/form/samples/object-expression/reassign-prop-without-proto/_config.js +++ b/test/form/samples/object-expression/reassign-prop-without-proto/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly deoptimizes when there is no proto' }); diff --git a/test/form/samples/object-expression/return-expressions/_config.js b/test/form/samples/object-expression/return-expressions/_config.js index 38d0fd00116..0a0a701310f 100644 --- a/test/form/samples/object-expression/return-expressions/_config.js +++ b/test/form/samples/object-expression/return-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Track side-effects of method return values' }); diff --git a/test/form/samples/object-expression/unknown-getter-no-side-effect/_config.js b/test/form/samples/object-expression/unknown-getter-no-side-effect/_config.js index 16da59a7b2c..709d2882c58 100644 --- a/test/form/samples/object-expression/unknown-getter-no-side-effect/_config.js +++ b/test/form/samples/object-expression/unknown-getter-no-side-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unknown getter access without side effect', options: { external: ['external'] } }); diff --git a/test/form/samples/object-expression/unknown-setter-no-side-effect/_config.js b/test/form/samples/object-expression/unknown-setter-no-side-effect/_config.js index 9a3a6ab95b4..3fc7e1153f8 100644 --- a/test/form/samples/object-expression/unknown-setter-no-side-effect/_config.js +++ b/test/form/samples/object-expression/unknown-setter-no-side-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unknown setter access without side effect', options: { external: ['external'] } }); diff --git a/test/form/samples/object-expression/unknown-setter-no-side-effect2/_config.js b/test/form/samples/object-expression/unknown-setter-no-side-effect2/_config.js index 9a3a6ab95b4..3fc7e1153f8 100644 --- a/test/form/samples/object-expression/unknown-setter-no-side-effect2/_config.js +++ b/test/form/samples/object-expression/unknown-setter-no-side-effect2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unknown setter access without side effect', options: { external: ['external'] } }); diff --git a/test/form/samples/object-freeze-effects/_config.js b/test/form/samples/object-freeze-effects/_config.js index e046e18ba01..ffcabf6b9c8 100644 --- a/test/form/samples/object-freeze-effects/_config.js +++ b/test/form/samples/object-freeze-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Only treats Object.freeze as a side effect if the argument is used' }); diff --git a/test/form/samples/object-literal-property-overwrites/_config.js b/test/form/samples/object-literal-property-overwrites/_config.js index 8b26c3115e8..3cba590ed04 100644 --- a/test/form/samples/object-literal-property-overwrites/_config.js +++ b/test/form/samples/object-literal-property-overwrites/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detect side-effects in overwritten properties of object literals' }); diff --git a/test/form/samples/optional-chaining-namespace/_config.js b/test/form/samples/optional-chaining-namespace/_config.js index 546c71c5388..2d1ba8212d1 100644 --- a/test/form/samples/optional-chaining-namespace/_config.js +++ b/test/form/samples/optional-chaining-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports optional chaining with namespace objects', expectedWarnings: ['MISSING_EXPORT'] }); diff --git a/test/form/samples/optional-chaining/_config.js b/test/form/samples/optional-chaining/_config.js index f421af441df..5e42ad28cc9 100644 --- a/test/form/samples/optional-chaining/_config.js +++ b/test/form/samples/optional-chaining/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports optional chaining' }); diff --git a/test/form/samples/output-named-library/_config.js b/test/form/samples/output-named-library/_config.js index 4fdfcfb017a..4acdc45e007 100644 --- a/test/form/samples/output-named-library/_config.js +++ b/test/form/samples/output-named-library/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'names bundles correctly', options: { output: { diff --git a/test/form/samples/override-external-namespace/_config.js b/test/form/samples/override-external-namespace/_config.js index 7c11505367a..c33580bec8d 100644 --- a/test/form/samples/override-external-namespace/_config.js +++ b/test/form/samples/override-external-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows overriding imports of external namespace reexports', options: { external: 'external', diff --git a/test/form/samples/paths-function/_config.js b/test/form/samples/paths-function/_config.js index fc47dc38859..8774240954f 100644 --- a/test/form/samples/paths-function/_config.js +++ b/test/form/samples/paths-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external paths (#754)', options: { external: ['foo'], diff --git a/test/form/samples/paths-relative/_config.js b/test/form/samples/paths-relative/_config.js index 26fcaf3de1d..95a73fc1e7e 100644 --- a/test/form/samples/paths-relative/_config.js +++ b/test/form/samples/paths-relative/_config.js @@ -2,7 +2,7 @@ const { resolve } = require('node:path'); const resolved = resolve(__dirname, 'foo.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external paths (#754)', options: { external: [resolved], diff --git a/test/form/samples/paths/_config.js b/test/form/samples/paths/_config.js index a08a0877059..02fa7cf93cf 100644 --- a/test/form/samples/paths/_config.js +++ b/test/form/samples/paths/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external paths (#754)', options: { external: ['foo'], diff --git a/test/form/samples/pattern-assignments/_config.js b/test/form/samples/pattern-assignments/_config.js index 51bd7dce67f..301549b66bd 100644 --- a/test/form/samples/pattern-assignments/_config.js +++ b/test/form/samples/pattern-assignments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Make sure side-effects are passed along destructuring assignments', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/pattern-member-expressions/_config.js b/test/form/samples/pattern-member-expressions/_config.js index ef91758ffde..1125577d403 100644 --- a/test/form/samples/pattern-member-expressions/_config.js +++ b/test/form/samples/pattern-member-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles member expressions in patterns (#2750)' }); diff --git a/test/form/samples/per-output-plugins/_config.js b/test/form/samples/per-output-plugins/_config.js index 83d247bc7e5..1f5aaee6f58 100644 --- a/test/form/samples/per-output-plugins/_config.js +++ b/test/form/samples/per-output-plugins/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows specifying per-output plugins', options: { output: { diff --git a/test/form/samples/preserve-asm-js/_config.js b/test/form/samples/preserve-asm-js/_config.js index 3525cfd9545..47b606014c8 100644 --- a/test/form/samples/preserve-asm-js/_config.js +++ b/test/form/samples/preserve-asm-js/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Preserves asm.js code (#3360)' }); diff --git a/test/form/samples/preserve-debugger/_config.js b/test/form/samples/preserve-debugger/_config.js index 6be9890c26a..7cc40b3c70f 100644 --- a/test/form/samples/preserve-debugger/_config.js +++ b/test/form/samples/preserve-debugger/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'debugger statements are preserved (#664)' }); diff --git a/test/form/samples/preserves-comments-after-imports/_config.js b/test/form/samples/preserves-comments-after-imports/_config.js index a081c873d4d..92be92333a2 100644 --- a/test/form/samples/preserves-comments-after-imports/_config.js +++ b/test/form/samples/preserves-comments-after-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves comments between imports and first statement', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/probe-external-namespace/_config.js b/test/form/samples/probe-external-namespace/_config.js index c81fb7b862d..5e6aef7b409 100644 --- a/test/form/samples/probe-external-namespace/_config.js +++ b/test/form/samples/probe-external-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allow probing external namespaces without causing errors due to missing imports', options: { external: 'external' diff --git a/test/form/samples/promises/_config.js b/test/form/samples/promises/_config.js index 87ceb59a7df..6de517042c0 100644 --- a/test/form/samples/promises/_config.js +++ b/test/form/samples/promises/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not remove promise creations' }); diff --git a/test/form/samples/proper-this-context/_config.js b/test/form/samples/proper-this-context/_config.js index eec3e67526a..ac5bd4fe960 100644 --- a/test/form/samples/proper-this-context/_config.js +++ b/test/form/samples/proper-this-context/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'make sure "this" respects the context for arrow functions', expectedWarnings: ['THIS_IS_UNDEFINED'] }); diff --git a/test/form/samples/property-setters-and-getters/access-when-called-effect/_config.js b/test/form/samples/property-setters-and-getters/access-when-called-effect/_config.js index 61f7c7eefd9..e0bc1344b13 100644 --- a/test/form/samples/property-setters-and-getters/access-when-called-effect/_config.js +++ b/test/form/samples/property-setters-and-getters/access-when-called-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects access side-effects when calling a getter' }); diff --git a/test/form/samples/property-setters-and-getters/early-access-getter-return/_config.js b/test/form/samples/property-setters-and-getters/early-access-getter-return/_config.js index 8ecbe76ef2e..75c9558cad7 100644 --- a/test/form/samples/property-setters-and-getters/early-access-getter-return/_config.js +++ b/test/form/samples/property-setters-and-getters/early-access-getter-return/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles accessing the return expression of a getter before it has been bound' }); diff --git a/test/form/samples/property-setters-and-getters/early-access-getter-value/_config.js b/test/form/samples/property-setters-and-getters/early-access-getter-value/_config.js index 9b2b62d054d..ec933e312db 100644 --- a/test/form/samples/property-setters-and-getters/early-access-getter-value/_config.js +++ b/test/form/samples/property-setters-and-getters/early-access-getter-value/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles accessing the value of a getter before it has been bound' }); diff --git a/test/form/samples/property-setters-and-getters/shadowed-setters/_config.js b/test/form/samples/property-setters-and-getters/shadowed-setters/_config.js index 1dec75fa118..05a902af786 100644 --- a/test/form/samples/property-setters-and-getters/shadowed-setters/_config.js +++ b/test/form/samples/property-setters-and-getters/shadowed-setters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles setters shadowed by computed setters' }); diff --git a/test/form/samples/protect-cjs-globals/_config.js b/test/form/samples/protect-cjs-globals/_config.js index 78aba16a197..feb61230e93 100644 --- a/test/form/samples/protect-cjs-globals/_config.js +++ b/test/form/samples/protect-cjs-globals/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prevent conflicts with cjs module globals', options: { output: { name: 'bundle' } diff --git a/test/form/samples/proto-null/_config.js b/test/form/samples/proto-null/_config.js index 57787d9c8c3..795ccf6aa52 100644 --- a/test/form/samples/proto-null/_config.js +++ b/test/form/samples/proto-null/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles getters and setters on __proto__ properties' }); diff --git a/test/form/samples/prototype-functions/_config.js b/test/form/samples/prototype-functions/_config.js index 3782da1d2a2..e27b9eee8b4 100644 --- a/test/form/samples/prototype-functions/_config.js +++ b/test/form/samples/prototype-functions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly includes prototype functions' }); diff --git a/test/form/samples/prune-pure-unused-import-array/_config.js b/test/form/samples/prune-pure-unused-import-array/_config.js index 7850b90809d..92fd5a33f26 100644 --- a/test/form/samples/prune-pure-unused-import-array/_config.js +++ b/test/form/samples/prune-pure-unused-import-array/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prunes pure unused external imports ([#1352])', options: { external: ['external', 'other'], diff --git a/test/form/samples/prune-pure-unused-import-function/_config.js b/test/form/samples/prune-pure-unused-import-function/_config.js index 662cbceea70..7b2e9251f9b 100644 --- a/test/form/samples/prune-pure-unused-import-function/_config.js +++ b/test/form/samples/prune-pure-unused-import-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prunes pure unused external imports ([#1352])', expectedWarnings: ['EMPTY_BUNDLE'], options: { diff --git a/test/form/samples/prune-pure-unused-import/_config.js b/test/form/samples/prune-pure-unused-import/_config.js index 527766560d8..8b173901600 100644 --- a/test/form/samples/prune-pure-unused-import/_config.js +++ b/test/form/samples/prune-pure-unused-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prunes pure unused external imports ([#1352])', expectedWarnings: ['EMPTY_BUNDLE'], options: { diff --git a/test/form/samples/pure-class-field/_config.js b/test/form/samples/pure-class-field/_config.js index 4634f697d8c..8f51cca1499 100644 --- a/test/form/samples/pure-class-field/_config.js +++ b/test/form/samples/pure-class-field/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains pure annotations in class fields' }); diff --git a/test/form/samples/pure-comment-line-break/_config.js b/test/form/samples/pure-comment-line-break/_config.js index 00486ec690a..7e663b33fba 100644 --- a/test/form/samples/pure-comment-line-break/_config.js +++ b/test/form/samples/pure-comment-line-break/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adjust line-break handling when dealing with pure annotations' }); diff --git a/test/form/samples/pure-comment-scenarios-complex/_config.js b/test/form/samples/pure-comment-scenarios-complex/_config.js index 33f8132e433..9d7bbd86f74 100644 --- a/test/form/samples/pure-comment-scenarios-complex/_config.js +++ b/test/form/samples/pure-comment-scenarios-complex/_config.js @@ -1,5 +1,5 @@ // tests compiled from https://github.com/mishoo/UglifyJS2/blob/bcebacbb9e7ddac7d9c0e4ca2c7e0faf0e0bca7c/test/compress/issue-1261.js -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles various advanced pure comment scenarios' }); diff --git a/test/form/samples/pure-comment-scenarios-simple/_config.js b/test/form/samples/pure-comment-scenarios-simple/_config.js index f5de85627c6..910ed394609 100644 --- a/test/form/samples/pure-comment-scenarios-simple/_config.js +++ b/test/form/samples/pure-comment-scenarios-simple/_config.js @@ -1,5 +1,5 @@ // tests compiled from https://github.com/mishoo/UglifyJS2/blob/88c8f4e363e0d585b33ea29df560243d3dc74ce1/test/compress/pure_funcs.js -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles various pure comment scenarios' }); diff --git a/test/form/samples/pure-comments-disabled/_config.js b/test/form/samples/pure-comments-disabled/_config.js index 981cc381439..ab9f764957f 100644 --- a/test/form/samples/pure-comments-disabled/_config.js +++ b/test/form/samples/pure-comments-disabled/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not rely on pure annotations if they are disabled', options: { treeshake: { diff --git a/test/form/samples/pure-comments-multiple/_config.js b/test/form/samples/pure-comments-multiple/_config.js index d08a436fa0c..4793b277007 100644 --- a/test/form/samples/pure-comments-multiple/_config.js +++ b/test/form/samples/pure-comments-multiple/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not associate multiple "pure" comments before a token with subsequent tokens' }); diff --git a/test/form/samples/quote-id/_config.js b/test/form/samples/quote-id/_config.js index 47aa4ae037b..1ab581f9beb 100644 --- a/test/form/samples/quote-id/_config.js +++ b/test/form/samples/quote-id/_config.js @@ -4,7 +4,7 @@ const external1 = "quoted'\r\n\u2028\u2029external1"; const external2 = path.join(__dirname, "quoted'\r\n\u2028\u2029external2"); const external3 = 'C:\\File\\Path.js'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles escaping for external ids', options: { output: { diff --git a/test/form/samples/re-export-aliasing/_config.js b/test/form/samples/re-export-aliasing/_config.js index 9077257dc97..ea6d8f7afa8 100644 --- a/test/form/samples/re-export-aliasing/_config.js +++ b/test/form/samples/re-export-aliasing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external re-exports aliasing', options: { output: { diff --git a/test/form/samples/reassigned-exported-functions-and-classes/_config.js b/test/form/samples/reassigned-exported-functions-and-classes/_config.js index 8f6d7a4a645..6e812b8c2b6 100644 --- a/test/form/samples/reassigned-exported-functions-and-classes/_config.js +++ b/test/form/samples/reassigned-exported-functions-and-classes/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'use legal names for exported functions and classed (#1943)', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/recursive-assignments/_config.js b/test/form/samples/recursive-assignments/_config.js index 9e6cda7cac3..6ff9daff98b 100644 --- a/test/form/samples/recursive-assignments/_config.js +++ b/test/form/samples/recursive-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not fail for pathological recursive algorithms and circular structures' }); diff --git a/test/form/samples/recursive-calls/_config.js b/test/form/samples/recursive-calls/_config.js index b3cafdfc7c5..436814b9b3c 100644 --- a/test/form/samples/recursive-calls/_config.js +++ b/test/form/samples/recursive-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not fail for recursive calls' }); diff --git a/test/form/samples/recursive-computed-members/_config.js b/test/form/samples/recursive-computed-members/_config.js index 15c2a152ac1..ecc9fdd967f 100644 --- a/test/form/samples/recursive-computed-members/_config.js +++ b/test/form/samples/recursive-computed-members/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handle recursive computed member access' }); diff --git a/test/form/samples/recursive-literal-values/_config.js b/test/form/samples/recursive-literal-values/_config.js index 43618dff00b..1115a0327ab 100644 --- a/test/form/samples/recursive-literal-values/_config.js +++ b/test/form/samples/recursive-literal-values/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not fail for literal values from recursive return values' }); diff --git a/test/form/samples/recursive-multi-expressions/_config.js b/test/form/samples/recursive-multi-expressions/_config.js index 00f0a1bcd41..ca9d39b7ffb 100644 --- a/test/form/samples/recursive-multi-expressions/_config.js +++ b/test/form/samples/recursive-multi-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles recursive multi-expressions' }); diff --git a/test/form/samples/recursive-return-value-assignments/_config.js b/test/form/samples/recursive-return-value-assignments/_config.js index 4b056241e38..89991001c8f 100644 --- a/test/form/samples/recursive-return-value-assignments/_config.js +++ b/test/form/samples/recursive-return-value-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handle recursive reassignments of return values' }); diff --git a/test/form/samples/recursive-this-deoptimization/_config.js b/test/form/samples/recursive-this-deoptimization/_config.js index 9a1c308d9c3..2d5312acb93 100644 --- a/test/form/samples/recursive-this-deoptimization/_config.js +++ b/test/form/samples/recursive-this-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles recursive "this" deoptimizations (#4089)' }); diff --git a/test/form/samples/recursive-values/_config.js b/test/form/samples/recursive-values/_config.js index 9e6cda7cac3..6ff9daff98b 100644 --- a/test/form/samples/recursive-values/_config.js +++ b/test/form/samples/recursive-values/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not fail for pathological recursive algorithms and circular structures' }); diff --git a/test/form/samples/redeclarations/_config.js b/test/form/samples/redeclarations/_config.js index 83c5aab5d5c..ca8ad871c66 100644 --- a/test/form/samples/redeclarations/_config.js +++ b/test/form/samples/redeclarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'make sure re-declarations via var and function are linked properly' }); diff --git a/test/form/samples/reexport-external-default-and-name/_config.js b/test/form/samples/reexport-external-default-and-name/_config.js index 8903223ab2d..855a14b84d1 100644 --- a/test/form/samples/reexport-external-default-and-name/_config.js +++ b/test/form/samples/reexport-external-default-and-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reexports a an external default as a name and imports another name from that dependency', expectedWarnings: ['MIXED_EXPORTS'], diff --git a/test/form/samples/reexport-external-default-and-namespace/_config.js b/test/form/samples/reexport-external-default-and-namespace/_config.js index ac12d82bcf5..67438a5d09a 100644 --- a/test/form/samples/reexport-external-default-and-namespace/_config.js +++ b/test/form/samples/reexport-external-default-and-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reexports a default external import as default export (when using named exports)', options: { output: { diff --git a/test/form/samples/reexport-external-default-as-name-and-name/_config.js b/test/form/samples/reexport-external-default-as-name-and-name/_config.js index 6b0abd2ca96..9c8a78dbda9 100644 --- a/test/form/samples/reexport-external-default-as-name-and-name/_config.js +++ b/test/form/samples/reexport-external-default-as-name-and-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports a named external export as default', expectedWarnings: ['MIXED_EXPORTS'], options: { diff --git a/test/form/samples/reexport-external-default/_config.js b/test/form/samples/reexport-external-default/_config.js index a9eeeec8025..47385d4a921 100644 --- a/test/form/samples/reexport-external-default/_config.js +++ b/test/form/samples/reexport-external-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reexports an external default export', options: { external: ['external1', 'external2'], diff --git a/test/form/samples/reexport-external-name-as-default/_config.js b/test/form/samples/reexport-external-name-as-default/_config.js index acb3d2a0edf..951b788645f 100644 --- a/test/form/samples/reexport-external-name-as-default/_config.js +++ b/test/form/samples/reexport-external-name-as-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports a named external export as default', options: { external: ['external'], diff --git a/test/form/samples/reexport-external-name-as-default2/_config.js b/test/form/samples/reexport-external-name-as-default2/_config.js index 5738122f73a..ef807daf442 100644 --- a/test/form/samples/reexport-external-name-as-default2/_config.js +++ b/test/form/samples/reexport-external-name-as-default2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports a named external export as default via another file', options: { external: ['external'], diff --git a/test/form/samples/reexport-external-name/_config.js b/test/form/samples/reexport-external-name/_config.js index dce887e7886..0541c9ae604 100644 --- a/test/form/samples/reexport-external-name/_config.js +++ b/test/form/samples/reexport-external-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports a named export from an external module', options: { external: ['external1', 'external2'], diff --git a/test/form/samples/reexport-external-namespace-as/_config.js b/test/form/samples/reexport-external-namespace-as/_config.js index 6369e035f59..b2f6b3ffe03 100644 --- a/test/form/samples/reexport-external-namespace-as/_config.js +++ b/test/form/samples/reexport-external-namespace-as/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reexport external namespace as name', options: { external: 'external', diff --git a/test/form/samples/reexport-external-namespace/_config.js b/test/form/samples/reexport-external-namespace/_config.js index 2a21b5dc942..9ed34a046f9 100644 --- a/test/form/samples/reexport-external-namespace/_config.js +++ b/test/form/samples/reexport-external-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports * from external module (#791)', options: { external: ['external'], diff --git a/test/form/samples/reexport-self/_config.js b/test/form/samples/reexport-self/_config.js index 08d18b37168..a7c21e50714 100644 --- a/test/form/samples/reexport-self/_config.js +++ b/test/form/samples/reexport-self/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles recursions when a module reexports its own namespace', expectedWarnings: ['CIRCULAR_DEPENDENCY'] }); diff --git a/test/form/samples/reexport-star-deshadow/_config.js b/test/form/samples/reexport-star-deshadow/_config.js index 49f95ef3f0f..98e18c6df0f 100644 --- a/test/form/samples/reexport-star-deshadow/_config.js +++ b/test/form/samples/reexport-star-deshadow/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Star reexports scope deshadowing', options: { output: { diff --git a/test/form/samples/reexport-used-external-namespace-as/_config.js b/test/form/samples/reexport-used-external-namespace-as/_config.js index 838234690f2..275206bb261 100644 --- a/test/form/samples/reexport-used-external-namespace-as/_config.js +++ b/test/form/samples/reexport-used-external-namespace-as/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reexport external namespace as name if the namespace is also used', options: { external: ['external1', 'external2'], diff --git a/test/form/samples/relative-external-ids/_config.js b/test/form/samples/relative-external-ids/_config.js index 612fa43c9b1..159cea043ba 100644 --- a/test/form/samples/relative-external-ids/_config.js +++ b/test/form/samples/relative-external-ids/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'relative external ids are absolutely resolved', options: { external(id) { diff --git a/test/form/samples/relative-external-with-global/_config.js b/test/form/samples/relative-external-with-global/_config.js index 6d54c2cbadd..eb7f4420850 100644 --- a/test/form/samples/relative-external-with-global/_config.js +++ b/test/form/samples/relative-external-with-global/_config.js @@ -2,7 +2,7 @@ const { resolve } = require('node:path'); const throttle = resolve(__dirname, 'lib/throttle.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'applies globals to externalised relative imports', options: { external: [throttle], diff --git a/test/form/samples/remove-invalid-pure-comments/_config.js b/test/form/samples/remove-invalid-pure-comments/_config.js index 639a44e7932..a05717b051f 100644 --- a/test/form/samples/remove-invalid-pure-comments/_config.js +++ b/test/form/samples/remove-invalid-pure-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes invalidly placed pure annotations' }); diff --git a/test/form/samples/remove-tree-shaken-pure-comments/_config.js b/test/form/samples/remove-tree-shaken-pure-comments/_config.js index 0bd5b9fc69e..64d1ca3fbc6 100644 --- a/test/form/samples/remove-tree-shaken-pure-comments/_config.js +++ b/test/form/samples/remove-tree-shaken-pure-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes pure comments of tree-shaken nodes' }); diff --git a/test/form/samples/remove-treeshaken-banners/_config.js b/test/form/samples/remove-treeshaken-banners/_config.js index 5bec9823264..dc424e83deb 100644 --- a/test/form/samples/remove-treeshaken-banners/_config.js +++ b/test/form/samples/remove-treeshaken-banners/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Also remove banner comments when completely tree-shaking files' }); diff --git a/test/form/samples/removes-existing-sourcemap-comments/_config.js b/test/form/samples/removes-existing-sourcemap-comments/_config.js index e26213f4c15..e8a5770fe33 100644 --- a/test/form/samples/removes-existing-sourcemap-comments/_config.js +++ b/test/form/samples/removes-existing-sourcemap-comments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes existing sourcemap comments' }); diff --git a/test/form/samples/removes-unused-babel-helpers/_config.js b/test/form/samples/removes-unused-babel-helpers/_config.js index d5adad021bc..9238a4c6c4e 100644 --- a/test/form/samples/removes-unused-babel-helpers/_config.js +++ b/test/form/samples/removes-unused-babel-helpers/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Removes unused babel helpers from the build (#1595)', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/renamed-pattern-defaults/_config.js b/test/form/samples/renamed-pattern-defaults/_config.js index ce48515586c..79ca1e51cf0 100644 --- a/test/form/samples/renamed-pattern-defaults/_config.js +++ b/test/form/samples/renamed-pattern-defaults/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deconflicting of variables used as defaults in patterns (#2445)' }); diff --git a/test/form/samples/render-chunk-plugin-sourcemaps/_config.js b/test/form/samples/render-chunk-plugin-sourcemaps/_config.js index 8c956dcb2d4..08f42b02959 100644 --- a/test/form/samples/render-chunk-plugin-sourcemaps/_config.js +++ b/test/form/samples/render-chunk-plugin-sourcemaps/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports returning undefined source maps from render chunk hooks, when source maps are enabled', expectedWarnings: ['SOURCEMAP_BROKEN'], diff --git a/test/form/samples/render-chunk-plugin/_config.js b/test/form/samples/render-chunk-plugin/_config.js index 508b1cb637b..bfa6037806f 100644 --- a/test/form/samples/render-chunk-plugin/_config.js +++ b/test/form/samples/render-chunk-plugin/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows plugins to hook render chunk', options: { plugins: [ diff --git a/test/form/samples/render-declaration-semicolons/_config.js b/test/form/samples/render-declaration-semicolons/_config.js index f71fdcf4311..e86b9074a87 100644 --- a/test/form/samples/render-declaration-semicolons/_config.js +++ b/test/form/samples/render-declaration-semicolons/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly inserts semi-colons after declarations (#1993)', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/render-named-export-declarations/_config.js b/test/form/samples/render-named-export-declarations/_config.js index bc6c98bfe3a..205f2617365 100644 --- a/test/form/samples/render-named-export-declarations/_config.js +++ b/test/form/samples/render-named-export-declarations/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renders named export declarations', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/render-removed-declarations/_config.js b/test/form/samples/render-removed-declarations/_config.js index fe253741757..ed224fc9119 100644 --- a/test/form/samples/render-removed-declarations/_config.js +++ b/test/form/samples/render-removed-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renders tree-shaken variable declarations' }); diff --git a/test/form/samples/render-removed-statements/_config.js b/test/form/samples/render-removed-statements/_config.js index b9297d46fe6..0680fed75ec 100644 --- a/test/form/samples/render-removed-statements/_config.js +++ b/test/form/samples/render-removed-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'make sure removed statements do no leave unwanted white-space' }); diff --git a/test/form/samples/reserved-keywords-in-imports-exports/_config.js b/test/form/samples/reserved-keywords-in-imports-exports/_config.js index c0bb16e3e32..b80f2894e41 100644 --- a/test/form/samples/reserved-keywords-in-imports-exports/_config.js +++ b/test/form/samples/reserved-keywords-in-imports-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles reserved keywords in exports/imports', options: { input: ['main'], diff --git a/test/form/samples/resolution-order/_config.js b/test/form/samples/resolution-order/_config.js index 74204bf23fc..cca0484c4e9 100644 --- a/test/form/samples/resolution-order/_config.js +++ b/test/form/samples/resolution-order/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not depend on the resolution order of modules for tree-shaking (#2753)', options: { plugins: { diff --git a/test/form/samples/resolve-external-dynamic-imports/_config.js b/test/form/samples/resolve-external-dynamic-imports/_config.js index 8007d7d14d3..d8d18313ee4 100644 --- a/test/form/samples/resolve-external-dynamic-imports/_config.js +++ b/test/form/samples/resolve-external-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not resolve external dynamic imports via plugins (#2481)', options: { output: { diff --git a/test/form/samples/resolve-import-meta-url-export/_config.js b/test/form/samples/resolve-import-meta-url-export/_config.js index 02a203e55e4..d7b50c2e8cb 100644 --- a/test/form/samples/resolve-import-meta-url-export/_config.js +++ b/test/form/samples/resolve-import-meta-url-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly exports resolved import.meta.url', options: { plugins: [ diff --git a/test/form/samples/resolve-import-meta-url/_config.js b/test/form/samples/resolve-import-meta-url/_config.js index 1ef68ced151..838644fff00 100644 --- a/test/form/samples/resolve-import-meta-url/_config.js +++ b/test/form/samples/resolve-import-meta-url/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to configure import.meta.url', options: { plugins: [ diff --git a/test/form/samples/return-after-error/_config.js b/test/form/samples/return-after-error/_config.js index 2d0660c9e96..6726f51607b 100644 --- a/test/form/samples/return-after-error/_config.js +++ b/test/form/samples/return-after-error/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tree-shakes entities referenced in a return statement after an error' }); diff --git a/test/form/samples/return-statement/missing-space/_config.js b/test/form/samples/return-statement/missing-space/_config.js index ada2659fe1e..11f544402bd 100644 --- a/test/form/samples/return-statement/missing-space/_config.js +++ b/test/form/samples/return-statement/missing-space/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Inserts space when simplifying return statement without space' }); diff --git a/test/form/samples/return-value-access-in-conditional/_config.js b/test/form/samples/return-value-access-in-conditional/_config.js index 9f637d1f7f2..1f10d19e90c 100644 --- a/test/form/samples/return-value-access-in-conditional/_config.js +++ b/test/form/samples/return-value-access-in-conditional/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles accessing funciton return values in deoptimized conditionals' }); diff --git a/test/form/samples/runs-output-plugins-last/_config.js b/test/form/samples/runs-output-plugins-last/_config.js index ffb7593a33c..737f94719c3 100644 --- a/test/form/samples/runs-output-plugins-last/_config.js +++ b/test/form/samples/runs-output-plugins-last/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'runs output plugins last', options: { plugins: [ diff --git a/test/form/samples/self-calling-function-with-effects/_config.js b/test/form/samples/self-calling-function-with-effects/_config.js index 144ec0b5057..1377b649263 100644 --- a/test/form/samples/self-calling-function-with-effects/_config.js +++ b/test/form/samples/self-calling-function-with-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'discards a self-calling function with side-effects' }); diff --git a/test/form/samples/self-calling-function/_config.js b/test/form/samples/self-calling-function/_config.js index 1e0c2443d2c..57c2b85a209 100644 --- a/test/form/samples/self-calling-function/_config.js +++ b/test/form/samples/self-calling-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'discards a self-calling function without side-effects', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/self-contained-bundle/_config.js b/test/form/samples/self-contained-bundle/_config.js index ca105e3c465..c3ea85ff078 100644 --- a/test/form/samples/self-contained-bundle/_config.js +++ b/test/form/samples/self-contained-bundle/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'self-contained bundle' }); diff --git a/test/form/samples/self-deoptimization/_config.js b/test/form/samples/self-deoptimization/_config.js index 5231a107c4a..4c3533bf807 100644 --- a/test/form/samples/self-deoptimization/_config.js +++ b/test/form/samples/self-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles situations where a member expression is deoptimized while being deoptimized' }); diff --git a/test/form/samples/sequence-expression/_config.js b/test/form/samples/sequence-expression/_config.js index 8e61b6befe9..64800c3513a 100644 --- a/test/form/samples/sequence-expression/_config.js +++ b/test/form/samples/sequence-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'only retain expressions with effects in sequence expressions (#1649)' }); diff --git a/test/form/samples/shorthand-properties/_config.js b/test/form/samples/shorthand-properties/_config.js index 3da366d157b..2a17113ab9f 100644 --- a/test/form/samples/shorthand-properties/_config.js +++ b/test/form/samples/shorthand-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'expands shorthand properties as necessary (#61)' }); diff --git a/test/form/samples/side-effect-b/_config.js b/test/form/samples/side-effect-b/_config.js index d8a462c1747..c299b724837 100644 --- a/test/form/samples/side-effect-b/_config.js +++ b/test/form/samples/side-effect-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'discards IIFE with no side-effects', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-c/_config.js b/test/form/samples/side-effect-c/_config.js index 1a74f333ca0..5819c3f246d 100644 --- a/test/form/samples/side-effect-c/_config.js +++ b/test/form/samples/side-effect-c/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'discards function with no side-effects', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-d/_config.js b/test/form/samples/side-effect-d/_config.js index 23d4ce4abc5..d2021a9d5bb 100644 --- a/test/form/samples/side-effect-d/_config.js +++ b/test/form/samples/side-effect-d/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'excludes functions that are known to be pure', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-default-reexport/_config.js b/test/form/samples/side-effect-default-reexport/_config.js index a2e4b430c26..992be466ea4 100644 --- a/test/form/samples/side-effect-default-reexport/_config.js +++ b/test/form/samples/side-effect-default-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Observes side-effects in side-effect-free modules that contain a used default export that just reexports from another module', options: { diff --git a/test/form/samples/side-effect-e/_config.js b/test/form/samples/side-effect-e/_config.js index 990d28dfe77..4ed8d1511b3 100644 --- a/test/form/samples/side-effect-e/_config.js +++ b/test/form/samples/side-effect-e/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'accounts for local scopes when tested function purity', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-es5-classes/_config.js b/test/form/samples/side-effect-es5-classes/_config.js index 25d7c59128a..e428008a049 100644 --- a/test/form/samples/side-effect-es5-classes/_config.js +++ b/test/form/samples/side-effect-es5-classes/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'omits ES5 classes which are pure (e.g. they only assign to `this`)', expectedWarnings: ['THIS_IS_UNDEFINED'] }); diff --git a/test/form/samples/side-effect-f/_config.js b/test/form/samples/side-effect-f/_config.js index 160f31686b7..020ed7253c3 100644 --- a/test/form/samples/side-effect-f/_config.js +++ b/test/form/samples/side-effect-f/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disregards side-effects that are contained within a function', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-g/_config.js b/test/form/samples/side-effect-g/_config.js index 5942c6de2ce..ec8e9697eb8 100644 --- a/test/form/samples/side-effect-g/_config.js +++ b/test/form/samples/side-effect-g/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'excludes constructors that are known to be pure', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-h/_config.js b/test/form/samples/side-effect-h/_config.js index 115799f6b7a..d077ab8a9f9 100644 --- a/test/form/samples/side-effect-h/_config.js +++ b/test/form/samples/side-effect-h/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes throw statements', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-i/_config.js b/test/form/samples/side-effect-i/_config.js index f42d77df5e9..51e31b5ef93 100644 --- a/test/form/samples/side-effect-i/_config.js +++ b/test/form/samples/side-effect-i/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes top-level throw statements', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-j/_config.js b/test/form/samples/side-effect-j/_config.js index f0fa7558b96..71c83c240de 100644 --- a/test/form/samples/side-effect-j/_config.js +++ b/test/form/samples/side-effect-j/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes late function declarations with side-effects', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-k/_config.js b/test/form/samples/side-effect-k/_config.js index 5262ea3f234..b0467b59b12 100644 --- a/test/form/samples/side-effect-k/_config.js +++ b/test/form/samples/side-effect-k/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'use of arguments is treated as a side-effect', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-l/_config.js b/test/form/samples/side-effect-l/_config.js index 91bf7b45fa5..a957fbf5799 100644 --- a/test/form/samples/side-effect-l/_config.js +++ b/test/form/samples/side-effect-l/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'discards function with no side-effects in imported module', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/side-effect-m/_config.js b/test/form/samples/side-effect-m/_config.js index 3b01f885998..6c389ef661b 100644 --- a/test/form/samples/side-effect-m/_config.js +++ b/test/form/samples/side-effect-m/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects in circular function calls', expectedWarnings: ['CIRCULAR_DEPENDENCY'] }); diff --git a/test/form/samples/side-effect-n/_config.js b/test/form/samples/side-effect-n/_config.js index 742ab13a983..379a9723982 100644 --- a/test/form/samples/side-effect-n/_config.js +++ b/test/form/samples/side-effect-n/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects in complex call expressions' }); diff --git a/test/form/samples/side-effect-o/_config.js b/test/form/samples/side-effect-o/_config.js index 742ab13a983..379a9723982 100644 --- a/test/form/samples/side-effect-o/_config.js +++ b/test/form/samples/side-effect-o/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects in complex call expressions' }); diff --git a/test/form/samples/side-effect-p/_config.js b/test/form/samples/side-effect-p/_config.js index 27fc82737bf..c425c26febd 100644 --- a/test/form/samples/side-effect-p/_config.js +++ b/test/form/samples/side-effect-p/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects mutation of globals' }); diff --git a/test/form/samples/side-effect-q/_config.js b/test/form/samples/side-effect-q/_config.js index 991cb23b15c..b37abab4403 100644 --- a/test/form/samples/side-effect-q/_config.js +++ b/test/form/samples/side-effect-q/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'discards effects in conditional expressions with known test values', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/side-effect-r/_config.js b/test/form/samples/side-effect-r/_config.js index f076f211f08..e00b8e41c79 100644 --- a/test/form/samples/side-effect-r/_config.js +++ b/test/form/samples/side-effect-r/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'discards unused function expression assigned to a variable that calls itself and a global', expectedWarnings: ['EMPTY_BUNDLE'] diff --git a/test/form/samples/side-effect-s/_config.js b/test/form/samples/side-effect-s/_config.js index c0e5b04aead..00838aaea57 100644 --- a/test/form/samples/side-effect-s/_config.js +++ b/test/form/samples/side-effect-s/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'discards unused function expression assigned to a variable that calls itself and has side effects', expectedWarnings: ['EMPTY_BUNDLE'] diff --git a/test/form/samples/side-effect-t/_config.js b/test/form/samples/side-effect-t/_config.js index 23e5fea665f..957236bbf3e 100644 --- a/test/form/samples/side-effect-t/_config.js +++ b/test/form/samples/side-effect-t/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throw statement is a side effect', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effect-with-plusplus-expression/_config.js b/test/form/samples/side-effect-with-plusplus-expression/_config.js index 5da9caabb09..907cb2976a9 100644 --- a/test/form/samples/side-effect-with-plusplus-expression/_config.js +++ b/test/form/samples/side-effect-with-plusplus-expression/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly drop side-effect free statements in presence of update expression (#1564)', expectedWarnings: ['EMPTY_BUNDLE'] diff --git a/test/form/samples/side-effect/_config.js b/test/form/samples/side-effect/_config.js index f9535515b2c..59fa7fa5d05 100644 --- a/test/form/samples/side-effect/_config.js +++ b/test/form/samples/side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'side-effects to non-globals are not blindly included' }); diff --git a/test/form/samples/side-effects-await/_config.js b/test/form/samples/side-effects-await/_config.js index b6fd5de3070..4b01a385fc9 100644 --- a/test/form/samples/side-effects-await/_config.js +++ b/test/form/samples/side-effects-await/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'await statements should never be dropped if a function has other side-effects (#1584)' }); diff --git a/test/form/samples/side-effects-break-statements/_config.js b/test/form/samples/side-effects-break-statements/_config.js index 2fa772e660c..64acbca3c94 100644 --- a/test/form/samples/side-effects-break-statements/_config.js +++ b/test/form/samples/side-effects-break-statements/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'break statements should always by included but not always cause their parents to have effects', options: { output: { name: 'myBundle' } } diff --git a/test/form/samples/side-effects-call-arguments/_config.js b/test/form/samples/side-effects-call-arguments/_config.js index aa36a59a794..c8d9275427d 100644 --- a/test/form/samples/side-effects-call-arguments/_config.js +++ b/test/form/samples/side-effects-call-arguments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'side-effects in call arguments should be included' }); diff --git a/test/form/samples/side-effects-class-getters-setters/_config.js b/test/form/samples/side-effects-class-getters-setters/_config.js index deca5c7097a..ecbdc429845 100644 --- a/test/form/samples/side-effects-class-getters-setters/_config.js +++ b/test/form/samples/side-effects-class-getters-setters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treat getters and setters on classes as function calls' }); diff --git a/test/form/samples/side-effects-computed-pattern-keys/_config.js b/test/form/samples/side-effects-computed-pattern-keys/_config.js index 616a71dec62..daf32b338f5 100644 --- a/test/form/samples/side-effects-computed-pattern-keys/_config.js +++ b/test/form/samples/side-effects-computed-pattern-keys/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'side-effects in with computed pattern keys should not be ignored' }); diff --git a/test/form/samples/side-effects-delete/_config.js b/test/form/samples/side-effects-delete/_config.js index 82c50068b89..81cf46e2a83 100644 --- a/test/form/samples/side-effects-delete/_config.js +++ b/test/form/samples/side-effects-delete/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'delete is only a side-effect for included variables', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effects-es6-class-declarations/_config.js b/test/form/samples/side-effects-es6-class-declarations/_config.js index 21e4278911e..e9206e022b7 100644 --- a/test/form/samples/side-effects-es6-class-declarations/_config.js +++ b/test/form/samples/side-effects-es6-class-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'determine side effects in ES6 class declarations' }); diff --git a/test/form/samples/side-effects-es6-class-expressions/_config.js b/test/form/samples/side-effects-es6-class-expressions/_config.js index e2169f0ca4e..0fb2fbf6a1c 100644 --- a/test/form/samples/side-effects-es6-class-expressions/_config.js +++ b/test/form/samples/side-effects-es6-class-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'determine side effects in ES6 class expressions' }); diff --git a/test/form/samples/side-effects-es6-super-classes/_config.js b/test/form/samples/side-effects-es6-super-classes/_config.js index 9d1235b9b9b..99854ae798f 100644 --- a/test/form/samples/side-effects-es6-super-classes/_config.js +++ b/test/form/samples/side-effects-es6-super-classes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'determine side effects in ES6 super classes' }); diff --git a/test/form/samples/side-effects-expressions-as-statements/_config.js b/test/form/samples/side-effects-expressions-as-statements/_config.js index 1f1b8e1ddb3..8cfb080be2c 100644 --- a/test/form/samples/side-effects-expressions-as-statements/_config.js +++ b/test/form/samples/side-effects-expressions-as-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'in order to keep certain getter calls, do not remove some expression statements' }); diff --git a/test/form/samples/side-effects-generators/_config.js b/test/form/samples/side-effects-generators/_config.js index 5485ce6a35d..564cd639964 100644 --- a/test/form/samples/side-effects-generators/_config.js +++ b/test/form/samples/side-effects-generators/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Properly detect side-effects in generator functions' }); diff --git a/test/form/samples/side-effects-getters-and-setters/_config.js b/test/form/samples/side-effects-getters-and-setters/_config.js index 759a62e2c76..83bddd815c6 100644 --- a/test/form/samples/side-effects-getters-and-setters/_config.js +++ b/test/form/samples/side-effects-getters-and-setters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treat getters and setters as function calls' }); diff --git a/test/form/samples/side-effects-in-template-literals/_config.js b/test/form/samples/side-effects-in-template-literals/_config.js index 9e3c01e8a52..742e31ed751 100644 --- a/test/form/samples/side-effects-in-template-literals/_config.js +++ b/test/form/samples/side-effects-in-template-literals/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects in template literals and tagged template expressions', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/side-effects-internal-modules/_config.js b/test/form/samples/side-effects-internal-modules/_config.js index e96ab3c6a54..973ecfeda86 100644 --- a/test/form/samples/side-effects-internal-modules/_config.js +++ b/test/form/samples/side-effects-internal-modules/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const VIRTUAL_ID = '\0virtual'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not pass internal modules to moduleSideEffects', expectedWarnings: ['EMPTY_BUNDLE'], options: { diff --git a/test/form/samples/side-effects-logical-expressions/_config.js b/test/form/samples/side-effects-logical-expressions/_config.js index 9c163f4d6d1..d202cf8dc4b 100644 --- a/test/form/samples/side-effects-logical-expressions/_config.js +++ b/test/form/samples/side-effects-logical-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'only evaluate the second part of a logical expression if necessary' }); diff --git a/test/form/samples/side-effects-object-literal-calls/_config.js b/test/form/samples/side-effects-object-literal-calls/_config.js index a99e74ac134..6d13f637ae2 100644 --- a/test/form/samples/side-effects-object-literal-calls/_config.js +++ b/test/form/samples/side-effects-object-literal-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects when mutating object literals' }); diff --git a/test/form/samples/side-effects-object-literal-mutation-misc/_config.js b/test/form/samples/side-effects-object-literal-mutation-misc/_config.js index 971337e47a0..2350348da73 100644 --- a/test/form/samples/side-effects-object-literal-mutation-misc/_config.js +++ b/test/form/samples/side-effects-object-literal-mutation-misc/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects when setting and/or calling properties on object literals', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/side-effects-object-literal-mutation/_config.js b/test/form/samples/side-effects-object-literal-mutation/_config.js index a99e74ac134..6d13f637ae2 100644 --- a/test/form/samples/side-effects-object-literal-mutation/_config.js +++ b/test/form/samples/side-effects-object-literal-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects when mutating object literals' }); diff --git a/test/form/samples/side-effects-pattern-assignment/_config.js b/test/form/samples/side-effects-pattern-assignment/_config.js index 95f1b6626f8..6741af48702 100644 --- a/test/form/samples/side-effects-pattern-assignment/_config.js +++ b/test/form/samples/side-effects-pattern-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'side-effects when mutating destructured variables should not be ignored' }); diff --git a/test/form/samples/side-effects-pattern-defaults/_config.js b/test/form/samples/side-effects-pattern-defaults/_config.js index 8ce4a5087f7..0d651f9f4da 100644 --- a/test/form/samples/side-effects-pattern-defaults/_config.js +++ b/test/form/samples/side-effects-pattern-defaults/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'side-effects in pattern defaults should not be ignored' }); diff --git a/test/form/samples/side-effects-prototype-assignments/_config.js b/test/form/samples/side-effects-prototype-assignments/_config.js index 3f286b20ebf..e5fd32ec599 100644 --- a/test/form/samples/side-effects-prototype-assignments/_config.js +++ b/test/form/samples/side-effects-prototype-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'include side-effects with re-assigned prototypes (#953)' }); diff --git a/test/form/samples/side-effects-reassignment/_config.js b/test/form/samples/side-effects-reassignment/_config.js index 27daa446aba..5dd48c24692 100644 --- a/test/form/samples/side-effects-reassignment/_config.js +++ b/test/form/samples/side-effects-reassignment/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'when mutating/calling a reassigned variable, all assignments should be checked for side-effects' }); diff --git a/test/form/samples/side-effects-return-statements/_config.js b/test/form/samples/side-effects-return-statements/_config.js index 303e708258a..979336af10e 100644 --- a/test/form/samples/side-effects-return-statements/_config.js +++ b/test/form/samples/side-effects-return-statements/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'return statements do not have side-effects but should be kept in certain cases (#1585)', options: { output: { name: 'myBundle' } } diff --git a/test/form/samples/side-effects-static-methods/_config.js b/test/form/samples/side-effects-static-methods/_config.js index 9adb8d4fea7..b43c035c4b3 100644 --- a/test/form/samples/side-effects-static-methods/_config.js +++ b/test/form/samples/side-effects-static-methods/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allow calls to pure static methods to be tree-shaken' }); diff --git a/test/form/samples/side-effects-switch-statements/_config.js b/test/form/samples/side-effects-switch-statements/_config.js index abecdf650d2..d36aac38c82 100644 --- a/test/form/samples/side-effects-switch-statements/_config.js +++ b/test/form/samples/side-effects-switch-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'switch statements should be correctly tree-shaken' }); diff --git a/test/form/samples/side-effects-this/_config.js b/test/form/samples/side-effects-this/_config.js index 433fe17a00e..3c46475904f 100644 --- a/test/form/samples/side-effects-this/_config.js +++ b/test/form/samples/side-effects-this/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'When a constructor is called with the new keyword, changing its this has no side effects' }); diff --git a/test/form/samples/simplified-initializer/_config.js b/test/form/samples/simplified-initializer/_config.js index aa4d6692b13..b8cba9c117f 100644 --- a/test/form/samples/simplified-initializer/_config.js +++ b/test/form/samples/simplified-initializer/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles simplified variable initializers', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/simplify-expression-annotations/_config.js b/test/form/samples/simplify-expression-annotations/_config.js index 122786e753d..a0d80d6975f 100644 --- a/test/form/samples/simplify-expression-annotations/_config.js +++ b/test/form/samples/simplify-expression-annotations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps correct annotations when simplifying expressinos' }); diff --git a/test/form/samples/simplify-return-expression/_config.js b/test/form/samples/simplify-return-expression/_config.js index a3b11cbe9cb..2175ca52e5e 100644 --- a/test/form/samples/simplify-return-expression/_config.js +++ b/test/form/samples/simplify-return-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Simplifies conditionals in return expression' }); diff --git a/test/form/samples/skips-dead-branches-b/_config.js b/test/form/samples/skips-dead-branches-b/_config.js index aa22c5cf78e..3c56489dd01 100644 --- a/test/form/samples/skips-dead-branches-b/_config.js +++ b/test/form/samples/skips-dead-branches-b/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch (b)' }); diff --git a/test/form/samples/skips-dead-branches-c/_config.js b/test/form/samples/skips-dead-branches-c/_config.js index 28ba06ca477..e2ae889d8e7 100644 --- a/test/form/samples/skips-dead-branches-c/_config.js +++ b/test/form/samples/skips-dead-branches-c/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch (c)' }); diff --git a/test/form/samples/skips-dead-branches-d/_config.js b/test/form/samples/skips-dead-branches-d/_config.js index cd3aa59b71d..e3822d75329 100644 --- a/test/form/samples/skips-dead-branches-d/_config.js +++ b/test/form/samples/skips-dead-branches-d/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch (d)' }); diff --git a/test/form/samples/skips-dead-branches-e/_config.js b/test/form/samples/skips-dead-branches-e/_config.js index 791bfd0932a..16d5c13d318 100644 --- a/test/form/samples/skips-dead-branches-e/_config.js +++ b/test/form/samples/skips-dead-branches-e/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch (e)' }); diff --git a/test/form/samples/skips-dead-branches-f/_config.js b/test/form/samples/skips-dead-branches-f/_config.js index aaaae6c5d5a..dfecee64639 100644 --- a/test/form/samples/skips-dead-branches-f/_config.js +++ b/test/form/samples/skips-dead-branches-f/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch (f)' }); diff --git a/test/form/samples/skips-dead-branches-g/_config.js b/test/form/samples/skips-dead-branches-g/_config.js index aedec83911b..5b007e4d08f 100644 --- a/test/form/samples/skips-dead-branches-g/_config.js +++ b/test/form/samples/skips-dead-branches-g/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead conditional expression branch (g)' }); diff --git a/test/form/samples/skips-dead-branches-h/_config.js b/test/form/samples/skips-dead-branches-h/_config.js index 6327a0be138..2f4da370fec 100644 --- a/test/form/samples/skips-dead-branches-h/_config.js +++ b/test/form/samples/skips-dead-branches-h/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch (h)' }); diff --git a/test/form/samples/skips-dead-branches-i/_config.js b/test/form/samples/skips-dead-branches-i/_config.js index 69a49ce1c40..5410783733c 100644 --- a/test/form/samples/skips-dead-branches-i/_config.js +++ b/test/form/samples/skips-dead-branches-i/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch (i)' }); diff --git a/test/form/samples/skips-dead-branches-j/_config.js b/test/form/samples/skips-dead-branches-j/_config.js index 7fcb3437bb8..8fedcb35ab4 100644 --- a/test/form/samples/skips-dead-branches-j/_config.js +++ b/test/form/samples/skips-dead-branches-j/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch (j)' }); diff --git a/test/form/samples/skips-dead-branches/_config.js b/test/form/samples/skips-dead-branches/_config.js index 5f9ceef5426..a2697cd97a1 100644 --- a/test/form/samples/skips-dead-branches/_config.js +++ b/test/form/samples/skips-dead-branches/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'skips a dead branch' }); diff --git a/test/form/samples/slash-in-function-parameters/_config.js b/test/form/samples/slash-in-function-parameters/_config.js index 3942553f122..c4a5a575702 100644 --- a/test/form/samples/slash-in-function-parameters/_config.js +++ b/test/form/samples/slash-in-function-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles slashes in function parameters and correctly inserts missing ids' }); diff --git a/test/form/samples/sourcemaps-excludesources/_config.js b/test/form/samples/sourcemaps-excludesources/_config.js index 132504b1dda..fdfa88e6128 100644 --- a/test/form/samples/sourcemaps-excludesources/_config.js +++ b/test/form/samples/sourcemaps-excludesources/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correct sourcemaps are written (excluding sourceContent)', skipIfWindows: true, options: { diff --git a/test/form/samples/sourcemaps-external/_config.js b/test/form/samples/sourcemaps-external/_config.js index fc293aaf399..d597d1ab64d 100644 --- a/test/form/samples/sourcemaps-external/_config.js +++ b/test/form/samples/sourcemaps-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correct sourcemaps are written (separate file)', skipIfWindows: true, options: { diff --git a/test/form/samples/sourcemaps-hidden/_config.js b/test/form/samples/sourcemaps-hidden/_config.js index 2d8194e5bf3..ed2ed256bb1 100644 --- a/test/form/samples/sourcemaps-hidden/_config.js +++ b/test/form/samples/sourcemaps-hidden/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correct sourcemaps are written (separate file) without comment', skipIfWindows: true, options: { diff --git a/test/form/samples/sourcemaps-inline/_config.js b/test/form/samples/sourcemaps-inline/_config.js index 4673f97c90f..679182017a3 100644 --- a/test/form/samples/sourcemaps-inline/_config.js +++ b/test/form/samples/sourcemaps-inline/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correct sourcemaps are written (inline)', skipIfWindows: true, options: { diff --git a/test/form/samples/spacing-after-function-with-semicolon/_config.js b/test/form/samples/spacing-after-function-with-semicolon/_config.js index 529d8d1eccd..2288a9c6c80 100644 --- a/test/form/samples/spacing-after-function-with-semicolon/_config.js +++ b/test/form/samples/spacing-after-function-with-semicolon/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles superfluous semicolons' }); diff --git a/test/form/samples/static-block-render/_config.js b/test/form/samples/static-block-render/_config.js index 4c68ef2473f..980aefe230f 100644 --- a/test/form/samples/static-block-render/_config.js +++ b/test/form/samples/static-block-render/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Correctly render treeshaked inline static blocks' }); diff --git a/test/form/samples/static-class-property-calls/_config.js b/test/form/samples/static-class-property-calls/_config.js index 70cf1f96b1b..e509c2ff68e 100644 --- a/test/form/samples/static-class-property-calls/_config.js +++ b/test/form/samples/static-class-property-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles effects when calling static class properties' }); diff --git a/test/form/samples/static-method-deoptimization/_config.js b/test/form/samples/static-method-deoptimization/_config.js index dfcd745e536..39cfe865b77 100644 --- a/test/form/samples/static-method-deoptimization/_config.js +++ b/test/form/samples/static-method-deoptimization/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids infinite recursions when deoptimizing "this" context' }); diff --git a/test/form/samples/strict-false/_config.js b/test/form/samples/strict-false/_config.js index 20e196e3615..25e1e8f0445 100644 --- a/test/form/samples/strict-false/_config.js +++ b/test/form/samples/strict-false/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'use strict should not be present', options: { output: { diff --git a/test/form/samples/string-indentation-b/_config.js b/test/form/samples/string-indentation-b/_config.js index dd86c900059..14c82d9a93b 100644 --- a/test/form/samples/string-indentation-b/_config.js +++ b/test/form/samples/string-indentation-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles multiple var declarations inited to strings (#166)', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/string-indentation/_config.js b/test/form/samples/string-indentation/_config.js index c8827d32f1b..e3a4270ff75 100644 --- a/test/form/samples/string-indentation/_config.js +++ b/test/form/samples/string-indentation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'indentation is preserved in multi-line strings' }); diff --git a/test/form/samples/string-replace-side-effects/_config.js b/test/form/samples/string-replace-side-effects/_config.js index 26f85cd1ca0..6aff9cab951 100644 --- a/test/form/samples/string-replace-side-effects/_config.js +++ b/test/form/samples/string-replace-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not assume string.replace has side effects when called with a string as second argument' }); diff --git a/test/form/samples/super-class-no-side-effects/_config.js b/test/form/samples/super-class-no-side-effects/_config.js index 022a54e4647..17c0fea9b99 100644 --- a/test/form/samples/super-class-no-side-effects/_config.js +++ b/test/form/samples/super-class-no-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Does not wrongly attribute side effects when the super class of an unused class is in a file without side effects (#4808)', options: { treeshake: { moduleSideEffects: false } } diff --git a/test/form/samples/super-classes/super-class-prototype-access/_config.js b/test/form/samples/super-classes/super-class-prototype-access/_config.js index 120e37c3245..7f105452427 100644 --- a/test/form/samples/super-classes/super-class-prototype-access/_config.js +++ b/test/form/samples/super-classes/super-class-prototype-access/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly resolves the prototype of the super class when accessing properties' }); diff --git a/test/form/samples/super-classes/super-class-prototype-assignment/_config.js b/test/form/samples/super-classes/super-class-prototype-assignment/_config.js index 4b02e149fa4..3f32e053f7b 100644 --- a/test/form/samples/super-classes/super-class-prototype-assignment/_config.js +++ b/test/form/samples/super-classes/super-class-prototype-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly resolves the prototype of the super class when assigning properites' }); diff --git a/test/form/samples/super-classes/super-class-prototype-calls/_config.js b/test/form/samples/super-classes/super-class-prototype-calls/_config.js index 9ede530321b..1d6db9af630 100644 --- a/test/form/samples/super-classes/super-class-prototype-calls/_config.js +++ b/test/form/samples/super-classes/super-class-prototype-calls/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly resolves the prototype of the super class when calling properties' }); diff --git a/test/form/samples/super-classes/super-class-prototype-values/_config.js b/test/form/samples/super-classes/super-class-prototype-values/_config.js index 6418aacde29..bad728fa423 100644 --- a/test/form/samples/super-classes/super-class-prototype-values/_config.js +++ b/test/form/samples/super-classes/super-class-prototype-values/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly resolves the prototype of the super class when reading property values' }); diff --git a/test/form/samples/supports-core-js/_config.js b/test/form/samples/supports-core-js/_config.js index ba254493122..ad8e2ea8098 100644 --- a/test/form/samples/supports-core-js/_config.js +++ b/test/form/samples/supports-core-js/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports core-js', options: { // check against tree-shake: false when updating the polyfill diff --git a/test/form/samples/supports-es5-shim/_config.js b/test/form/samples/supports-es5-shim/_config.js index 49921cc36cb..8d44b41d475 100644 --- a/test/form/samples/supports-es5-shim/_config.js +++ b/test/form/samples/supports-es5-shim/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports es5-shim', options: { onwarn(warning) { diff --git a/test/form/samples/supports-es6-shim/_config.js b/test/form/samples/supports-es6-shim/_config.js index a2196f30b1c..e73f67d6336 100644 --- a/test/form/samples/supports-es6-shim/_config.js +++ b/test/form/samples/supports-es6-shim/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports es6-shim', options: { onwarn(warning) { diff --git a/test/form/samples/switch-scopes/_config.js b/test/form/samples/switch-scopes/_config.js index 2b72ba5cbaf..86c4398bd0b 100644 --- a/test/form/samples/switch-scopes/_config.js +++ b/test/form/samples/switch-scopes/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles switch scopes', options: { output: { name: 'myBundle' } } }); diff --git a/test/form/samples/synthetic-named-exports/_config.js b/test/form/samples/synthetic-named-exports/_config.js index 7a6f31db4ae..33c5d5f4372 100644 --- a/test/form/samples/synthetic-named-exports/_config.js +++ b/test/form/samples/synthetic-named-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'synthetic named exports', options: { plugins: [ diff --git a/test/form/samples/system-comments/_config.js b/test/form/samples/system-comments/_config.js index 53592ac733e..74c6254868c 100644 --- a/test/form/samples/system-comments/_config.js +++ b/test/form/samples/system-comments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Correctly places leading comments when rendering system bindings', options: { output: { diff --git a/test/form/samples/system-default-comments/_config.js b/test/form/samples/system-default-comments/_config.js index 81706c4e31a..3b6b40660b1 100644 --- a/test/form/samples/system-default-comments/_config.js +++ b/test/form/samples/system-default-comments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Correctly places leading comments when rendering system default exports', options: { output: { diff --git a/test/form/samples/system-export-declarations/_config.js b/test/form/samples/system-export-declarations/_config.js index 62bece33a0f..3b93d3d5bcc 100644 --- a/test/form/samples/system-export-declarations/_config.js +++ b/test/form/samples/system-export-declarations/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Renders declarations where some variables are exported', options: { output: { diff --git a/test/form/samples/system-export-destructuring-declaration/_config.js b/test/form/samples/system-export-destructuring-declaration/_config.js index 5e253b35461..7bfd1fc2319 100644 --- a/test/form/samples/system-export-destructuring-declaration/_config.js +++ b/test/form/samples/system-export-destructuring-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports destructuring declarations for systemJS', options: { output: { diff --git a/test/form/samples/system-export-rendering-compact/_config.js b/test/form/samples/system-export-rendering-compact/_config.js index 4420969ba55..a9033223df1 100644 --- a/test/form/samples/system-export-rendering-compact/_config.js +++ b/test/form/samples/system-export-rendering-compact/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Renders updates of exported variables for SystemJS output in compact mode', options: { output: { diff --git a/test/form/samples/system-export-rendering/_config.js b/test/form/samples/system-export-rendering/_config.js index e561f0473fd..843cea4565a 100644 --- a/test/form/samples/system-export-rendering/_config.js +++ b/test/form/samples/system-export-rendering/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Renders updates of exported variables for SystemJS output', options: { output: { diff --git a/test/form/samples/system-module-reserved/_config.js b/test/form/samples/system-module-reserved/_config.js index c7c9698a237..e075c35824c 100644 --- a/test/form/samples/system-module-reserved/_config.js +++ b/test/form/samples/system-module-reserved/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not output reserved system format identifiers', options: { external: ['test'], diff --git a/test/form/samples/system-multiple-export-bindings/_config.js b/test/form/samples/system-multiple-export-bindings/_config.js index 4f04e656134..dd6093f9600 100644 --- a/test/form/samples/system-multiple-export-bindings/_config.js +++ b/test/form/samples/system-multiple-export-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports multiple live bindings for the same symbol in systemJS', options: { output: { diff --git a/test/form/samples/system-null-setters/_config.js b/test/form/samples/system-null-setters/_config.js index 93ecfbf9e32..1e743cbf829 100644 --- a/test/form/samples/system-null-setters/_config.js +++ b/test/form/samples/system-null-setters/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to avoid null setters for side effect only imports', options: { external: ['external'], diff --git a/test/form/samples/system-reexports/_config.js b/test/form/samples/system-reexports/_config.js index 0b7dc9144c0..5e583550e02 100644 --- a/test/form/samples/system-reexports/_config.js +++ b/test/form/samples/system-reexports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'merges reexports in systemjs', options: { external: true, diff --git a/test/form/samples/system-semicolon/_config.js b/test/form/samples/system-semicolon/_config.js index dba0cb277d5..4fc44dcd580 100644 --- a/test/form/samples/system-semicolon/_config.js +++ b/test/form/samples/system-semicolon/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports asi in system binding output', options: { output: { diff --git a/test/form/samples/system-uninitialized/_config.js b/test/form/samples/system-uninitialized/_config.js index 1fa3c04721a..871cd409281 100644 --- a/test/form/samples/system-uninitialized/_config.js +++ b/test/form/samples/system-uninitialized/_config.js @@ -1,7 +1,7 @@ // Changed due to https://github.com/acornjs/acorn/issues/806 // Consider reverting this change should this become an acorn option -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports uninitialized binding exports', options: { output: { diff --git a/test/form/samples/tdz-access-in-declaration/_config.js b/test/form/samples/tdz-access-in-declaration/_config.js index 452ecc94509..05017512a52 100644 --- a/test/form/samples/tdz-access-in-declaration/_config.js +++ b/test/form/samples/tdz-access-in-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detect accessing TDZ variables within the declaration' }); diff --git a/test/form/samples/tdz-common/_config.js b/test/form/samples/tdz-common/_config.js index 7caf964c6ee..27cc234e89a 100644 --- a/test/form/samples/tdz-common/_config.js +++ b/test/form/samples/tdz-common/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserve common TDZ violations' }); diff --git a/test/form/samples/tdz-pattern-access/_config.js b/test/form/samples/tdz-pattern-access/_config.js index 378601acb75..c62bbc85985 100644 --- a/test/form/samples/tdz-pattern-access/_config.js +++ b/test/form/samples/tdz-pattern-access/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles accessing variables declared in patterns before their declaration' }); diff --git a/test/form/samples/template-literal/computed-properties/_config.js b/test/form/samples/template-literal/computed-properties/_config.js index 98b93b3a181..0dc3474cb31 100644 --- a/test/form/samples/template-literal/computed-properties/_config.js +++ b/test/form/samples/template-literal/computed-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Resolve template literals in computed property keys' }); diff --git a/test/form/samples/template-literal/simplify-conditionals/_config.js b/test/form/samples/template-literal/simplify-conditionals/_config.js index 9517a414052..11d57dc3dd7 100644 --- a/test/form/samples/template-literal/simplify-conditionals/_config.js +++ b/test/form/samples/template-literal/simplify-conditionals/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Template literals can be simplified when used in conditionals' }); diff --git a/test/form/samples/this-in-class-body/_config.js b/test/form/samples/this-in-class-body/_config.js index a6f1fddfc56..3f970f301a3 100644 --- a/test/form/samples/this-in-class-body/_config.js +++ b/test/form/samples/this-in-class-body/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses the correct "this" value in class properties' }); diff --git a/test/form/samples/this-in-imports/_config.js b/test/form/samples/this-in-imports/_config.js index 1336179a281..a31fabfa411 100644 --- a/test/form/samples/this-in-imports/_config.js +++ b/test/form/samples/this-in-imports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly keep or ignore "this"-expressions when calling imported functions' }); diff --git a/test/form/samples/this-is-undefined/_config.js b/test/form/samples/this-is-undefined/_config.js index f5cc620c248..3c744d8b11d 100644 --- a/test/form/samples/this-is-undefined/_config.js +++ b/test/form/samples/this-is-undefined/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'top-level `this` expression is rewritten as `undefined`', options: { onwarn: () => {} diff --git a/test/form/samples/top-level-await/_config.js b/test/form/samples/top-level-await/_config.js index f9a2728a543..2ed3902716c 100644 --- a/test/form/samples/top-level-await/_config.js +++ b/test/form/samples/top-level-await/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'top-level await support', formats: ['system', 'es'] }); diff --git a/test/form/samples/tree-shake-arguments-conditional/_config.js b/test/form/samples/tree-shake-arguments-conditional/_config.js index 2a8395d195f..e5228acda32 100644 --- a/test/form/samples/tree-shake-arguments-conditional/_config.js +++ b/test/form/samples/tree-shake-arguments-conditional/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks tree-shaking of arguments through simplified conditionals' }); diff --git a/test/form/samples/tree-shake-curried-functions/_config.js b/test/form/samples/tree-shake-curried-functions/_config.js index d48a9dba098..819de8801dd 100644 --- a/test/form/samples/tree-shake-curried-functions/_config.js +++ b/test/form/samples/tree-shake-curried-functions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Remove side-effect-free curried functions (#1263)', expectedWarnings: ['EMPTY_BUNDLE'] }); diff --git a/test/form/samples/tree-shake-default-exports/_config.js b/test/form/samples/tree-shake-default-exports/_config.js index 483f21dedc1..8ae42ad6db0 100644 --- a/test/form/samples/tree-shake-default-exports/_config.js +++ b/test/form/samples/tree-shake-default-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly remove unused default exports' }); diff --git a/test/form/samples/tree-shake-if-statements/_config.js b/test/form/samples/tree-shake-if-statements/_config.js index dfb811a9af9..c626947098c 100644 --- a/test/form/samples/tree-shake-if-statements/_config.js +++ b/test/form/samples/tree-shake-if-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tree-shake if-statements with a condition that can be evaluated' }); diff --git a/test/form/samples/tree-shake-logical-expressions/_config.js b/test/form/samples/tree-shake-logical-expressions/_config.js index b8fa1113f4c..7a16f15ccfe 100644 --- a/test/form/samples/tree-shake-logical-expressions/_config.js +++ b/test/form/samples/tree-shake-logical-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tree-shake unused parts of logical expressions' }); diff --git a/test/form/samples/tree-shake-optional-chaining-literal/_config.js b/test/form/samples/tree-shake-optional-chaining-literal/_config.js index 60bd7005669..64bc4f5bbd3 100644 --- a/test/form/samples/tree-shake-optional-chaining-literal/_config.js +++ b/test/form/samples/tree-shake-optional-chaining-literal/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tree-shake expressions optional chaining with literal values' }); diff --git a/test/form/samples/tree-shake-pure-optional-chaining/_config.js b/test/form/samples/tree-shake-pure-optional-chaining/_config.js index c3daff38811..58251c2acda 100644 --- a/test/form/samples/tree-shake-pure-optional-chaining/_config.js +++ b/test/form/samples/tree-shake-pure-optional-chaining/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tree-shake pure call expressions involving optional chaining' }); diff --git a/test/form/samples/treeshake-classes-with-fields/_config.js b/test/form/samples/treeshake-classes-with-fields/_config.js index 5d7034fe636..76c38b0bc48 100644 --- a/test/form/samples/treeshake-classes-with-fields/_config.js +++ b/test/form/samples/treeshake-classes-with-fields/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treeshakes classes with class fields (#3564)' }); diff --git a/test/form/samples/treeshake-excess-arguments/argument-side-effects/_config.js b/test/form/samples/treeshake-excess-arguments/argument-side-effects/_config.js index aeeed1b1007..2c2aefb246a 100644 --- a/test/form/samples/treeshake-excess-arguments/argument-side-effects/_config.js +++ b/test/form/samples/treeshake-excess-arguments/argument-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains arguments that have side-effects' }); diff --git a/test/form/samples/treeshake-excess-arguments/arguments-variable/_config.js b/test/form/samples/treeshake-excess-arguments/arguments-variable/_config.js index 9dd5cbeab64..85a33fbb24c 100644 --- a/test/form/samples/treeshake-excess-arguments/arguments-variable/_config.js +++ b/test/form/samples/treeshake-excess-arguments/arguments-variable/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not remove arguments from call when arguments variables is accessed' }); diff --git a/test/form/samples/treeshake-excess-arguments/arrow-function-arguments/_config.js b/test/form/samples/treeshake-excess-arguments/arrow-function-arguments/_config.js index 7087d1b5286..4b7c0e47074 100644 --- a/test/form/samples/treeshake-excess-arguments/arrow-function-arguments/_config.js +++ b/test/form/samples/treeshake-excess-arguments/arrow-function-arguments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unneeded arguments from calls to arrow functions' }); diff --git a/test/form/samples/treeshake-excess-arguments/function-arguments/_config.js b/test/form/samples/treeshake-excess-arguments/function-arguments/_config.js index 81e30df49d9..762ac6c939c 100644 --- a/test/form/samples/treeshake-excess-arguments/function-arguments/_config.js +++ b/test/form/samples/treeshake-excess-arguments/function-arguments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unneeded arguments from calls to functions' }); diff --git a/test/form/samples/treeshake-excess-arguments/namespace-members/_config.js b/test/form/samples/treeshake-excess-arguments/namespace-members/_config.js index 9879ccb77f7..e6af8a352a8 100644 --- a/test/form/samples/treeshake-excess-arguments/namespace-members/_config.js +++ b/test/form/samples/treeshake-excess-arguments/namespace-members/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unneeded arguments across namespace member calls' }); diff --git a/test/form/samples/treeshake-excess-arguments/patterns/_config.js b/test/form/samples/treeshake-excess-arguments/patterns/_config.js index 13b68383bd1..1d2c361300b 100644 --- a/test/form/samples/treeshake-excess-arguments/patterns/_config.js +++ b/test/form/samples/treeshake-excess-arguments/patterns/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unneeded arguments from calls when patterns are used' }); diff --git a/test/form/samples/treeshake-excess-arguments/rest-element/_config.js b/test/form/samples/treeshake-excess-arguments/rest-element/_config.js index 27a852e63a1..2b00e145816 100644 --- a/test/form/samples/treeshake-excess-arguments/rest-element/_config.js +++ b/test/form/samples/treeshake-excess-arguments/rest-element/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not remove arguments from calls when rest parameters are used' }); diff --git a/test/form/samples/treeshake-excess-arguments/unused-parameters/_config.js b/test/form/samples/treeshake-excess-arguments/unused-parameters/_config.js index 904f0f5ff17..c68fa60250e 100644 --- a/test/form/samples/treeshake-excess-arguments/unused-parameters/_config.js +++ b/test/form/samples/treeshake-excess-arguments/unused-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes arguments that correspond to unused parameters' }); diff --git a/test/form/samples/treeshake-import-meta-props/_config.js b/test/form/samples/treeshake-import-meta-props/_config.js index a1f5dc8dd7a..cff2de822ac 100644 --- a/test/form/samples/treeshake-import-meta-props/_config.js +++ b/test/form/samples/treeshake-import-meta-props/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'also does not include format globals when tree-shaking import meta' }); diff --git a/test/form/samples/treeshake-import-meta/_config.js b/test/form/samples/treeshake-import-meta/_config.js index 6251dd09dcf..42c63f7922f 100644 --- a/test/form/samples/treeshake-import-meta/_config.js +++ b/test/form/samples/treeshake-import-meta/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports tree-shaking for meta properties' }); diff --git a/test/form/samples/treeshake-json/_config.js b/test/form/samples/treeshake-json/_config.js index 10234fb1a97..13cfc1b2f16 100644 --- a/test/form/samples/treeshake-json/_config.js +++ b/test/form/samples/treeshake-json/_config.js @@ -1,6 +1,6 @@ const json = require('@rollup/plugin-json'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes unusued json keys', options: { plugins: [json()] } }); diff --git a/test/form/samples/treeshake-namespace-access/_config.js b/test/form/samples/treeshake-namespace-access/_config.js index 3bb817a6c86..de35a4275e8 100644 --- a/test/form/samples/treeshake-namespace-access/_config.js +++ b/test/form/samples/treeshake-namespace-access/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not count namespace property access as side-effect', options: { external: 'external' } }); diff --git a/test/form/samples/treeshake-presets/preset-with-override/_config.js b/test/form/samples/treeshake-presets/preset-with-override/_config.js index b27ffd1f433..72e344d2bb6 100644 --- a/test/form/samples/treeshake-presets/preset-with-override/_config.js +++ b/test/form/samples/treeshake-presets/preset-with-override/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows using the "preset" option with overrides', options: { treeshake: { diff --git a/test/form/samples/treeshake-presets/recommended/_config.js b/test/form/samples/treeshake-presets/recommended/_config.js index d415f76693f..2aaba3549ad 100644 --- a/test/form/samples/treeshake-presets/recommended/_config.js +++ b/test/form/samples/treeshake-presets/recommended/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles treeshake preset "recommended"', options: { treeshake: 'recommended', diff --git a/test/form/samples/treeshake-presets/safest/_config.js b/test/form/samples/treeshake-presets/safest/_config.js index 23ebfdf580a..ed4947c81dc 100644 --- a/test/form/samples/treeshake-presets/safest/_config.js +++ b/test/form/samples/treeshake-presets/safest/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles treeshake preset "safest"', options: { treeshake: 'safest', diff --git a/test/form/samples/treeshake-presets/smallest/_config.js b/test/form/samples/treeshake-presets/smallest/_config.js index 2eb2a1c52c1..37dbfe9a84e 100644 --- a/test/form/samples/treeshake-presets/smallest/_config.js +++ b/test/form/samples/treeshake-presets/smallest/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles treeshake preset "smallest"', options: { treeshake: 'smallest', diff --git a/test/form/samples/treeshake-presets/true/_config.js b/test/form/samples/treeshake-presets/true/_config.js index 84777cf5781..70d94cb5057 100644 --- a/test/form/samples/treeshake-presets/true/_config.js +++ b/test/form/samples/treeshake-presets/true/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles treeshake preset true', options: { treeshake: true, diff --git a/test/form/samples/treeshake-sequence-expressions/_config.js b/test/form/samples/treeshake-sequence-expressions/_config.js index acc675741fa..4b854f85752 100644 --- a/test/form/samples/treeshake-sequence-expressions/_config.js +++ b/test/form/samples/treeshake-sequence-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes the last element of a sequence expression if it is unused' }); diff --git a/test/form/samples/try-statement-deoptimization/deactivate-via-option/_config.js b/test/form/samples/try-statement-deoptimization/deactivate-via-option/_config.js index f0e6623d185..3515683a734 100644 --- a/test/form/samples/try-statement-deoptimization/deactivate-via-option/_config.js +++ b/test/form/samples/try-statement-deoptimization/deactivate-via-option/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deactivates try-catch-deoptimization via option', options: { treeshake: { diff --git a/test/form/samples/try-statement-deoptimization/direct-inclusion/_config.js b/test/form/samples/try-statement-deoptimization/direct-inclusion/_config.js index 1424d7e9f63..254e057ee62 100644 --- a/test/form/samples/try-statement-deoptimization/direct-inclusion/_config.js +++ b/test/form/samples/try-statement-deoptimization/direct-inclusion/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains side-effect-free code in try-statement-blocks' }); diff --git a/test/form/samples/try-statement-deoptimization/follow-parameters/_config.js b/test/form/samples/try-statement-deoptimization/follow-parameters/_config.js index 34d78e6ad88..c36adec4846 100644 --- a/test/form/samples/try-statement-deoptimization/follow-parameters/_config.js +++ b/test/form/samples/try-statement-deoptimization/follow-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains side-effect-free code in parameters called from try-statement-blocks' }); diff --git a/test/form/samples/try-statement-deoptimization/follow-pattern-parameters/_config.js b/test/form/samples/try-statement-deoptimization/follow-pattern-parameters/_config.js index 9e3f6664170..1eb45daf126 100644 --- a/test/form/samples/try-statement-deoptimization/follow-pattern-parameters/_config.js +++ b/test/form/samples/try-statement-deoptimization/follow-pattern-parameters/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains side-effect-free code in pattern parameters called from try-statement-blocks' }); diff --git a/test/form/samples/try-statement-deoptimization/follow-variables/_config.js b/test/form/samples/try-statement-deoptimization/follow-variables/_config.js index 4266dae6549..277d526d601 100644 --- a/test/form/samples/try-statement-deoptimization/follow-variables/_config.js +++ b/test/form/samples/try-statement-deoptimization/follow-variables/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not retain side-effect-free code in functions called from try-statement-blocks' }); diff --git a/test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js b/test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js index 39006e36353..e6f03cf5d2f 100644 --- a/test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js +++ b/test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'works when the try-statement is included via an outside variable' }); diff --git a/test/form/samples/try-statement-deoptimization/supports-core-js/_config.js b/test/form/samples/try-statement-deoptimization/supports-core-js/_config.js index b7c5efb739c..ad69e3e1050 100644 --- a/test/form/samples/try-statement-deoptimization/supports-core-js/_config.js +++ b/test/form/samples/try-statement-deoptimization/supports-core-js/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports core-js feature detection (#2869)' }); diff --git a/test/form/samples/typeof-side-effect/_config.js b/test/form/samples/typeof-side-effect/_config.js index 6a576680360..99bb8e82b43 100644 --- a/test/form/samples/typeof-side-effect/_config.js +++ b/test/form/samples/typeof-side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'using typeof is does not trigger global side-effects' }); diff --git a/test/form/samples/umd-noconflict-extend/_config.js b/test/form/samples/umd-noconflict-extend/_config.js index ac9316c0c49..cb71f124fcc 100644 --- a/test/form/samples/umd-noconflict-extend/_config.js +++ b/test/form/samples/umd-noconflict-extend/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports noConflict method for default umd when requested', options: { output: { diff --git a/test/form/samples/umd-noconflict-namespaced/_config.js b/test/form/samples/umd-noconflict-namespaced/_config.js index 25d46c3d420..22ba6ee0073 100644 --- a/test/form/samples/umd-noconflict-namespaced/_config.js +++ b/test/form/samples/umd-noconflict-namespaced/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports noConflict method for default umd when requested', options: { output: { diff --git a/test/form/samples/umd-noconflict-no-exports/_config.js b/test/form/samples/umd-noconflict-no-exports/_config.js index b6e6c9d2292..8ce873ecaf0 100644 --- a/test/form/samples/umd-noconflict-no-exports/_config.js +++ b/test/form/samples/umd-noconflict-no-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports noConflict even when there are no exports', options: { output: { diff --git a/test/form/samples/umd-noconflict/_config.js b/test/form/samples/umd-noconflict/_config.js index 1e498f51fe5..c24d5fecf6b 100644 --- a/test/form/samples/umd-noconflict/_config.js +++ b/test/form/samples/umd-noconflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports noConflict method for default umd when requested', options: { output: { diff --git a/test/form/samples/unary-expressions/_config.js b/test/form/samples/unary-expressions/_config.js index 6b77c4d7868..beef6b92d99 100644 --- a/test/form/samples/unary-expressions/_config.js +++ b/test/form/samples/unary-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles unary expression side-effects' }); diff --git a/test/form/samples/undefined-default-export/_config.js b/test/form/samples/undefined-default-export/_config.js index 29a2dbd8818..ac9baa670ac 100644 --- a/test/form/samples/undefined-default-export/_config.js +++ b/test/form/samples/undefined-default-export/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default exporting undefined' }); diff --git a/test/form/samples/undefined-var/_config.js b/test/form/samples/undefined-var/_config.js index 11b5c706e85..c516217f427 100644 --- a/test/form/samples/undefined-var/_config.js +++ b/test/form/samples/undefined-var/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treeshakes undefined variable literals' }); diff --git a/test/form/samples/unknown-token-effects/_config.js b/test/form/samples/unknown-token-effects/_config.js index 67686e82fec..c917c7ca256 100644 --- a/test/form/samples/unknown-token-effects/_config.js +++ b/test/form/samples/unknown-token-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not tree-shake unknown tokens', options: { acornInjectPlugins: Parser => diff --git a/test/form/samples/unmodified-default-exports-function-argument/_config.js b/test/form/samples/unmodified-default-exports-function-argument/_config.js index 6ed9e74ed85..2d939cc98fb 100644 --- a/test/form/samples/unmodified-default-exports-function-argument/_config.js +++ b/test/form/samples/unmodified-default-exports-function-argument/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'passing unbound default export to function cannot rebind it' }); diff --git a/test/form/samples/unmodified-default-exports/_config.js b/test/form/samples/unmodified-default-exports/_config.js index 21307561913..ed52a41221f 100644 --- a/test/form/samples/unmodified-default-exports/_config.js +++ b/test/form/samples/unmodified-default-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not treat property assignment as rebinding for sake of unbound default exports' }); diff --git a/test/form/samples/unused-called-import/_config.js b/test/form/samples/unused-called-import/_config.js index 992d09dcc2c..f5a7460e1ae 100644 --- a/test/form/samples/unused-called-import/_config.js +++ b/test/form/samples/unused-called-import/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include called-in-unused-code import' }); diff --git a/test/form/samples/unused-called-with-side-effects/_config.js b/test/form/samples/unused-called-with-side-effects/_config.js index 992d09dcc2c..f5a7460e1ae 100644 --- a/test/form/samples/unused-called-with-side-effects/_config.js +++ b/test/form/samples/unused-called-with-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include called-in-unused-code import' }); diff --git a/test/form/samples/unused-default-exports/_config.js b/test/form/samples/unused-default-exports/_config.js index 076d82adb8c..00ac617d1d8 100644 --- a/test/form/samples/unused-default-exports/_config.js +++ b/test/form/samples/unused-default-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not name unused-but-included default export' }); diff --git a/test/form/samples/unused-function-and-class-expressions/_config.js b/test/form/samples/unused-function-and-class-expressions/_config.js index a8ec5c6e8fb..1bd53412422 100644 --- a/test/form/samples/unused-function-and-class-expressions/_config.js +++ b/test/form/samples/unused-function-and-class-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly remove unused function and class expressions' }); diff --git a/test/form/samples/unused-import/_config.js b/test/form/samples/unused-import/_config.js index a3786f31b36..c226e0233b2 100644 --- a/test/form/samples/unused-import/_config.js +++ b/test/form/samples/unused-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'excludes unused imports ([#595])', options: { external: ['external'], diff --git a/test/form/samples/unused-inner-functions-and-classes/_config.js b/test/form/samples/unused-inner-functions-and-classes/_config.js index ba615e00a41..4cc2333a8a3 100644 --- a/test/form/samples/unused-inner-functions-and-classes/_config.js +++ b/test/form/samples/unused-inner-functions-and-classes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include unused inner functions and classes' }); diff --git a/test/form/samples/unused-var/_config.js b/test/form/samples/unused-var/_config.js index 7dbdd4a35e8..c4abc4beadf 100644 --- a/test/form/samples/unused-var/_config.js +++ b/test/form/samples/unused-var/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'omits unused var declaration' }); diff --git a/test/form/samples/update-expression-side-effects/_config.js b/test/form/samples/update-expression-side-effects/_config.js index 4981f110796..f0459d97088 100644 --- a/test/form/samples/update-expression-side-effects/_config.js +++ b/test/form/samples/update-expression-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detect side-effects when dealing with update expressions' }); diff --git a/test/form/samples/updating-assignments/_config.js b/test/form/samples/updating-assignments/_config.js index 548bba2c68b..c3745d1ecd0 100644 --- a/test/form/samples/updating-assignments/_config.js +++ b/test/form/samples/updating-assignments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Correctly handles assignment operators on exports', options: { output: { name: 'bundle' } } }); diff --git a/test/form/samples/url-external/_config.js b/test/form/samples/url-external/_config.js index d16cbadd1cd..837b3fc9b98 100644 --- a/test/form/samples/url-external/_config.js +++ b/test/form/samples/url-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports URL externals', options: { external: ['https://external.com/external.js'], diff --git a/test/form/samples/use-class-name-in-static-block/_config.js b/test/form/samples/use-class-name-in-static-block/_config.js index 639ce10fbb1..5252b5c23d8 100644 --- a/test/form/samples/use-class-name-in-static-block/_config.js +++ b/test/form/samples/use-class-name-in-static-block/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'use the original class name instead of renderName in class body' }); diff --git a/test/form/samples/use-global-map-for-export-name/_config.js b/test/form/samples/use-global-map-for-export-name/_config.js index 5004390a85b..d47ec6c6faa 100644 --- a/test/form/samples/use-global-map-for-export-name/_config.js +++ b/test/form/samples/use-global-map-for-export-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'applies globals to output name', options: { output: { diff --git a/test/form/samples/whitespace-around-namespace-member-expression/_config.js b/test/form/samples/whitespace-around-namespace-member-expression/_config.js index 216e8192c82..0329c415933 100644 --- a/test/form/samples/whitespace-around-namespace-member-expression/_config.js +++ b/test/form/samples/whitespace-around-namespace-member-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'whitespace around the "." in member expressions does not mess up renaming' }); diff --git a/test/form/samples/wrap-simplified-expressions/_config.js b/test/form/samples/wrap-simplified-expressions/_config.js index e048b61374e..98a24ea9330 100644 --- a/test/form/samples/wrap-simplified-expressions/_config.js +++ b/test/form/samples/wrap-simplified-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'wraps simplified expressions that have become callees if necessary' }); diff --git a/test/form/samples/yield-expression/missing-space/_config.js b/test/form/samples/yield-expression/missing-space/_config.js index 4336e9bc5e0..fe27240a3bc 100644 --- a/test/form/samples/yield-expression/missing-space/_config.js +++ b/test/form/samples/yield-expression/missing-space/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Inserts space when simplifying yield expression without space' }); diff --git a/test/form/tsconfig.json b/test/form/tsconfig.json new file mode 100644 index 00000000000..4a26f3ee84c --- /dev/null +++ b/test/form/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "include": [ + "**/_config.js", + "./index.js", + "./define.d.ts" + ] +} diff --git a/test/function/define.d.ts b/test/function/define.d.ts new file mode 100644 index 00000000000..277a867082b --- /dev/null +++ b/test/function/define.d.ts @@ -0,0 +1,5 @@ +import type { TestConfigFunction } from '../types'; + +declare global { + function defineTest(config: TestConfigFunction): TestConfigFunction; +} diff --git a/test/function/samples/access-instance-prop/_config.js b/test/function/samples/access-instance-prop/_config.js index c609afc13cf..cfe057741b2 100644 --- a/test/function/samples/access-instance-prop/_config.js +++ b/test/function/samples/access-instance-prop/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects getters when accessing properties of an instance' }); diff --git a/test/function/samples/add-watch-file-generate/_config.js b/test/function/samples/add-watch-file-generate/_config.js index 212f0178159..1a36f9f8afa 100644 --- a/test/function/samples/add-watch-file-generate/_config.js +++ b/test/function/samples/add-watch-file-generate/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when adding watch files during generate', options: { plugins: { diff --git a/test/function/samples/adds-json-hint-for-missing-export-if-is-json-file/_config.js b/test/function/samples/adds-json-hint-for-missing-export-if-is-json-file/_config.js index 4377889e8d5..880360056f7 100644 --- a/test/function/samples/adds-json-hint-for-missing-export-if-is-json-file/_config.js +++ b/test/function/samples/adds-json-hint-for-missing-export-if-is-json-file/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_ARRAY_JSON = path.join(__dirname, 'array.json'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'should provide json hint when importing a no export json file', error: { binding: 'default', diff --git a/test/function/samples/adds-semicolons-if-necessary-b/_config.js b/test/function/samples/adds-semicolons-if-necessary-b/_config.js index b2d91edafc3..b7cbe7a3f55 100644 --- a/test/function/samples/adds-semicolons-if-necessary-b/_config.js +++ b/test/function/samples/adds-semicolons-if-necessary-b/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds semi-colons if necessary' }); diff --git a/test/function/samples/adds-semicolons-if-necessary-c/_config.js b/test/function/samples/adds-semicolons-if-necessary-c/_config.js index b2d91edafc3..b7cbe7a3f55 100644 --- a/test/function/samples/adds-semicolons-if-necessary-c/_config.js +++ b/test/function/samples/adds-semicolons-if-necessary-c/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds semi-colons if necessary' }); diff --git a/test/function/samples/adds-semicolons-if-necessary-d/_config.js b/test/function/samples/adds-semicolons-if-necessary-d/_config.js index b2d91edafc3..b7cbe7a3f55 100644 --- a/test/function/samples/adds-semicolons-if-necessary-d/_config.js +++ b/test/function/samples/adds-semicolons-if-necessary-d/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds semi-colons if necessary' }); diff --git a/test/function/samples/adds-semicolons-if-necessary/_config.js b/test/function/samples/adds-semicolons-if-necessary/_config.js index b2d91edafc3..b7cbe7a3f55 100644 --- a/test/function/samples/adds-semicolons-if-necessary/_config.js +++ b/test/function/samples/adds-semicolons-if-necessary/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds semi-colons if necessary' }); diff --git a/test/function/samples/adds-timings-to-bundle-when-codesplitting/_config.js b/test/function/samples/adds-timings-to-bundle-when-codesplitting/_config.js index fb3d43ef4ee..88086e2d5a8 100644 --- a/test/function/samples/adds-timings-to-bundle-when-codesplitting/_config.js +++ b/test/function/samples/adds-timings-to-bundle-when-codesplitting/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Adds timing information to bundle when bundling with perf=true', options: { input: ['main.js', 'main2.js'], diff --git a/test/function/samples/adds-timings-to-bundle/_config.js b/test/function/samples/adds-timings-to-bundle/_config.js index 74fa6c6de22..66ced94a3e2 100644 --- a/test/function/samples/adds-timings-to-bundle/_config.js +++ b/test/function/samples/adds-timings-to-bundle/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Adds timing information to bundle when bundling with perf=true', options: { perf: true diff --git a/test/function/samples/aliased-not-exported-twice/_config.js b/test/function/samples/aliased-not-exported-twice/_config.js index 8f9f135ec23..0f9e90ff730 100644 --- a/test/function/samples/aliased-not-exported-twice/_config.js +++ b/test/function/samples/aliased-not-exported-twice/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not export aliased binding under original name (#438)', exports(exports) { assert.equal(exports.number, 0); diff --git a/test/function/samples/allow-reserved/_config.js b/test/function/samples/allow-reserved/_config.js index ca874bfed0a..810d2959e67 100644 --- a/test/function/samples/allow-reserved/_config.js +++ b/test/function/samples/allow-reserved/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allow reserved identifiers via custom acorn options', options: { acorn: { diff --git a/test/function/samples/allow-undefined-as-parameter/_config.js b/test/function/samples/allow-undefined-as-parameter/_config.js index af3959c26c5..9428adf5439 100644 --- a/test/function/samples/allow-undefined-as-parameter/_config.js +++ b/test/function/samples/allow-undefined-as-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not make assumptions about its value when using undefined as a parameter name' }); diff --git a/test/function/samples/allows-external-modules-from-nested-module/_config.js b/test/function/samples/allows-external-modules-from-nested-module/_config.js index e0e566bd841..b3523c17432 100644 --- a/test/function/samples/allows-external-modules-from-nested-module/_config.js +++ b/test/function/samples/allows-external-modules-from-nested-module/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports external modules from nested internal modules', options: { external: ['path'] diff --git a/test/function/samples/allows-unknown-binary-operators/_config.js b/test/function/samples/allows-unknown-binary-operators/_config.js index 41a9c9029fd..8c4b6a8bd1a 100644 --- a/test/function/samples/allows-unknown-binary-operators/_config.js +++ b/test/function/samples/allows-unknown-binary-operators/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows unknown binary operators' }); diff --git a/test/function/samples/already-deshadowed-import/_config.js b/test/function/samples/already-deshadowed-import/_config.js index ba8f4eec08e..abe0336dca5 100644 --- a/test/function/samples/already-deshadowed-import/_config.js +++ b/test/function/samples/already-deshadowed-import/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_BOB = path.join(__dirname, 'bob.js'); const ID_ALICE = path.join(__dirname, 'alice.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handle already module import names correctly if they are have already been deshadowed', warnings: [ diff --git a/test/function/samples/amd-auto-id-id/_config.js b/test/function/samples/amd-auto-id-id/_config.js index 19aed37efc3..24028e12223 100644 --- a/test/function/samples/amd-auto-id-id/_config.js +++ b/test/function/samples/amd-auto-id-id/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using both the amd.autoId and the amd.id option', options: { output: { dir: 'dist', amd: { autoId: 'a', id: 'a' } } diff --git a/test/function/samples/amd-base-path-id/_config.js b/test/function/samples/amd-base-path-id/_config.js index 62d3e4887c9..c5253093a86 100644 --- a/test/function/samples/amd-base-path-id/_config.js +++ b/test/function/samples/amd-base-path-id/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using both the amd.basePath and the amd.id option', options: { output: { dir: 'dist', amd: { basePath: 'a', id: 'a' } } diff --git a/test/function/samples/amd-base-path/_config.js b/test/function/samples/amd-base-path/_config.js index 974471f568a..3403eff43fe 100644 --- a/test/function/samples/amd-base-path/_config.js +++ b/test/function/samples/amd-base-path/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using only amd.basePath option', options: { output: { dir: 'dist', amd: { basePath: 'a' } } diff --git a/test/function/samples/arbitrary-module-namespace-identifiers/_config.js b/test/function/samples/arbitrary-module-namespace-identifiers/_config.js index 8fdd13ba230..4de0134af78 100644 --- a/test/function/samples/arbitrary-module-namespace-identifiers/_config.js +++ b/test/function/samples/arbitrary-module-namespace-identifiers/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports arbitrary module namespace identifiers' }); diff --git a/test/function/samples/argument-deoptimization/global-calls/_config.js b/test/function/samples/argument-deoptimization/global-calls/_config.js index 4e5116ea6f7..4cae795a68a 100644 --- a/test/function/samples/argument-deoptimization/global-calls/_config.js +++ b/test/function/samples/argument-deoptimization/global-calls/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks argument mutations of calls to globals', options: { treeshake: { diff --git a/test/function/samples/argument-deoptimization/parameter-access-mutation/_config.js b/test/function/samples/argument-deoptimization/parameter-access-mutation/_config.js index 8de12ed70ab..e495ceb3b8c 100644 --- a/test/function/samples/argument-deoptimization/parameter-access-mutation/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-access-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of function parameters when accessed' }); diff --git a/test/function/samples/argument-deoptimization/parameter-call-mutation/_config.js b/test/function/samples/argument-deoptimization/parameter-call-mutation/_config.js index b048b512549..0bbcc602c1f 100644 --- a/test/function/samples/argument-deoptimization/parameter-call-mutation/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-call-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of function parameters when called' }); diff --git a/test/function/samples/argument-deoptimization/parameter-deep-access-mutation/_config.js b/test/function/samples/argument-deoptimization/parameter-deep-access-mutation/_config.js index 8de12ed70ab..e495ceb3b8c 100644 --- a/test/function/samples/argument-deoptimization/parameter-deep-access-mutation/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-deep-access-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of function parameters when accessed' }); diff --git a/test/function/samples/argument-deoptimization/parameter-mutation-destructured/_config.js b/test/function/samples/argument-deoptimization/parameter-mutation-destructured/_config.js index 0829d523cba..4513b76f394 100644 --- a/test/function/samples/argument-deoptimization/parameter-mutation-destructured/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-mutation-destructured/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of destructured function parameters' }); diff --git a/test/function/samples/argument-deoptimization/parameter-mutation-spread/_config.js b/test/function/samples/argument-deoptimization/parameter-mutation-spread/_config.js index c460abdc2d6..1bff8ad08c4 100644 --- a/test/function/samples/argument-deoptimization/parameter-mutation-spread/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-mutation-spread/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of function parameters picked up by spread operator' }); diff --git a/test/function/samples/argument-deoptimization/parameter-mutation/_config.js b/test/function/samples/argument-deoptimization/parameter-mutation/_config.js index 59a5243f5df..b9398cb6bdf 100644 --- a/test/function/samples/argument-deoptimization/parameter-mutation/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of function parameters' }); diff --git a/test/function/samples/argument-deoptimization/parameter-variable-merge/_config.js b/test/function/samples/argument-deoptimization/parameter-variable-merge/_config.js index 7d92ed4c3c2..6e54decc80b 100644 --- a/test/function/samples/argument-deoptimization/parameter-variable-merge/_config.js +++ b/test/function/samples/argument-deoptimization/parameter-variable-merge/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly merges parameters and variable declarations' }); diff --git a/test/function/samples/argument-deoptimization/return-function-known/_config.js b/test/function/samples/argument-deoptimization/return-function-known/_config.js index aba75baad3e..d3d765cf06d 100644 --- a/test/function/samples/argument-deoptimization/return-function-known/_config.js +++ b/test/function/samples/argument-deoptimization/return-function-known/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of function parameters by known returned functions' }); diff --git a/test/function/samples/argument-deoptimization/return-function-unknown/_config.js b/test/function/samples/argument-deoptimization/return-function-unknown/_config.js index aba75baad3e..d3d765cf06d 100644 --- a/test/function/samples/argument-deoptimization/return-function-unknown/_config.js +++ b/test/function/samples/argument-deoptimization/return-function-unknown/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of function parameters by known returned functions' }); diff --git a/test/function/samples/argument-deoptimization/unknown-global-assignment/_config.js b/test/function/samples/argument-deoptimization/unknown-global-assignment/_config.js index 2f576cf5ab7..14760749f35 100644 --- a/test/function/samples/argument-deoptimization/unknown-global-assignment/_config.js +++ b/test/function/samples/argument-deoptimization/unknown-global-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of assignments to unknown globals' }); diff --git a/test/function/samples/argument-deoptimization/unknown-global-call/_config.js b/test/function/samples/argument-deoptimization/unknown-global-call/_config.js index 2e7fd7017fa..e081e8244db 100644 --- a/test/function/samples/argument-deoptimization/unknown-global-call/_config.js +++ b/test/function/samples/argument-deoptimization/unknown-global-call/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks argument mutations of calls to unknown globals' }); diff --git a/test/function/samples/argument-treeshaking-parameter-conflict/_config.js b/test/function/samples/argument-treeshaking-parameter-conflict/_config.js index 7ede1774aee..cccfdf70011 100644 --- a/test/function/samples/argument-treeshaking-parameter-conflict/_config.js +++ b/test/function/samples/argument-treeshaking-parameter-conflict/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not cause conflicts when deconflicting non-included parameters' }); diff --git a/test/function/samples/array-double-spread/_config.js b/test/function/samples/array-double-spread/_config.js index 93cca1a2661..131e3581fbf 100644 --- a/test/function/samples/array-double-spread/_config.js +++ b/test/function/samples/array-double-spread/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly deoptimizes when there is no proto' }); diff --git a/test/function/samples/array-from-side-effect/_config.js b/test/function/samples/array-from-side-effect/_config.js index 986b2a5f052..13db3d76d16 100644 --- a/test/function/samples/array-from-side-effect/_config.js +++ b/test/function/samples/array-from-side-effect/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Observes side-effects in Array.from', exports(exports) { assert.strictEqual(exports.x, 7); diff --git a/test/function/samples/array-getter/_config.js b/test/function/samples/array-getter/_config.js index c5e8774f566..77d995f7548 100644 --- a/test/function/samples/array-getter/_config.js +++ b/test/function/samples/array-getter/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles getters defined on arrays' }); diff --git a/test/function/samples/array-mutation/_config.js b/test/function/samples/array-mutation/_config.js index 5136218a1d7..7aedc8b8dad 100644 --- a/test/function/samples/array-mutation/_config.js +++ b/test/function/samples/array-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks array mutations' }); diff --git a/test/function/samples/asi-prevention-with-comment-like-strings/_config.js b/test/function/samples/asi-prevention-with-comment-like-strings/_config.js index c850e3a3b4a..c23920aa81d 100644 --- a/test/function/samples/asi-prevention-with-comment-like-strings/_config.js +++ b/test/function/samples/asi-prevention-with-comment-like-strings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not hang when scanning for line-breaks in ASI prevention and there are comment-like strings' }); diff --git a/test/function/samples/assign-namespace-to-var/_config.js b/test/function/samples/assign-namespace-to-var/_config.js index e1fd1c259f4..dfa32a14fcd 100644 --- a/test/function/samples/assign-namespace-to-var/_config.js +++ b/test/function/samples/assign-namespace-to-var/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows a namespace to be assigned to a variable', warnings: [ { diff --git a/test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_config.js b/test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_config.js index 96da985b391..746e1e85c49 100644 --- a/test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_config.js +++ b/test/function/samples/assignment-deoptimization/assignee-is-deoptimized/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure the assignee is deoptimized' }); diff --git a/test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_config.js b/test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_config.js index a656c2b08e2..97798c8804f 100644 --- a/test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_config.js +++ b/test/function/samples/assignment-deoptimization/assignment-target-is-deoptimized/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure the assignment target is deoptimized' }); diff --git a/test/function/samples/assignment-deoptimization/nested-assignment/_config.js b/test/function/samples/assignment-deoptimization/nested-assignment/_config.js index cb4168b44e8..4fe911d3261 100644 --- a/test/function/samples/assignment-deoptimization/nested-assignment/_config.js +++ b/test/function/samples/assignment-deoptimization/nested-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks assigments nested in expressions that are included for other reasons' }); diff --git a/test/function/samples/assignment-deoptimization/try-catch-inclusion/_config.js b/test/function/samples/assignment-deoptimization/try-catch-inclusion/_config.js index ae37e8fac62..16c632cf582 100644 --- a/test/function/samples/assignment-deoptimization/try-catch-inclusion/_config.js +++ b/test/function/samples/assignment-deoptimization/try-catch-inclusion/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks assigments included via try-catch-deoptimization' }); diff --git a/test/function/samples/assignment-patterns/_config.js b/test/function/samples/assignment-patterns/_config.js index b8828636199..e106844c0c3 100644 --- a/test/function/samples/assignment-patterns/_config.js +++ b/test/function/samples/assignment-patterns/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows reassigments to default parameters that shadow imports' }); diff --git a/test/function/samples/assignment-to-exports-b/_config.js b/test/function/samples/assignment-to-exports-b/_config.js index 4c5b4aff026..6a87b721e67 100644 --- a/test/function/samples/assignment-to-exports-b/_config.js +++ b/test/function/samples/assignment-to-exports-b/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports are rewritten inside a variable init', exports: exports => { assert.equal(exports.b, 42); diff --git a/test/function/samples/assignment-to-exports/_config.js b/test/function/samples/assignment-to-exports/_config.js index 8f809def259..9c94ca8be1f 100644 --- a/test/function/samples/assignment-to-exports/_config.js +++ b/test/function/samples/assignment-to-exports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports are kept up-to-date', exports(exports) { assert.equal(exports.count, 0); diff --git a/test/function/samples/assignment-to-re-exports-conflict/_config.js b/test/function/samples/assignment-to-re-exports-conflict/_config.js index 2424472c02f..831474af81d 100644 --- a/test/function/samples/assignment-to-re-exports-conflict/_config.js +++ b/test/function/samples/assignment-to-re-exports-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports are kept up-to-date', exports(exports) { assert.equal(exports.count, 0); diff --git a/test/function/samples/assignment-to-re-exports/_config.js b/test/function/samples/assignment-to-re-exports/_config.js index 2424472c02f..831474af81d 100644 --- a/test/function/samples/assignment-to-re-exports/_config.js +++ b/test/function/samples/assignment-to-re-exports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports are kept up-to-date', exports(exports) { assert.equal(exports.count, 0); diff --git a/test/function/samples/associate-arrow-function-parameter-mutations/_config.js b/test/function/samples/associate-arrow-function-parameter-mutations/_config.js index 0edae353ffa..cb9e0ebafee 100644 --- a/test/function/samples/associate-arrow-function-parameter-mutations/_config.js +++ b/test/function/samples/associate-arrow-function-parameter-mutations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates arrow function parameters with their call arguments with regard to mutations', exports(exports) { diff --git a/test/function/samples/associate-arrow-function-return-values/_config.js b/test/function/samples/associate-arrow-function-return-values/_config.js index 5140cc773ce..9de1dd167b9 100644 --- a/test/function/samples/associate-arrow-function-return-values/_config.js +++ b/test/function/samples/associate-arrow-function-return-values/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates function return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-es5-constructor-parameter-mutations/_config.js b/test/function/samples/associate-es5-constructor-parameter-mutations/_config.js index 7cbbe60a6ea..58d8bdb147a 100644 --- a/test/function/samples/associate-es5-constructor-parameter-mutations/_config.js +++ b/test/function/samples/associate-es5-constructor-parameter-mutations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates ES5 constructor parameters with their call arguments', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-es6-constructor-parameter-mutations/_config.js b/test/function/samples/associate-es6-constructor-parameter-mutations/_config.js index 7cbbe60a6ea..58d8bdb147a 100644 --- a/test/function/samples/associate-es6-constructor-parameter-mutations/_config.js +++ b/test/function/samples/associate-es6-constructor-parameter-mutations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates ES5 constructor parameters with their call arguments', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-function-parameter-mutations-2/_config.js b/test/function/samples/associate-function-parameter-mutations-2/_config.js index 9c59e73e5d1..7cb7c66853e 100644 --- a/test/function/samples/associate-function-parameter-mutations-2/_config.js +++ b/test/function/samples/associate-function-parameter-mutations-2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates function parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-function-parameter-mutations/_config.js b/test/function/samples/associate-function-parameter-mutations/_config.js index 64441446c0f..b9835c8de95 100644 --- a/test/function/samples/associate-function-parameter-mutations/_config.js +++ b/test/function/samples/associate-function-parameter-mutations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates function parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.baz, 'present'); diff --git a/test/function/samples/associate-function-return-values-2/_config.js b/test/function/samples/associate-function-return-values-2/_config.js index f5610157d2b..459e20d848c 100644 --- a/test/function/samples/associate-function-return-values-2/_config.js +++ b/test/function/samples/associate-function-return-values-2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates function return values with regard to calls', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-function-return-values-3/_config.js b/test/function/samples/associate-function-return-values-3/_config.js index 4cee02c5d23..5e415df184a 100644 --- a/test/function/samples/associate-function-return-values-3/_config.js +++ b/test/function/samples/associate-function-return-values-3/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates function return values of returned functions', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-function-return-values-4/_config.js b/test/function/samples/associate-function-return-values-4/_config.js index 6b0d3206068..00eb1b235e0 100644 --- a/test/function/samples/associate-function-return-values-4/_config.js +++ b/test/function/samples/associate-function-return-values-4/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Handles empty return statements (#1702)', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-function-return-values-5/_config.js b/test/function/samples/associate-function-return-values-5/_config.js index 29993f8910a..6884e5d5bd8 100644 --- a/test/function/samples/associate-function-return-values-5/_config.js +++ b/test/function/samples/associate-function-return-values-5/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates value mutations across return values', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-function-return-values-across-other-expressions/_config.js b/test/function/samples/associate-function-return-values-across-other-expressions/_config.js index 5140cc773ce..9de1dd167b9 100644 --- a/test/function/samples/associate-function-return-values-across-other-expressions/_config.js +++ b/test/function/samples/associate-function-return-values-across-other-expressions/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates function return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-function-return-values/_config.js b/test/function/samples/associate-function-return-values/_config.js index 5140cc773ce..9de1dd167b9 100644 --- a/test/function/samples/associate-function-return-values/_config.js +++ b/test/function/samples/associate-function-return-values/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates function return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-getter-return-values-2/_config.js b/test/function/samples/associate-getter-return-values-2/_config.js index 71d50f2007b..5019d71d961 100644 --- a/test/function/samples/associate-getter-return-values-2/_config.js +++ b/test/function/samples/associate-getter-return-values-2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates getter return values with regard to calls', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-getter-return-values/_config.js b/test/function/samples/associate-getter-return-values/_config.js index fb39fcfc790..8d9ba8ae18a 100644 --- a/test/function/samples/associate-getter-return-values/_config.js +++ b/test/function/samples/associate-getter-return-values/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates getter return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-method-parameter-mutations-2/_config.js b/test/function/samples/associate-method-parameter-mutations-2/_config.js index 968a0aefa27..ce60a4a200d 100644 --- a/test/function/samples/associate-method-parameter-mutations-2/_config.js +++ b/test/function/samples/associate-method-parameter-mutations-2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates method parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-method-parameter-mutations/_config.js b/test/function/samples/associate-method-parameter-mutations/_config.js index 8b255b6e407..9604ccf9bad 100644 --- a/test/function/samples/associate-method-parameter-mutations/_config.js +++ b/test/function/samples/associate-method-parameter-mutations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates method parameters with their call arguments with regard to mutations', exports(exports) { assert.equal(exports.baz, 'present'); diff --git a/test/function/samples/associate-object-expression-parameter-mutations/_config.js b/test/function/samples/associate-object-expression-parameter-mutations/_config.js index 7eef58ad395..5ce355cb425 100644 --- a/test/function/samples/associate-object-expression-parameter-mutations/_config.js +++ b/test/function/samples/associate-object-expression-parameter-mutations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates object expression member parameters with their call arguments', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-object-expression-return-values/_config.js b/test/function/samples/associate-object-expression-return-values/_config.js index 7eef58ad395..5ce355cb425 100644 --- a/test/function/samples/associate-object-expression-return-values/_config.js +++ b/test/function/samples/associate-object-expression-return-values/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates object expression member parameters with their call arguments', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-parameter-mutations-across-other-expressions/_config.js b/test/function/samples/associate-parameter-mutations-across-other-expressions/_config.js index c7be9d0d798..0d06672ea9a 100644 --- a/test/function/samples/associate-parameter-mutations-across-other-expressions/_config.js +++ b/test/function/samples/associate-parameter-mutations-across-other-expressions/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates parameters with their call arguments across other expressions', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/associate-setter-parameters/_config.js b/test/function/samples/associate-setter-parameters/_config.js index fb39fcfc790..8d9ba8ae18a 100644 --- a/test/function/samples/associate-setter-parameters/_config.js +++ b/test/function/samples/associate-setter-parameters/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Associates getter return values with regard to mutations', exports(exports) { assert.equal(exports.bar, 'present'); diff --git a/test/function/samples/async-function-return/_config.js b/test/function/samples/async-function-return/_config.js index 89d66e3b363..1f8ff777575 100644 --- a/test/function/samples/async-function-return/_config.js +++ b/test/function/samples/async-function-return/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses the correct return value for async functions' }); diff --git a/test/function/samples/avoid-exports-dot-asterisk/_config.js b/test/function/samples/avoid-exports-dot-asterisk/_config.js index 9f310eedd27..c33467238dd 100644 --- a/test/function/samples/avoid-exports-dot-asterisk/_config.js +++ b/test/function/samples/avoid-exports-dot-asterisk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoid return or set module.exports to dot-asterisk style', options: { external: () => true, diff --git a/test/function/samples/avoid-variable-be-empty/_config.js b/test/function/samples/avoid-variable-be-empty/_config.js index 07d821ecb20..bc96942f808 100644 --- a/test/function/samples/avoid-variable-be-empty/_config.js +++ b/test/function/samples/avoid-variable-be-empty/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoid variable from empty module name be empty', options: { input: '', diff --git a/test/function/samples/aync-options/_config.js b/test/function/samples/aync-options/_config.js index b7739b10717..5c68bf5bf7e 100644 --- a/test/function/samples/aync-options/_config.js +++ b/test/function/samples/aync-options/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles async plugin options', options: { preserveEntrySignatures: false, diff --git a/test/function/samples/banner-and-footer/_config.js b/test/function/samples/banner-and-footer/_config.js index 476b5c12da8..b38566891ea 100644 --- a/test/function/samples/banner-and-footer/_config.js +++ b/test/function/samples/banner-and-footer/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds a banner/footer', options: { output: { diff --git a/test/function/samples/bindings/_config.js b/test/function/samples/bindings/_config.js index 7b03794f01b..33615aaf9d8 100644 --- a/test/function/samples/bindings/_config.js +++ b/test/function/samples/bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maintains live bindings' }); diff --git a/test/function/samples/braceless-arrow-function-returning-function/_config.js b/test/function/samples/braceless-arrow-function-returning-function/_config.js index 4736904c5b0..6b96e32c1b3 100644 --- a/test/function/samples/braceless-arrow-function-returning-function/_config.js +++ b/test/function/samples/braceless-arrow-function-returning-function/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'arrow function without braces returning a function (#1032)' }); diff --git a/test/function/samples/break-label/_config.js b/test/function/samples/break-label/_config.js index fc4d779aae0..d6d5bb4a607 100644 --- a/test/function/samples/break-label/_config.js +++ b/test/function/samples/break-label/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not deconflict break label (#2773)', exports(exports) { assert.deepStrictEqual(exports, { value: 'original', n: 1 }); diff --git a/test/function/samples/build-promise-chain/_config.js b/test/function/samples/build-promise-chain/_config.js index c0d33f22bc5..1bd9091454f 100644 --- a/test/function/samples/build-promise-chain/_config.js +++ b/test/function/samples/build-promise-chain/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Does not fail when iteratively chaining promises' }); diff --git a/test/function/samples/builtin-prototypes/argument-side-effects/_config.js b/test/function/samples/builtin-prototypes/argument-side-effects/_config.js index d3abbffa069..7c090771b85 100644 --- a/test/function/samples/builtin-prototypes/argument-side-effects/_config.js +++ b/test/function/samples/builtin-prototypes/argument-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects in chained string method arguments' }); diff --git a/test/function/samples/builtin-prototypes/truthiness/_config.js b/test/function/samples/builtin-prototypes/truthiness/_config.js index f128b1bb288..486d00cfbbc 100644 --- a/test/function/samples/builtin-prototypes/truthiness/_config.js +++ b/test/function/samples/builtin-prototypes/truthiness/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'regards builtin methods as truthy in objects' }); diff --git a/test/function/samples/bundle-facade-order/_config.js b/test/function/samples/bundle-facade-order/_config.js index 004d500f97d..a860679c1c7 100644 --- a/test/function/samples/bundle-facade-order/_config.js +++ b/test/function/samples/bundle-facade-order/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects the order of entry points when there are additional facades for chunks', options: { input: { diff --git a/test/function/samples/call-external-function/_config.js b/test/function/samples/call-external-function/_config.js index bfe0595afa2..173be565ecc 100644 --- a/test/function/samples/call-external-function/_config.js +++ b/test/function/samples/call-external-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles call of aliased external function (#957)', warnings() {}, context: { diff --git a/test/function/samples/call-marked-pure-with-plugin-parse-ast/_config.js b/test/function/samples/call-marked-pure-with-plugin-parse-ast/_config.js index 74bcba50936..9fe44391aee 100644 --- a/test/function/samples/call-marked-pure-with-plugin-parse-ast/_config.js +++ b/test/function/samples/call-marked-pure-with-plugin-parse-ast/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external function calls marked with pure comment do not have effects and should be removed even if parsed by PluginContext.parse method', options: { diff --git a/test/function/samples/call-marked-pure/_config.js b/test/function/samples/call-marked-pure/_config.js index 0d7e5e3ead8..577284c52d3 100644 --- a/test/function/samples/call-marked-pure/_config.js +++ b/test/function/samples/call-marked-pure/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external function calls marked with pure comment do not have effects', options: { external: ['socks'] diff --git a/test/function/samples/call-non-function-default-exports/_config.js b/test/function/samples/call-non-function-default-exports/_config.js index 6a3a389d3fa..0213570792c 100644 --- a/test/function/samples/call-non-function-default-exports/_config.js +++ b/test/function/samples/call-non-function-default-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'calls non-function default exports' }); diff --git a/test/function/samples/can-import-self-treeshake/_config.js b/test/function/samples/can-import-self-treeshake/_config.js index ca05a478dd2..6ab879fbb27 100644 --- a/test/function/samples/can-import-self-treeshake/_config.js +++ b/test/function/samples/can-import-self-treeshake/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_LIB = path.join(__dirname, 'lib.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'direct self import', warnings: [ { diff --git a/test/function/samples/can-import-self/_config.js b/test/function/samples/can-import-self/_config.js index 0fbf1300212..1cdda707710 100644 --- a/test/function/samples/can-import-self/_config.js +++ b/test/function/samples/can-import-self/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const ID_LIB = path.join(__dirname, 'lib.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'a module importing its own bindings', exports(exports) { assert.equal(exports.result, 4); diff --git a/test/function/samples/cannot-call-external-namespace/_config.js b/test/function/samples/cannot-call-external-namespace/_config.js index 823c2700e1a..72faabd454f 100644 --- a/test/function/samples/cannot-call-external-namespace/_config.js +++ b/test/function/samples/cannot-call-external-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns if code calls an external namespace', options: { external: ['fs'] diff --git a/test/function/samples/cannot-call-internal-namespace/_config.js b/test/function/samples/cannot-call-internal-namespace/_config.js index 023106c0574..15b28a84778 100644 --- a/test/function/samples/cannot-call-internal-namespace/_config.js +++ b/test/function/samples/cannot-call-internal-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns if code calls an internal namespace', warnings(warnings) { assert.deepStrictEqual(warnings.map(String), [ diff --git a/test/function/samples/cannot-resolve-sourcemap-warning/_config.js b/test/function/samples/cannot-resolve-sourcemap-warning/_config.js index 2a56c5b9275..89dfd06cdf3 100644 --- a/test/function/samples/cannot-resolve-sourcemap-warning/_config.js +++ b/test/function/samples/cannot-resolve-sourcemap-warning/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles when a sourcemap cannot be resolved in a warning', options: { plugins: { diff --git a/test/function/samples/catch-block-scope/_config.js b/test/function/samples/catch-block-scope/_config.js index a85397a7c33..aa81898ae7a 100644 --- a/test/function/samples/catch-block-scope/_config.js +++ b/test/function/samples/catch-block-scope/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct scope in catch blocks' }); diff --git a/test/function/samples/catch-dynamic-import-failure/_config.js b/test/function/samples/catch-dynamic-import-failure/_config.js index 098e725ae7b..bb2bfb4c966 100644 --- a/test/function/samples/catch-dynamic-import-failure/_config.js +++ b/test/function/samples/catch-dynamic-import-failure/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows catching failed dynamic imports', options: { input: ['main', 'exists-default'], diff --git a/test/function/samples/catch-scope-shadowing/_config.js b/test/function/samples/catch-scope-shadowing/_config.js index 15f8534ef1e..4d19aa4f1f4 100644 --- a/test/function/samples/catch-scope-shadowing/_config.js +++ b/test/function/samples/catch-scope-shadowing/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly associates shadowed variables in catch scopes' }); diff --git a/test/function/samples/catch-scope-variables/_config.js b/test/function/samples/catch-scope-variables/_config.js index f3048ce147a..a18b60e2583 100644 --- a/test/function/samples/catch-scope-variables/_config.js +++ b/test/function/samples/catch-scope-variables/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles variable declarations in catch scopes' }); diff --git a/test/function/samples/chained-mutable-array-methods/_config.js b/test/function/samples/chained-mutable-array-methods/_config.js index c8849abb961..8d79493c4b8 100644 --- a/test/function/samples/chained-mutable-array-methods/_config.js +++ b/test/function/samples/chained-mutable-array-methods/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'recognizes side-effects when applying mutable array methods to chained array methods (#3555)', exports(exports) { diff --git a/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js b/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js index 3055d02c799..62928ee4991 100644 --- a/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js +++ b/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js @@ -20,7 +20,7 @@ const expectedResult = { } }; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'check exports and exportedBindings in moduleParsed as a supplementary test', options: { plugins: { diff --git a/test/function/samples/check-resolve-for-entry/_config.js b/test/function/samples/check-resolve-for-entry/_config.js index a0a9606b7d8..5fa4ed9deb9 100644 --- a/test/function/samples/check-resolve-for-entry/_config.js +++ b/test/function/samples/check-resolve-for-entry/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'checks that entry is resolved', options: { input: 'not/a/path/that/actually/really/exists' diff --git a/test/function/samples/chunk-external-dependency-execution-order/_config.js b/test/function/samples/chunk-external-dependency-execution-order/_config.js index 76fe2d25b70..47ba9b5d48c 100644 --- a/test/function/samples/chunk-external-dependency-execution-order/_config.js +++ b/test/function/samples/chunk-external-dependency-execution-order/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const executionOrder = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Uses correct execution order when several modules in a chunk have external dependencies', context: { diff --git a/test/function/samples/chunking-duplicate-reexport/_config.js b/test/function/samples/chunking-duplicate-reexport/_config.js index 99a0256a64a..aa412cadade 100644 --- a/test/function/samples/chunking-duplicate-reexport/_config.js +++ b/test/function/samples/chunking-duplicate-reexport/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles duplicate reexports when using dynamic imports', exports(exports) { return exports.then(result => assert.deepStrictEqual(result, [{ answer: 42 }, { answer: 42 }])); diff --git a/test/function/samples/circular-default-exports/_config.js b/test/function/samples/circular-default-exports/_config.js index 0b7ec703a29..6d418f49b45 100644 --- a/test/function/samples/circular-default-exports/_config.js +++ b/test/function/samples/circular-default-exports/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles circular default exports', warnings: [ { diff --git a/test/function/samples/circular-missed-reexports-2/_config.js b/test/function/samples/circular-missed-reexports-2/_config.js index a1ed4164d5b..7aba287f3aa 100644 --- a/test/function/samples/circular-missed-reexports-2/_config.js +++ b/test/function/samples/circular-missed-reexports-2/_config.js @@ -4,7 +4,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP1 = path.join(__dirname, 'dep1.js'); const ID_DEP2 = path.join(__dirname, 'dep2.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles circular reexports', exports(exports) { assert.strictEqual(exports.exists, 42); diff --git a/test/function/samples/circular-missed-reexports/_config.js b/test/function/samples/circular-missed-reexports/_config.js index 3adbcb023d7..95be334af7f 100644 --- a/test/function/samples/circular-missed-reexports/_config.js +++ b/test/function/samples/circular-missed-reexports/_config.js @@ -5,7 +5,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP1 = path.join(__dirname, 'dep1.js'); const ID_DEP2 = path.join(__dirname, 'dep2.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles circular reexports', exports(exports) { assert.strictEqual(exports.exists, 42); diff --git a/test/function/samples/circular-namespace-reexport-manual-chunks/_config.js b/test/function/samples/circular-namespace-reexport-manual-chunks/_config.js index 897d8c1589a..9c8b304ce5a 100644 --- a/test/function/samples/circular-namespace-reexport-manual-chunks/_config.js +++ b/test/function/samples/circular-namespace-reexport-manual-chunks/_config.js @@ -5,7 +5,7 @@ const ID_TYPES = path.join(__dirname, 'types.js'); const ID_FORMATTERS = path.join(__dirname, 'formatters.js'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles namespace reexports with circular dependencies when using manual chunks', options: { diff --git a/test/function/samples/circular-namespace-reexport-preserve-modules/_config.js b/test/function/samples/circular-namespace-reexport-preserve-modules/_config.js index d8a184df5c6..f6f9ce12192 100644 --- a/test/function/samples/circular-namespace-reexport-preserve-modules/_config.js +++ b/test/function/samples/circular-namespace-reexport-preserve-modules/_config.js @@ -5,7 +5,7 @@ const ID_TYPES = path.join(__dirname, 'types.js'); const ID_FORMATTERS = path.join(__dirname, 'formatters.js'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles namespace reexports with circular dependencies when preserving modules', options: { diff --git a/test/function/samples/circular-preserve-modules/_config.js b/test/function/samples/circular-preserve-modules/_config.js index 26a01a408c6..08e6b353be8 100644 --- a/test/function/samples/circular-preserve-modules/_config.js +++ b/test/function/samples/circular-preserve-modules/_config.js @@ -3,7 +3,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FIRST = path.join(__dirname, 'first.js'); const ID_SECOND = path.join(__dirname, 'second.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles circular dependencies when preserving modules', options: { output: { preserveModules: true } diff --git a/test/function/samples/circular-reexport/_config.js b/test/function/samples/circular-reexport/_config.js index bc1b9fa78b8..bf4f6900872 100644 --- a/test/function/samples/circular-reexport/_config.js +++ b/test/function/samples/circular-reexport/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws proper error for circular reexports', error: { code: 'CIRCULAR_REEXPORT', diff --git a/test/function/samples/class-method-getter-properties/_config.js b/test/function/samples/class-method-getter-properties/_config.js index 002edb748a4..d8e5749680a 100644 --- a/test/function/samples/class-method-getter-properties/_config.js +++ b/test/function/samples/class-method-getter-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects getters added to class methods' }); diff --git a/test/function/samples/class-method-mutation/_config.js b/test/function/samples/class-method-mutation/_config.js index f3442679d9b..d8d9a82bf11 100644 --- a/test/function/samples/class-method-mutation/_config.js +++ b/test/function/samples/class-method-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of class methods' }); diff --git a/test/function/samples/class-method-mutations/_config.js b/test/function/samples/class-method-mutations/_config.js index 31dc605476e..26bdbf66dae 100644 --- a/test/function/samples/class-method-mutations/_config.js +++ b/test/function/samples/class-method-mutations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes variable mutations in class methods if tree-shaking is disabled', options: { treeshake: false diff --git a/test/function/samples/class-method-returns/_config.js b/test/function/samples/class-method-returns/_config.js index 91164274c56..8ed280724b7 100644 --- a/test/function/samples/class-method-returns/_config.js +++ b/test/function/samples/class-method-returns/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes return values of class methods' }); diff --git a/test/function/samples/class-methods-not-renamed/_config.js b/test/function/samples/class-methods-not-renamed/_config.js index 7396b2cb26f..1ea78082822 100644 --- a/test/function/samples/class-methods-not-renamed/_config.js +++ b/test/function/samples/class-methods-not-renamed/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not rename class methods incorrectly', options: { external: ['path'] diff --git a/test/function/samples/class-name-conflict-2/_config.js b/test/function/samples/class-name-conflict-2/_config.js index 6a0db8b219c..95925814430 100644 --- a/test/function/samples/class-name-conflict-2/_config.js +++ b/test/function/samples/class-name-conflict-2/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not shadow variables when preserving class names' }); diff --git a/test/function/samples/class-name-conflict-3/_config.js b/test/function/samples/class-name-conflict-3/_config.js index 6a0db8b219c..95925814430 100644 --- a/test/function/samples/class-name-conflict-3/_config.js +++ b/test/function/samples/class-name-conflict-3/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not shadow variables when preserving class names' }); diff --git a/test/function/samples/class-name-conflict-4/_config.js b/test/function/samples/class-name-conflict-4/_config.js index 6a0db8b219c..95925814430 100644 --- a/test/function/samples/class-name-conflict-4/_config.js +++ b/test/function/samples/class-name-conflict-4/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not shadow variables when preserving class names' }); diff --git a/test/function/samples/class-name-conflict/_config.js b/test/function/samples/class-name-conflict/_config.js index df128cb9ebd..035c45e3734 100644 --- a/test/function/samples/class-name-conflict/_config.js +++ b/test/function/samples/class-name-conflict/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves class names even if the class is renamed' }); diff --git a/test/function/samples/class-prop-returns/_config.js b/test/function/samples/class-prop-returns/_config.js index c9613112c50..20b3952ccc2 100644 --- a/test/function/samples/class-prop-returns/_config.js +++ b/test/function/samples/class-prop-returns/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not remove calls to props without value', exports({ callProp, callStaticProp }) { let hasError = false; diff --git a/test/function/samples/code-splitting-export-default-from-entry/_config.js b/test/function/samples/code-splitting-export-default-from-entry/_config.js index c02dfd5b750..ec6ed9cb990 100644 --- a/test/function/samples/code-splitting-export-default-from-entry/_config.js +++ b/test/function/samples/code-splitting-export-default-from-entry/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly imports the default from an entry point', options: { input: ['main', 'dep'] diff --git a/test/function/samples/compact-multiple-imports/_config.js b/test/function/samples/compact-multiple-imports/_config.js index 764fe06640e..ac16f392074 100644 --- a/test/function/samples/compact-multiple-imports/_config.js +++ b/test/function/samples/compact-multiple-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles empty external imports in compact mode', context: { require(id) { diff --git a/test/function/samples/compact/_config.js b/test/function/samples/compact/_config.js index 40accfc26cd..3575f7e9fe5 100644 --- a/test/function/samples/compact/_config.js +++ b/test/function/samples/compact/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'compact output with compact: true', options: { external: ['external'], diff --git a/test/function/samples/conditional-catch/_config.js b/test/function/samples/conditional-catch/_config.js index fb28431225d..bc61ae8dd89 100644 --- a/test/function/samples/conditional-catch/_config.js +++ b/test/function/samples/conditional-catch/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles conditional catch blocks (#3869)' }); diff --git a/test/function/samples/conditional-definition/_config.js b/test/function/samples/conditional-definition/_config.js index ebc7b949428..66735855054 100644 --- a/test/function/samples/conditional-definition/_config.js +++ b/test/function/samples/conditional-definition/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids infinite loop when testing conditional definitions' }); diff --git a/test/function/samples/conditionals-deoptimization/_config.js b/test/function/samples/conditionals-deoptimization/_config.js index a85c5f01210..29fd6dc5609 100644 --- a/test/function/samples/conditionals-deoptimization/_config.js +++ b/test/function/samples/conditionals-deoptimization/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deoptimization of conditionals', exports(exports) { assert.deepStrictEqual(exports, { diff --git a/test/function/samples/configure-external-module-b/_config.js b/test/function/samples/configure-external-module-b/_config.js index 74786d49a7f..dbf6cde9fcd 100644 --- a/test/function/samples/configure-external-module-b/_config.js +++ b/test/function/samples/configure-external-module-b/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows external module to be configured (b)', options: { external: ['path'] diff --git a/test/function/samples/configure-external-module/_config.js b/test/function/samples/configure-external-module/_config.js index 4f067a3c915..88a7d2b0c22 100644 --- a/test/function/samples/configure-external-module/_config.js +++ b/test/function/samples/configure-external-module/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows external module to be configured', options: { external: ['path'] diff --git a/test/function/samples/configure-relative-external-module/_config.js b/test/function/samples/configure-relative-external-module/_config.js index 453b9f9d3a2..2337110d002 100644 --- a/test/function/samples/configure-relative-external-module/_config.js +++ b/test/function/samples/configure-relative-external-module/_config.js @@ -5,7 +5,7 @@ const mockedValue = { val: 'A value' }; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows a nonexistent relative module to be configured as external', options: { external: [path.join(__dirname, './nonexistent-relative-dependency.js')] diff --git a/test/function/samples/conflicting-reexports/named-import-external/_config.js b/test/function/samples/conflicting-reexports/named-import-external/_config.js index 5c1db2bf010..cf0cfc19e42 100644 --- a/test/function/samples/conflicting-reexports/named-import-external/_config.js +++ b/test/function/samples/conflicting-reexports/named-import-external/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_REEXPORT = path.join(__dirname, 'reexport.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when a conflicting binding is imported via a named import from external namespaces', warnings: [ diff --git a/test/function/samples/conflicting-reexports/named-import/_config.js b/test/function/samples/conflicting-reexports/named-import/_config.js index 5befc057a4a..976a35db78f 100644 --- a/test/function/samples/conflicting-reexports/named-import/_config.js +++ b/test/function/samples/conflicting-reexports/named-import/_config.js @@ -5,7 +5,7 @@ const ID_REEXPORT = path.join(__dirname, 'reexport.js'); const ID_FIRST = path.join(__dirname, 'first.js'); const ID_SECOND = path.join(__dirname, 'second.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when a conflicting binding is imported via a named import', error: { binding: 'foo', diff --git a/test/function/samples/conflicting-reexports/namespace-import/_config.js b/test/function/samples/conflicting-reexports/namespace-import/_config.js index a5e49c2030c..8823d067a77 100644 --- a/test/function/samples/conflicting-reexports/namespace-import/_config.js +++ b/test/function/samples/conflicting-reexports/namespace-import/_config.js @@ -4,7 +4,7 @@ const ID_FIRST = path.join(__dirname, 'first.js'); const ID_SECOND = path.join(__dirname, 'second.js'); const ID_REEXPORT = path.join(__dirname, 'reexport.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when a conflicting binding is imported via a namespace import', warnings: [ { diff --git a/test/function/samples/conflicting-reexports/same-binding/_config.js b/test/function/samples/conflicting-reexports/same-binding/_config.js index b058307353a..f11f6f192ad 100644 --- a/test/function/samples/conflicting-reexports/same-binding/_config.js +++ b/test/function/samples/conflicting-reexports/same-binding/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not fail when the same binding is reexported from different files' }); diff --git a/test/function/samples/confused-default-identifier/_config.js b/test/function/samples/confused-default-identifier/_config.js index 78574dcdcdc..2da3393b6c4 100644 --- a/test/function/samples/confused-default-identifier/_config.js +++ b/test/function/samples/confused-default-identifier/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Rollup should not get confused and allow "default" as an identifier name', warnings() {} // suppress }); diff --git a/test/function/samples/consistent-renaming-b/_config.js b/test/function/samples/consistent-renaming-b/_config.js index 7833fc9f589..5dbd2de1ae7 100644 --- a/test/function/samples/consistent-renaming-b/_config.js +++ b/test/function/samples/consistent-renaming-b/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'consistent renaming test b' }); diff --git a/test/function/samples/consistent-renaming-c/_config.js b/test/function/samples/consistent-renaming-c/_config.js index 1af73d39c1c..8d572fa3132 100644 --- a/test/function/samples/consistent-renaming-c/_config.js +++ b/test/function/samples/consistent-renaming-c/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'consistent renaming test c' }); diff --git a/test/function/samples/consistent-renaming-d/_config.js b/test/function/samples/consistent-renaming-d/_config.js index 66feb6ab21b..af41fcd4273 100644 --- a/test/function/samples/consistent-renaming-d/_config.js +++ b/test/function/samples/consistent-renaming-d/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'consistent renaming test d' }); diff --git a/test/function/samples/consistent-renaming-e/_config.js b/test/function/samples/consistent-renaming-e/_config.js index 737226c600c..e939f587557 100644 --- a/test/function/samples/consistent-renaming-e/_config.js +++ b/test/function/samples/consistent-renaming-e/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'consistent renaming test e' }); diff --git a/test/function/samples/consistent-renaming-f/_config.js b/test/function/samples/consistent-renaming-f/_config.js index 32e79fdcfa5..e440022425e 100644 --- a/test/function/samples/consistent-renaming-f/_config.js +++ b/test/function/samples/consistent-renaming-f/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'consistent renaming test f' }); diff --git a/test/function/samples/consistent-renaming/_config.js b/test/function/samples/consistent-renaming/_config.js index 46b09ae62f4..5a13ac8bd51 100644 --- a/test/function/samples/consistent-renaming/_config.js +++ b/test/function/samples/consistent-renaming/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'consistent renaming test' }); diff --git a/test/function/samples/consistently-renames-destructured-parameters/_config.js b/test/function/samples/consistently-renames-destructured-parameters/_config.js index 2ca0e10dab4..04b2a7b203b 100644 --- a/test/function/samples/consistently-renames-destructured-parameters/_config.js +++ b/test/function/samples/consistently-renames-destructured-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'destructured parameters are properly renamed (#2418)' }); diff --git a/test/function/samples/context-resolve-skipself/_config.js b/test/function/samples/context-resolve-skipself/_config.js index eea2eb1d4a0..75662842fcf 100644 --- a/test/function/samples/context-resolve-skipself/_config.js +++ b/test/function/samples/context-resolve-skipself/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows a plugin to skip its own resolveId hook when using this.resolve', options: { plugins: [ diff --git a/test/function/samples/context-resolve/_config.js b/test/function/samples/context-resolve/_config.js index 56bb9a3bce7..680305939c9 100644 --- a/test/function/samples/context-resolve/_config.js +++ b/test/function/samples/context-resolve/_config.js @@ -120,7 +120,7 @@ const tests = [ } ]; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'returns the correct results for the context resolve helper', options: { external: [ diff --git a/test/function/samples/correct-var-before-declaration-deopt/_config.js b/test/function/samples/correct-var-before-declaration-deopt/_config.js index f3df8b8d236..3e202ed1193 100644 --- a/test/function/samples/correct-var-before-declaration-deopt/_config.js +++ b/test/function/samples/correct-var-before-declaration-deopt/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds necessary deoptimizations when using var' }); diff --git a/test/function/samples/create-undefined-export-property-compact/_config.js b/test/function/samples/create-undefined-export-property-compact/_config.js index 8b8ad779c5d..fa3cc4a85a8 100644 --- a/test/function/samples/create-undefined-export-property-compact/_config.js +++ b/test/function/samples/create-undefined-export-property-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates an export as an exports property even if is has no initializer', options: { output: { compact: true } }, exports(exports) { diff --git a/test/function/samples/create-undefined-export-property/_config.js b/test/function/samples/create-undefined-export-property/_config.js index 9e7db9f0cb4..a08ad11a22e 100644 --- a/test/function/samples/create-undefined-export-property/_config.js +++ b/test/function/samples/create-undefined-export-property/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates an export as an exports property even if is has no initializer', exports(exports) { assert.strictEqual(exports.foo, undefined); diff --git a/test/function/samples/cross-chunk-live-binding-compact/_config.js b/test/function/samples/cross-chunk-live-binding-compact/_config.js index 859277ed0cd..b266c4e575f 100644 --- a/test/function/samples/cross-chunk-live-binding-compact/_config.js +++ b/test/function/samples/cross-chunk-live-binding-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles cross-chunk live-bindings in compact mode', options: { input: ['main.js', 'named.js', 'star.js'], diff --git a/test/function/samples/cross-chunk-live-binding/_config.js b/test/function/samples/cross-chunk-live-binding/_config.js index 78b7c8799f4..ec3f2bf877c 100644 --- a/test/function/samples/cross-chunk-live-binding/_config.js +++ b/test/function/samples/cross-chunk-live-binding/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles cross-chunk live-bindings', options: { input: ['main.js', 'named.js', 'star.js'] diff --git a/test/function/samples/custom-external-module-options/_config.js b/test/function/samples/custom-external-module-options/_config.js index 323f05aee91..0447a5bd051 100644 --- a/test/function/samples/custom-external-module-options/_config.js +++ b/test/function/samples/custom-external-module-options/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports adding custom options to external modules', options: { plugins: [ diff --git a/test/function/samples/custom-external-resolver-async/_config.js b/test/function/samples/custom-external-resolver-async/_config.js index beff4dab491..78dc805d4df 100644 --- a/test/function/samples/custom-external-resolver-async/_config.js +++ b/test/function/samples/custom-external-resolver-async/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses a custom external path resolver (asynchronous)', options: { plugins: [ diff --git a/test/function/samples/custom-external-resolver-sync/_config.js b/test/function/samples/custom-external-resolver-sync/_config.js index fdf219d8700..f90dba7f7f5 100644 --- a/test/function/samples/custom-external-resolver-sync/_config.js +++ b/test/function/samples/custom-external-resolver-sync/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses a custom external path resolver (synchronous)', options: { plugins: [ diff --git a/test/function/samples/custom-iterator-2/_config.js b/test/function/samples/custom-iterator-2/_config.js index 8fa2e78b918..5c221ae64b5 100644 --- a/test/function/samples/custom-iterator-2/_config.js +++ b/test/function/samples/custom-iterator-2/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles manually defined iterators' }); diff --git a/test/function/samples/custom-iterator/_config.js b/test/function/samples/custom-iterator/_config.js index 8fa2e78b918..5c221ae64b5 100644 --- a/test/function/samples/custom-iterator/_config.js +++ b/test/function/samples/custom-iterator/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles manually defined iterators' }); diff --git a/test/function/samples/custom-loaders/_config.js b/test/function/samples/custom-loaders/_config.js index 8cd0b9ff268..d35f66376ce 100644 --- a/test/function/samples/custom-loaders/_config.js +++ b/test/function/samples/custom-loaders/_config.js @@ -1,6 +1,6 @@ const { readFileSync } = require('node:fs'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses custom loaders, falling back to default', options: { plugins: [ diff --git a/test/function/samples/custom-module-options/_config.js b/test/function/samples/custom-module-options/_config.js index b7977e23bc0..9c54b601920 100644 --- a/test/function/samples/custom-module-options/_config.js +++ b/test/function/samples/custom-module-options/_config.js @@ -30,7 +30,7 @@ function getTestPlugin(index) { }; } -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports adding custom options to modules', options: { plugins: [ diff --git a/test/function/samples/custom-path-resolver-async/_config.js b/test/function/samples/custom-path-resolver-async/_config.js index 3cb9640da09..85a34e95e8b 100644 --- a/test/function/samples/custom-path-resolver-async/_config.js +++ b/test/function/samples/custom-path-resolver-async/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses a custom path resolver (asynchronous)', options: { plugins: [ diff --git a/test/function/samples/custom-path-resolver-on-entry/_config.js b/test/function/samples/custom-path-resolver-on-entry/_config.js index 2ad57fb929f..a525fbffc30 100644 --- a/test/function/samples/custom-path-resolver-on-entry/_config.js +++ b/test/function/samples/custom-path-resolver-on-entry/_config.js @@ -6,7 +6,7 @@ const cachedModules = { '@main.js': 'import foo from "./foo"; export default foo();' }; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'applies custom resolver to entry point', options: { plugins: [ diff --git a/test/function/samples/custom-path-resolver-plural-b/_config.js b/test/function/samples/custom-path-resolver-plural-b/_config.js index 575de1ccef4..f3313f15046 100644 --- a/test/function/samples/custom-path-resolver-plural-b/_config.js +++ b/test/function/samples/custom-path-resolver-plural-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'resolver error is not caught', options: { plugins: [ diff --git a/test/function/samples/custom-path-resolver-plural/_config.js b/test/function/samples/custom-path-resolver-plural/_config.js index 1b722042d2c..44b535d3e31 100644 --- a/test/function/samples/custom-path-resolver-plural/_config.js +++ b/test/function/samples/custom-path-resolver-plural/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses custom path resolvers (plural)', options: { plugins: [ diff --git a/test/function/samples/custom-path-resolver-sync/_config.js b/test/function/samples/custom-path-resolver-sync/_config.js index 8eac22d2dd1..4961137da1b 100644 --- a/test/function/samples/custom-path-resolver-sync/_config.js +++ b/test/function/samples/custom-path-resolver-sync/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses a custom path resolver (synchronous)', options: { plugins: [ diff --git a/test/function/samples/custom-resolve-options/_config.js b/test/function/samples/custom-resolve-options/_config.js index 621fb526378..7828849764e 100644 --- a/test/function/samples/custom-resolve-options/_config.js +++ b/test/function/samples/custom-resolve-options/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports custom resolve options', options: { plugins: [ diff --git a/test/function/samples/cycles-default-anonymous-function-hoisted/_config.js b/test/function/samples/cycles-default-anonymous-function-hoisted/_config.js index 19dfcc4c768..60e599ad677 100644 --- a/test/function/samples/cycles-default-anonymous-function-hoisted/_config.js +++ b/test/function/samples/cycles-default-anonymous-function-hoisted/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_F = path.join(__dirname, 'f.js'); const ID_G = path.join(__dirname, 'g.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Anonymous function declarations are hoisted', warnings: [ { diff --git a/test/function/samples/cycles-defaults/_config.js b/test/function/samples/cycles-defaults/_config.js index 2b0b920fb75..5c472c4ef87 100644 --- a/test/function/samples/cycles-defaults/_config.js +++ b/test/function/samples/cycles-defaults/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_A = path.join(__dirname, 'a.js'); const ID_B = path.join(__dirname, 'b.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'cycles work with default exports', warnings: [ { diff --git a/test/function/samples/cycles-export-star/_config.js b/test/function/samples/cycles-export-star/_config.js index eeff001626e..0396bfbca73 100644 --- a/test/function/samples/cycles-export-star/_config.js +++ b/test/function/samples/cycles-export-star/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_A = path.join(__dirname, 'a.js'); const ID_B = path.join(__dirname, 'b.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not stack overflow on `export * from X` cycles', code(code) { assert.equal( diff --git a/test/function/samples/cycles-immediate/_config.js b/test/function/samples/cycles-immediate/_config.js index 7e6c693edfa..2464a9d2bfc 100644 --- a/test/function/samples/cycles-immediate/_config.js +++ b/test/function/samples/cycles-immediate/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_EVENS = path.join(__dirname, 'evens.js'); const ID_ODDS = path.join(__dirname, 'odds.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles cycles where imports are immediately used', warnings: [ { diff --git a/test/function/samples/cycles-pathological-2/_config.js b/test/function/samples/cycles-pathological-2/_config.js index 987b4ce3c97..3856aa83021 100644 --- a/test/function/samples/cycles-pathological-2/_config.js +++ b/test/function/samples/cycles-pathological-2/_config.js @@ -4,7 +4,7 @@ const ID_B = path.join(__dirname, 'b.js'); const ID_C = path.join(__dirname, 'c.js'); const ID_D = path.join(__dirname, 'd.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'resolves even more pathological cyclical dependencies gracefully', warnings: [ { diff --git a/test/function/samples/cycles-stack-overflow/_config.js b/test/function/samples/cycles-stack-overflow/_config.js index 93a176d0e5a..24dc31d12ca 100644 --- a/test/function/samples/cycles-stack-overflow/_config.js +++ b/test/function/samples/cycles-stack-overflow/_config.js @@ -3,7 +3,7 @@ const ID_B = path.join(__dirname, 'b.js'); const ID_C = path.join(__dirname, 'c.js'); const ID_D = path.join(__dirname, 'd.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not stack overflow on crazy cyclical dependencies', warnings: [ { diff --git a/test/function/samples/cyclic-assignments/_config.js b/test/function/samples/cyclic-assignments/_config.js index e14a6eae412..26be52cb8e7 100644 --- a/test/function/samples/cyclic-assignments/_config.js +++ b/test/function/samples/cyclic-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not fail for cyclic assignments' }); diff --git a/test/function/samples/deconflict-deconflicted/_config.js b/test/function/samples/deconflict-deconflicted/_config.js index 04317bb5cef..2e2ed2b323d 100644 --- a/test/function/samples/deconflict-deconflicted/_config.js +++ b/test/function/samples/deconflict-deconflicted/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'also deconflict variables which already appear to be deconflicted (#2683)' }); diff --git a/test/function/samples/deconflict-default-exported-named-function/_config.js b/test/function/samples/deconflict-default-exported-named-function/_config.js index 2f306c8b4ce..30ff2e3b248 100644 --- a/test/function/samples/deconflict-default-exported-named-function/_config.js +++ b/test/function/samples/deconflict-default-exported-named-function/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflict default exported named function and class expressions' }); diff --git a/test/function/samples/deconflict-ids/_config.js b/test/function/samples/deconflict-ids/_config.js index d8af863a0bc..7e5ede0433f 100644 --- a/test/function/samples/deconflict-ids/_config.js +++ b/test/function/samples/deconflict-ids/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts reassigned ids' }); diff --git a/test/function/samples/deconflict-parameter-defaults/_config.js b/test/function/samples/deconflict-parameter-defaults/_config.js index d4528afc0f6..b81ed6af1b6 100644 --- a/test/function/samples/deconflict-parameter-defaults/_config.js +++ b/test/function/samples/deconflict-parameter-defaults/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'consistently deconflict variable names for parameter defaults' }); diff --git a/test/function/samples/deconflict-synthetic-named-export-cross-chunk/_config.js b/test/function/samples/deconflict-synthetic-named-export-cross-chunk/_config.js index 9668c557a01..cd8c4b600a5 100644 --- a/test/function/samples/deconflict-synthetic-named-export-cross-chunk/_config.js +++ b/test/function/samples/deconflict-synthetic-named-export-cross-chunk/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts synthetic named exports across chunks', options: { input: ['main', 'foo'], diff --git a/test/function/samples/deconflict-synthetic-named-export/_config.js b/test/function/samples/deconflict-synthetic-named-export/_config.js index 5b03941aca1..d101643e5c0 100644 --- a/test/function/samples/deconflict-synthetic-named-export/_config.js +++ b/test/function/samples/deconflict-synthetic-named-export/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts synthetic named exports', options: { plugins: [ diff --git a/test/function/samples/deconflicts-classes/_config.js b/test/function/samples/deconflicts-classes/_config.js index 9113acc54c6..af419d4f56c 100644 --- a/test/function/samples/deconflicts-classes/_config.js +++ b/test/function/samples/deconflicts-classes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts top-level classes' }); diff --git a/test/function/samples/deconflicts-exports-2/_config.js b/test/function/samples/deconflicts-exports-2/_config.js index 9964c84e750..5f401c8582f 100644 --- a/test/function/samples/deconflicts-exports-2/_config.js +++ b/test/function/samples/deconflicts-exports-2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renames nested variables named "exports" if necessary', exports(exports) { assert.equal(exports.x, 2); diff --git a/test/function/samples/deconflicts-exports-3/_config.js b/test/function/samples/deconflicts-exports-3/_config.js index 7ba3fcaf77d..51492dda6d0 100644 --- a/test/function/samples/deconflicts-exports-3/_config.js +++ b/test/function/samples/deconflicts-exports-3/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renames variables named "module" if necessary', exports(exports) { assert.equal(exports, 1); diff --git a/test/function/samples/deconflicts-exports/_config.js b/test/function/samples/deconflicts-exports/_config.js index 254881cfe9f..d625077df69 100644 --- a/test/function/samples/deconflicts-exports/_config.js +++ b/test/function/samples/deconflicts-exports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renames variables named "exports" if necessary', exports(exports) { assert.deepEqual(Object.keys(exports), ['a', 'b']); diff --git a/test/function/samples/deconflicts-external-imports/_config.js b/test/function/samples/deconflicts-external-imports/_config.js index 0ac013f064f..458adc6a05c 100644 --- a/test/function/samples/deconflicts-external-imports/_config.js +++ b/test/function/samples/deconflicts-external-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts external imports', context: { require(id) { diff --git a/test/function/samples/deconflicts-generated-default-names/_config.js b/test/function/samples/deconflicts-generated-default-names/_config.js index 37a0c8f90d4..ee6eca2098c 100644 --- a/test/function/samples/deconflicts-generated-default-names/_config.js +++ b/test/function/samples/deconflicts-generated-default-names/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts generated default export names' }); diff --git a/test/function/samples/deconflicts-globals/_config.js b/test/function/samples/deconflicts-globals/_config.js index 9c034f0899e..d6a0ce092f1 100644 --- a/test/function/samples/deconflicts-globals/_config.js +++ b/test/function/samples/deconflicts-globals/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts names that are assumed to be global' }); diff --git a/test/function/samples/deconflicts-interop/_config.js b/test/function/samples/deconflicts-interop/_config.js index 4215f9a92e0..bd5f4665e8e 100644 --- a/test/function/samples/deconflicts-interop/_config.js +++ b/test/function/samples/deconflicts-interop/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts the interop function', options: { external(id) { diff --git a/test/function/samples/deconstructed-exported-vars/_config.js b/test/function/samples/deconstructed-exported-vars/_config.js index 5b1e499ccad..4570f1fb17e 100644 --- a/test/function/samples/deconstructed-exported-vars/_config.js +++ b/test/function/samples/deconstructed-exported-vars/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows destructuring in exported variable declarations, synthetic or otherwise', exports(exports) { assert.equal(exports.a, 1); diff --git a/test/function/samples/default-export-as-is-bound/_config.js b/test/function/samples/default-export-as-is-bound/_config.js index 49cff8457bf..9608b0e29ad 100644 --- a/test/function/samples/default-export-as-is-bound/_config.js +++ b/test/function/samples/default-export-as-is-bound/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does bind export as default (#1078)' }); diff --git a/test/function/samples/default-export-before-declaration/_config.js b/test/function/samples/default-export-before-declaration/_config.js index 5d17ec53a46..e42ecbbad56 100644 --- a/test/function/samples/default-export-before-declaration/_config.js +++ b/test/function/samples/default-export-before-declaration/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default exports before a variable is declared', exports(exports) { assert.strictEqual(exports, undefined); diff --git a/test/function/samples/default-export-is-not-bound-b/_config.js b/test/function/samples/default-export-is-not-bound-b/_config.js index 78a8f7938c9..67004d32d3e 100644 --- a/test/function/samples/default-export-is-not-bound-b/_config.js +++ b/test/function/samples/default-export-is-not-bound-b/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not move default export statement above earlier statements', exports(exports) { assert.equal(exports.bar, 42); diff --git a/test/function/samples/default-export-is-not-bound/_config.js b/test/function/samples/default-export-is-not-bound/_config.js index ad79156bfdd..b62fbbd867e 100644 --- a/test/function/samples/default-export-is-not-bound/_config.js +++ b/test/function/samples/default-export-is-not-bound/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not bind default exports' }); diff --git a/test/function/samples/default-export-with-null-prototype/_config.js b/test/function/samples/default-export-with-null-prototype/_config.js index af8f2bdd05c..2121ec23792 100644 --- a/test/function/samples/default-export-with-null-prototype/_config.js +++ b/test/function/samples/default-export-with-null-prototype/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'default exports of objects with null prototypes are supported', options: { external: ['foo'], diff --git a/test/function/samples/default-exported-global/_config.js b/test/function/samples/default-exported-global/_config.js index 40cf6b1f293..4c5557f41a0 100644 --- a/test/function/samples/default-exported-global/_config.js +++ b/test/function/samples/default-exported-global/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Tracks updates of default exported globals', exports(exports) { assert.deepStrictEqual(exports, { original: 1, updated: 2 }); diff --git a/test/function/samples/default-exports-in-parens-class-with-id/_config.js b/test/function/samples/default-exports-in-parens-class-with-id/_config.js index 3e5d4bab581..a7e97bb5338 100644 --- a/test/function/samples/default-exports-in-parens-class-with-id/_config.js +++ b/test/function/samples/default-exports-in-parens-class-with-id/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default class with id exports wrapped in parens' }); diff --git a/test/function/samples/default-exports-in-parens-class-without-id/_config.js b/test/function/samples/default-exports-in-parens-class-without-id/_config.js index 1303130e643..a632ab6a4f7 100644 --- a/test/function/samples/default-exports-in-parens-class-without-id/_config.js +++ b/test/function/samples/default-exports-in-parens-class-without-id/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default class without id exports wrapped in parens' }); diff --git a/test/function/samples/default-exports-in-parens-function-with-id/_config.js b/test/function/samples/default-exports-in-parens-function-with-id/_config.js index 7cdbcc8b898..b76523bd897 100644 --- a/test/function/samples/default-exports-in-parens-function-with-id/_config.js +++ b/test/function/samples/default-exports-in-parens-function-with-id/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default function with id exports wrapped in parens' }); diff --git a/test/function/samples/default-exports-in-parens-function-without-id/_config.js b/test/function/samples/default-exports-in-parens-function-without-id/_config.js index c6cd07e13f2..9c0d16b8881 100644 --- a/test/function/samples/default-exports-in-parens-function-without-id/_config.js +++ b/test/function/samples/default-exports-in-parens-function-without-id/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default function without id exports wrapped in parens' }); diff --git a/test/function/samples/default-function-export-conflict/_config.js b/test/function/samples/default-function-export-conflict/_config.js index f87d57828f6..7934a8be019 100644 --- a/test/function/samples/default-function-export-conflict/_config.js +++ b/test/function/samples/default-function-export-conflict/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'default export of anonymous function' }); diff --git a/test/function/samples/default-not-reexported/_config.js b/test/function/samples/default-not-reexported/_config.js index 1de6b5c08e4..adbfc65eaa9 100644 --- a/test/function/samples/default-not-reexported/_config.js +++ b/test/function/samples/default-not-reexported/_config.js @@ -3,7 +3,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); const ID_BAR = path.join(__dirname, 'bar.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'default export is not re-exported with export *', error: { binding: 'default', diff --git a/test/function/samples/default-on-warn/_config.js b/test/function/samples/default-on-warn/_config.js index 461325e9b1c..824be0cafe8 100644 --- a/test/function/samples/default-on-warn/_config.js +++ b/test/function/samples/default-on-warn/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); let oldConsoleWarn; const warnings = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides a default handler for warnings to onwarn that handles strings and objects', options: { onwarn(warning, defaultHandler) { diff --git a/test/function/samples/delete/_config.js b/test/function/samples/delete/_config.js index 5130bf60af9..6a64667ef0b 100644 --- a/test/function/samples/delete/_config.js +++ b/test/function/samples/delete/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: '`delete` operator at the top level is preserved' }); diff --git a/test/function/samples/deoptimize-assumes-getters/_config.js b/test/function/samples/deoptimize-assumes-getters/_config.js index edf98072965..78bb505bb7e 100644 --- a/test/function/samples/deoptimize-assumes-getters/_config.js +++ b/test/function/samples/deoptimize-assumes-getters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'assume full deoptimization may inject side-effectful getters' }); diff --git a/test/function/samples/deoptimize-cached-prop/_config.js b/test/function/samples/deoptimize-cached-prop/_config.js index 504bb555bcf..0044a4af351 100644 --- a/test/function/samples/deoptimize-cached-prop/_config.js +++ b/test/function/samples/deoptimize-cached-prop/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes cached properties and return values if necessary (#3264)' }); diff --git a/test/function/samples/deoptimize-call-expression-reassignments/_config.js b/test/function/samples/deoptimize-call-expression-reassignments/_config.js index 386e160e45d..a464b295af1 100644 --- a/test/function/samples/deoptimize-call-expression-reassignments/_config.js +++ b/test/function/samples/deoptimize-call-expression-reassignments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes call expressions of conditional expressions if their return value is reassigned' }); diff --git a/test/function/samples/deoptimize-call-expressions/_config.js b/test/function/samples/deoptimize-call-expressions/_config.js index 65e3849e769..50faf79d57b 100644 --- a/test/function/samples/deoptimize-call-expressions/_config.js +++ b/test/function/samples/deoptimize-call-expressions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes call expressions conditional expressions if their return value is reassigned' }); diff --git a/test/function/samples/deoptimize-class/_config.js b/test/function/samples/deoptimize-class/_config.js index 621bf9abb5a..e92d39ee268 100644 --- a/test/function/samples/deoptimize-class/_config.js +++ b/test/function/samples/deoptimize-class/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deoptimization of static class properties' }); diff --git a/test/function/samples/deoptimize-computed-class-keys/_config.js b/test/function/samples/deoptimize-computed-class-keys/_config.js index 0495d12cce8..328acfdc0db 100644 --- a/test/function/samples/deoptimize-computed-class-keys/_config.js +++ b/test/function/samples/deoptimize-computed-class-keys/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes computed class property keys' }); diff --git a/test/function/samples/deoptimize-computed-keys/_config.js b/test/function/samples/deoptimize-computed-keys/_config.js index 36832777886..f9dcf153b0d 100644 --- a/test/function/samples/deoptimize-computed-keys/_config.js +++ b/test/function/samples/deoptimize-computed-keys/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes computed object property keys' }); diff --git a/test/function/samples/deoptimize-conditional-expression-reassignments/_config.js b/test/function/samples/deoptimize-conditional-expression-reassignments/_config.js index 90b64a6b873..866f6cf2787 100644 --- a/test/function/samples/deoptimize-conditional-expression-reassignments/_config.js +++ b/test/function/samples/deoptimize-conditional-expression-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks reassignments of deoptimized conditional expressions' }); diff --git a/test/function/samples/deoptimize-conditional-expressions/_config.js b/test/function/samples/deoptimize-conditional-expressions/_config.js index b2ffcc72b5b..a09e621dc55 100644 --- a/test/function/samples/deoptimize-conditional-expressions/_config.js +++ b/test/function/samples/deoptimize-conditional-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps conditional expressions if their test value is reassigned' }); diff --git a/test/function/samples/deoptimize-logical-expression-reassignments/_config.js b/test/function/samples/deoptimize-logical-expression-reassignments/_config.js index 92f79b9e426..83b50025e9a 100644 --- a/test/function/samples/deoptimize-logical-expression-reassignments/_config.js +++ b/test/function/samples/deoptimize-logical-expression-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks reassignments of deoptimized logical expressions' }); diff --git a/test/function/samples/deoptimize-logical-expressions/_config.js b/test/function/samples/deoptimize-logical-expressions/_config.js index 49d4f47dac7..a73192c1f97 100644 --- a/test/function/samples/deoptimize-logical-expressions/_config.js +++ b/test/function/samples/deoptimize-logical-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps logical expressions if the first part is reassigned' }); diff --git a/test/function/samples/deoptimize-loop-element/_config.js b/test/function/samples/deoptimize-loop-element/_config.js index 7838770b855..dcfdd76b0b2 100644 --- a/test/function/samples/deoptimize-loop-element/_config.js +++ b/test/function/samples/deoptimize-loop-element/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes the loop element when it is reassigned' }); diff --git a/test/function/samples/deoptimize-member-expressions/_config.js b/test/function/samples/deoptimize-member-expressions/_config.js index 7f32ab45978..c79a8b71f2a 100644 --- a/test/function/samples/deoptimize-member-expressions/_config.js +++ b/test/function/samples/deoptimize-member-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps accesses to computed properties if their key is reassigned' }); diff --git a/test/function/samples/deoptimize-missing-namespace-members/_config.js b/test/function/samples/deoptimize-missing-namespace-members/_config.js index 711b3b91b41..e68ea27ed9b 100644 --- a/test/function/samples/deoptimize-missing-namespace-members/_config.js +++ b/test/function/samples/deoptimize-missing-namespace-members/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deoptimization of non-existing namespace members', exports(exports) { assert.strictEqual(exports.bar, undefined); diff --git a/test/function/samples/deoptimize-object-expressions-2/_config.js b/test/function/samples/deoptimize-object-expressions-2/_config.js index f6e15271dc8..0059042c404 100644 --- a/test/function/samples/deoptimize-object-expressions-2/_config.js +++ b/test/function/samples/deoptimize-object-expressions-2/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track deoptimizations of computed properties of empty objects' }); diff --git a/test/function/samples/deoptimize-object-expressions/_config.js b/test/function/samples/deoptimize-object-expressions/_config.js index dd7308bfdda..601c94248fd 100644 --- a/test/function/samples/deoptimize-object-expressions/_config.js +++ b/test/function/samples/deoptimize-object-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track deoptimizations of computed properties' }); diff --git a/test/function/samples/deoptimize-object/_config.js b/test/function/samples/deoptimize-object/_config.js index a47e7213b73..8cb5aad18bd 100644 --- a/test/function/samples/deoptimize-object/_config.js +++ b/test/function/samples/deoptimize-object/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deoptimization of object properties' }); diff --git a/test/function/samples/deoptimize-request-treeshaking-pass/_config.js b/test/function/samples/deoptimize-request-treeshaking-pass/_config.js index 930c9990e59..c2edc9f8248 100644 --- a/test/function/samples/deoptimize-request-treeshaking-pass/_config.js +++ b/test/function/samples/deoptimize-request-treeshaking-pass/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const result = { value: 0 }; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure to request additional passes when a variable is deoptimized', context: { result }, exports() { diff --git a/test/function/samples/deoptimize-this-parameters/_config.js b/test/function/samples/deoptimize-this-parameters/_config.js index 4c6772b5b99..942450e90a6 100644 --- a/test/function/samples/deoptimize-this-parameters/_config.js +++ b/test/function/samples/deoptimize-this-parameters/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles deoptimization of this parameters' }); diff --git a/test/function/samples/deprecated/compact/_config.js b/test/function/samples/deprecated/compact/_config.js index dffd7d85082..852426cfd24 100644 --- a/test/function/samples/deprecated/compact/_config.js +++ b/test/function/samples/deprecated/compact/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'compact output with compact: true', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/dynamic-import-duplicates/_config.js b/test/function/samples/deprecated/dynamic-import-duplicates/_config.js index 03325426d02..fa2edf25f23 100644 --- a/test/function/samples/deprecated/dynamic-import-duplicates/_config.js +++ b/test/function/samples/deprecated/dynamic-import-duplicates/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Dynamic import inlining', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/dynamic-import-inlining/_config.js b/test/function/samples/deprecated/dynamic-import-inlining/_config.js index 03325426d02..fa2edf25f23 100644 --- a/test/function/samples/deprecated/dynamic-import-inlining/_config.js +++ b/test/function/samples/deprecated/dynamic-import-inlining/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Dynamic import inlining', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/dynamic-import-name-warn/_config.js b/test/function/samples/deprecated/dynamic-import-name-warn/_config.js index 37db7853e6e..60e45b2b356 100644 --- a/test/function/samples/deprecated/dynamic-import-name-warn/_config.js +++ b/test/function/samples/deprecated/dynamic-import-name-warn/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when specifying a custom importer function for formats other than "es"', context: { require(path) { diff --git a/test/function/samples/deprecated/dynamic-import-name/_config.js b/test/function/samples/deprecated/dynamic-import-name/_config.js index 18eaec4439d..6a93ad2082a 100644 --- a/test/function/samples/deprecated/dynamic-import-name/_config.js +++ b/test/function/samples/deprecated/dynamic-import-name/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let imported = false; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows specifying a custom importer function', context: { myImporter(path) { diff --git a/test/function/samples/deprecated/inline-dynamic-imports-bundle/_config.js b/test/function/samples/deprecated/inline-dynamic-imports-bundle/_config.js index b6207dd5329..3a1c929fcda 100644 --- a/test/function/samples/deprecated/inline-dynamic-imports-bundle/_config.js +++ b/test/function/samples/deprecated/inline-dynamic-imports-bundle/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ignores non-bundled modules when inlining dynamic imports', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/inline-imports-with-manual/_config.js b/test/function/samples/deprecated/inline-imports-with-manual/_config.js index 7f2eb492ddb..b72dc7f5b46 100644 --- a/test/function/samples/deprecated/inline-imports-with-manual/_config.js +++ b/test/function/samples/deprecated/inline-imports-with-manual/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Manual chunks are not supported when inlining dynamic imports', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/inline-imports-with-multiple-array/_config.js b/test/function/samples/deprecated/inline-imports-with-multiple-array/_config.js index c5349d23cbe..30eeb3b6ee6 100644 --- a/test/function/samples/deprecated/inline-imports-with-multiple-array/_config.js +++ b/test/function/samples/deprecated/inline-imports-with-multiple-array/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Having multiple inputs in an array is not supported when inlining dynamic imports', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/inline-imports-with-multiple-object/_config.js b/test/function/samples/deprecated/inline-imports-with-multiple-object/_config.js index 6252b9dd950..65df9df7e90 100644 --- a/test/function/samples/deprecated/inline-imports-with-multiple-object/_config.js +++ b/test/function/samples/deprecated/inline-imports-with-multiple-object/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Having multiple inputs in an object is not supported when inlining dynamic imports', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/manual-chunks-conflict/_config.js b/test/function/samples/deprecated/manual-chunks-conflict/_config.js index 5279bca0ab4..789f7339c7b 100644 --- a/test/function/samples/deprecated/manual-chunks-conflict/_config.js +++ b/test/function/samples/deprecated/manual-chunks-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Throws for conflicts between manual chunks', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/manual-chunks-info/_config.js b/test/function/samples/deprecated/manual-chunks-info/_config.js index 705d20797b7..6a7d5705087 100644 --- a/test/function/samples/deprecated/manual-chunks-info/_config.js +++ b/test/function/samples/deprecated/manual-chunks-info/_config.js @@ -6,7 +6,7 @@ function getId(name) { return path.join(__dirname, `${name}.js`); } -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides additional chunk information to a manualChunks function', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/manual-chunks-preserve-modules/_config.js b/test/function/samples/deprecated/manual-chunks-preserve-modules/_config.js index 7ff7e7692f2..1afbdff0e56 100644 --- a/test/function/samples/deprecated/manual-chunks-preserve-modules/_config.js +++ b/test/function/samples/deprecated/manual-chunks-preserve-modules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Assigning manual chunks fails when preserving modules', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/max-parallel-file-reads/infinity/_config.js b/test/function/samples/deprecated/max-parallel-file-reads/infinity/_config.js index 021a3ff8432..8f9700cf23e 100644 --- a/test/function/samples/deprecated/max-parallel-file-reads/infinity/_config.js +++ b/test/function/samples/deprecated/max-parallel-file-reads/infinity/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileReads set to infinity', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/max-parallel-file-reads/set/_config.js b/test/function/samples/deprecated/max-parallel-file-reads/set/_config.js index f2d77f28864..4f9d4e77b8e 100644 --- a/test/function/samples/deprecated/max-parallel-file-reads/set/_config.js +++ b/test/function/samples/deprecated/max-parallel-file-reads/set/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileReads set to 3', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/max-parallel-file-reads/with-plugin/_config.js b/test/function/samples/deprecated/max-parallel-file-reads/with-plugin/_config.js index 5b8f91f04ed..b16cd3bf59e 100644 --- a/test/function/samples/deprecated/max-parallel-file-reads/with-plugin/_config.js +++ b/test/function/samples/deprecated/max-parallel-file-reads/with-plugin/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileReads with plugin', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/name-conflict-symbol/_config.js b/test/function/samples/deprecated/name-conflict-symbol/_config.js index 7ed97b5031b..e13f395ce3a 100644 --- a/test/function/samples/deprecated/name-conflict-symbol/_config.js +++ b/test/function/samples/deprecated/name-conflict-symbol/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids name conflicts with local variables named Symbol', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js b/test/function/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js index 65129a91d2b..fdcc36cfa0d 100644 --- a/test/function/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/dynamic-import-default-mode/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', options: { diff --git a/test/function/samples/deprecated/namespace-tostring/dynamic-import/_config.js b/test/function/samples/deprecated/namespace-tostring/dynamic-import/_config.js index b154a0ba163..a7672c3e17c 100644 --- a/test/function/samples/deprecated/namespace-tostring/dynamic-import/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/dynamic-import/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to dynamic imports', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/namespace-tostring/entry-default/_config.js b/test/function/samples/deprecated/namespace-tostring/entry-default/_config.js index 49defe5b590..bed1e2e5b5f 100644 --- a/test/function/samples/deprecated/namespace-tostring/entry-default/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/entry-default/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not add Symbol.toStringTag property to entry chunks with default export mode', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/namespace-tostring/entry-named/_config.js b/test/function/samples/deprecated/namespace-tostring/entry-named/_config.js index e9766c0fee1..80242f61d29 100644 --- a/test/function/samples/deprecated/namespace-tostring/entry-named/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/entry-named/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to entry chunks with named exports', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/namespace-tostring/external-namespaces/_config.js b/test/function/samples/deprecated/namespace-tostring/external-namespaces/_config.js index 55b067b1c1a..f5f42bc9bee 100644 --- a/test/function/samples/deprecated/namespace-tostring/external-namespaces/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/external-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to external namespaces', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/namespace-tostring/inlined-namespace/_config.js b/test/function/samples/deprecated/namespace-tostring/inlined-namespace/_config.js index 88aba7315d9..b13c2840c80 100644 --- a/test/function/samples/deprecated/namespace-tostring/inlined-namespace/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/inlined-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to inlined namespaces', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/namespace-tostring/interop-property-descriptor/_config.js b/test/function/samples/deprecated/namespace-tostring/interop-property-descriptor/_config.js index 649e563dc72..56a9227acd3 100644 --- a/test/function/samples/deprecated/namespace-tostring/interop-property-descriptor/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/interop-property-descriptor/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generated interop namespaces should have correct Symbol.toStringTag', context: { require() { diff --git a/test/function/samples/deprecated/namespace-tostring/property-descriptor/_config.js b/test/function/samples/deprecated/namespace-tostring/property-descriptor/_config.js index ea4fe0f27ff..c0a08b6ee7c 100644 --- a/test/function/samples/deprecated/namespace-tostring/property-descriptor/_config.js +++ b/test/function/samples/deprecated/namespace-tostring/property-descriptor/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'namespace export should have @@toStringTag with correct property descriptors #4336', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/nested-inlined-dynamic-import-1/_config.js b/test/function/samples/deprecated/nested-inlined-dynamic-import-1/_config.js index c51b63f0de0..8d567dff26c 100644 --- a/test/function/samples/deprecated/nested-inlined-dynamic-import-1/_config.js +++ b/test/function/samples/deprecated/nested-inlined-dynamic-import-1/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts variables when nested dynamic imports are inlined via inlineDynamicImports', options: { diff --git a/test/function/samples/deprecated/plugin-module-ids/_config.js b/test/function/samples/deprecated/plugin-module-ids/_config.js index fcebb5945c9..e296b0c915c 100644 --- a/test/function/samples/deprecated/plugin-module-ids/_config.js +++ b/test/function/samples/deprecated/plugin-module-ids/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); let rendered = false; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides all module ids on the plugin context', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/preserveModules/inline-dynamic-imports/_config.js b/test/function/samples/deprecated/preserveModules/inline-dynamic-imports/_config.js index 8648e0b5b49..f72dfda5b09 100644 --- a/test/function/samples/deprecated/preserveModules/inline-dynamic-imports/_config.js +++ b/test/function/samples/deprecated/preserveModules/inline-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Inlining dynamic imports is not supported when preserving modules', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/preserveModules/invalid-default-export-mode/_config.js b/test/function/samples/deprecated/preserveModules/invalid-default-export-mode/_config.js index 9d8b80ef9a3..de7fd930549 100644 --- a/test/function/samples/deprecated/preserveModules/invalid-default-export-mode/_config.js +++ b/test/function/samples/deprecated/preserveModules/invalid-default-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using default export mode with named exports', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/preserveModules/invalid-no-preserve-entry-signatures/_config.js b/test/function/samples/deprecated/preserveModules/invalid-no-preserve-entry-signatures/_config.js index 6dfff0fb0ca..c3fbb227305 100644 --- a/test/function/samples/deprecated/preserveModules/invalid-no-preserve-entry-signatures/_config.js +++ b/test/function/samples/deprecated/preserveModules/invalid-no-preserve-entry-signatures/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting preserveEntrySignatures to false', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/preserveModules/invalid-none-export-mode/_config.js b/test/function/samples/deprecated/preserveModules/invalid-none-export-mode/_config.js index 6684d3eaaf2..d8b42800847 100644 --- a/test/function/samples/deprecated/preserveModules/invalid-none-export-mode/_config.js +++ b/test/function/samples/deprecated/preserveModules/invalid-none-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using none export mode with named exports', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/preserveModules/manual-chunks/_config.js b/test/function/samples/deprecated/preserveModules/manual-chunks/_config.js index baf1c5bfec0..f5a3018c9ac 100644 --- a/test/function/samples/deprecated/preserveModules/manual-chunks/_config.js +++ b/test/function/samples/deprecated/preserveModules/manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Assigning manual chunks fails when preserving modules', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/preserveModules/mixed-exports/_config.js b/test/function/samples/deprecated/preserveModules/mixed-exports/_config.js index 985d1d369fc..a8b3919deb8 100644 --- a/test/function/samples/deprecated/preserveModules/mixed-exports/_config.js +++ b/test/function/samples/deprecated/preserveModules/mixed-exports/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB1 = path.join(__dirname, 'lib1.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns for mixed exports in all chunks when preserving modules', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/preserveModules/virtual-modules-conflict/_config.js b/test/function/samples/deprecated/preserveModules/virtual-modules-conflict/_config.js index 4eea05790e4..3210239e895 100644 --- a/test/function/samples/deprecated/preserveModules/virtual-modules-conflict/_config.js +++ b/test/function/samples/deprecated/preserveModules/virtual-modules-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/preserveModules/virtual-modules/_config.js b/test/function/samples/deprecated/preserveModules/virtual-modules/_config.js index 66024b188e6..8aecc53f505 100644 --- a/test/function/samples/deprecated/preserveModules/virtual-modules/_config.js +++ b/test/function/samples/deprecated/preserveModules/virtual-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/reexport-ns/_config.js b/test/function/samples/deprecated/reexport-ns/_config.js index 9e6be21844d..24750619e76 100644 --- a/test/function/samples/deprecated/reexport-ns/_config.js +++ b/test/function/samples/deprecated/reexport-ns/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external namespace reexport', options: { strictDeprecations: false, diff --git a/test/function/samples/deprecated/resolve-id-external/_config.js b/test/function/samples/deprecated/resolve-id-external/_config.js index cee037d2cee..c1cb13a3005 100644 --- a/test/function/samples/deprecated/resolve-id-external/_config.js +++ b/test/function/samples/deprecated/resolve-id-external/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const sideEffects = []; const { getObject } = require('../../../../utils'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include modules without used exports if moduleSideEffect is false', context: { require(id) { diff --git a/test/function/samples/deprecated/resolve-id/_config.js b/test/function/samples/deprecated/resolve-id/_config.js index 9cd9119300e..825b6a69a03 100644 --- a/test/function/samples/deprecated/resolve-id/_config.js +++ b/test/function/samples/deprecated/resolve-id/_config.js @@ -4,7 +4,7 @@ const { getObject } = require('../../../../utils'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include modules without used exports if moduleSideEffect is false', context: { sideEffects diff --git a/test/function/samples/deprecations/dynamicImportFunction/_config.js b/test/function/samples/deprecations/dynamicImportFunction/_config.js index 319af48e1d9..e143d84cf7b 100644 --- a/test/function/samples/deprecations/dynamicImportFunction/_config.js +++ b/test/function/samples/deprecations/dynamicImportFunction/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks the "output.dynamicImportFunction" option as deprecated', options: { output: { diff --git a/test/function/samples/deprecations/experimentalDeepDynamicChunkOptimization/_config.js b/test/function/samples/deprecations/experimentalDeepDynamicChunkOptimization/_config.js index 2e86eab4899..55497278ec1 100644 --- a/test/function/samples/deprecations/experimentalDeepDynamicChunkOptimization/_config.js +++ b/test/function/samples/deprecations/experimentalDeepDynamicChunkOptimization/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks the "output.experimentalDeepDynamicChunkOptimization" option as deprecated', options: { output: { diff --git a/test/function/samples/deprecations/hasModuleSideEffects/_config.js b/test/function/samples/deprecations/hasModuleSideEffects/_config.js index debb192b2db..a711e73a995 100644 --- a/test/function/samples/deprecations/hasModuleSideEffects/_config.js +++ b/test/function/samples/deprecations/hasModuleSideEffects/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns that accessing "ModuleInfo.hasModuleSideEffects" is deprecated', options: { strictDeprecations: true, diff --git a/test/function/samples/deprecations/inlineDynamicImports/_config.js b/test/function/samples/deprecations/inlineDynamicImports/_config.js index 1eaa3f935f5..cb5956690ca 100644 --- a/test/function/samples/deprecations/inlineDynamicImports/_config.js +++ b/test/function/samples/deprecations/inlineDynamicImports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks the "inlineDynamicImports" input option as deprecated', options: { inlineDynamicImports: true diff --git a/test/function/samples/deprecations/manualChunks/_config.js b/test/function/samples/deprecations/manualChunks/_config.js index a81bd7fb405..be135218fe0 100644 --- a/test/function/samples/deprecations/manualChunks/_config.js +++ b/test/function/samples/deprecations/manualChunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks the "manualChunks" input option as deprecated', options: { manualChunks() { diff --git a/test/function/samples/deprecations/maxParallelFileReads/_config.js b/test/function/samples/deprecations/maxParallelFileReads/_config.js index 1f26f6325f8..3fb15c6e40a 100644 --- a/test/function/samples/deprecations/maxParallelFileReads/_config.js +++ b/test/function/samples/deprecations/maxParallelFileReads/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks the "maxParallelFileReads" option as deprecated', options: { maxParallelFileReads: 3 diff --git a/test/function/samples/deprecations/namespaceToStringTag/_config.js b/test/function/samples/deprecations/namespaceToStringTag/_config.js index de9b36b8ca2..79b151732f4 100644 --- a/test/function/samples/deprecations/namespaceToStringTag/_config.js +++ b/test/function/samples/deprecations/namespaceToStringTag/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks the "output.namespaceToStringTag" option as deprecated', options: { output: { diff --git a/test/function/samples/deprecations/plugin-module-ids/_config.js b/test/function/samples/deprecations/plugin-module-ids/_config.js index 3fc09276e1e..0b49a46c96d 100644 --- a/test/function/samples/deprecations/plugin-module-ids/_config.js +++ b/test/function/samples/deprecations/plugin-module-ids/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides all module ids on the plugin context', options: { external: ['path'], diff --git a/test/function/samples/deprecations/prefer-const/_config.js b/test/function/samples/deprecations/prefer-const/_config.js index 99a40facec6..0e9a06f928c 100644 --- a/test/function/samples/deprecations/prefer-const/_config.js +++ b/test/function/samples/deprecations/prefer-const/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks the "output.preferConst" option as deprecated', options: { output: { diff --git a/test/function/samples/deprecations/preserveModules/_config.js b/test/function/samples/deprecations/preserveModules/_config.js index 8e3af414c26..0bb0d2140c3 100644 --- a/test/function/samples/deprecations/preserveModules/_config.js +++ b/test/function/samples/deprecations/preserveModules/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks the "preserveModules" input option as deprecated', options: { preserveModules: true diff --git a/test/function/samples/deshadow-respect-existing/_config.js b/test/function/samples/deshadow-respect-existing/_config.js index 888876d53bc..ee8efb8adf4 100644 --- a/test/function/samples/deshadow-respect-existing/_config.js +++ b/test/function/samples/deshadow-respect-existing/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respect existing variable names when deshadowing', exports(exports) { assert.equal(exports.getValue(), 'mainmainmainmaindep'); diff --git a/test/function/samples/deshadow-top-level-declaration/_config.js b/test/function/samples/deshadow-top-level-declaration/_config.js index c5d1351271c..46454ff8a4a 100644 --- a/test/function/samples/deshadow-top-level-declaration/_config.js +++ b/test/function/samples/deshadow-top-level-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deshadows top-level declarations' }); diff --git a/test/function/samples/deshadowed-destructured-parameter/_config.js b/test/function/samples/deshadowed-destructured-parameter/_config.js index fab513adbda..a67f4436f45 100644 --- a/test/function/samples/deshadowed-destructured-parameter/_config.js +++ b/test/function/samples/deshadowed-destructured-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly deshadows destructured function parameters (#1008)' }); diff --git a/test/function/samples/deshadowed-namespaced-external-import-ignored/_config.js b/test/function/samples/deshadowed-namespaced-external-import-ignored/_config.js index 00873393d17..8b96dc77b36 100644 --- a/test/function/samples/deshadowed-namespaced-external-import-ignored/_config.js +++ b/test/function/samples/deshadowed-namespaced-external-import-ignored/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: '#1547', options: { external: ['external'] diff --git a/test/function/samples/deshadowed-namespaced-import-renamed/_config.js b/test/function/samples/deshadowed-namespaced-import-renamed/_config.js index 87bb025bc2b..a07e45ebee8 100644 --- a/test/function/samples/deshadowed-namespaced-import-renamed/_config.js +++ b/test/function/samples/deshadowed-namespaced-import-renamed/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: '#1550' }); diff --git a/test/function/samples/deshadowed-namespaced-import/_config.js b/test/function/samples/deshadowed-namespaced-import/_config.js index debdbfc9f7c..233145edacf 100644 --- a/test/function/samples/deshadowed-namespaced-import/_config.js +++ b/test/function/samples/deshadowed-namespaced-import/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: '#1488' }); diff --git a/test/function/samples/deshadowed-shorthand-property/_config.js b/test/function/samples/deshadowed-shorthand-property/_config.js index 5daabfe8d67..e462f81d6e0 100644 --- a/test/function/samples/deshadowed-shorthand-property/_config.js +++ b/test/function/samples/deshadowed-shorthand-property/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'shorthand properties referencing deshadowed variables are expanded' }); diff --git a/test/function/samples/deshadows-function-expression-id/_config.js b/test/function/samples/deshadows-function-expression-id/_config.js index 7071b01d905..679a6c996f8 100644 --- a/test/function/samples/deshadows-function-expression-id/_config.js +++ b/test/function/samples/deshadows-function-expression-id/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deshadows function expression ID (#1176)' }); diff --git a/test/function/samples/destructuring-loop/_config.js b/test/function/samples/destructuring-loop/_config.js index 66b7b1c380a..2a104f719ce 100644 --- a/test/function/samples/destructuring-loop/_config.js +++ b/test/function/samples/destructuring-loop/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles loops with destructuring declarations' }); diff --git a/test/function/samples/disappearing-exported-value/_config.js b/test/function/samples/disappearing-exported-value/_config.js index 3f487781666..5f4a6b88169 100644 --- a/test/function/samples/disappearing-exported-value/_config.js +++ b/test/function/samples/disappearing-exported-value/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exported values do not mysteriously disappear (#484)', exports(exports) { assert.equal(exports.exportedAnswer, 42); diff --git a/test/function/samples/do-while-conditional-break/_config.js b/test/function/samples/do-while-conditional-break/_config.js index 7e051df2381..3af21fa3032 100644 --- a/test/function/samples/do-while-conditional-break/_config.js +++ b/test/function/samples/do-while-conditional-break/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles conditional breaks in do-while loops with unconditional return' }); diff --git a/test/function/samples/does-not-deconflict-undefined/_config.js b/test/function/samples/does-not-deconflict-undefined/_config.js index adc0f86a590..48623db166c 100644 --- a/test/function/samples/does-not-deconflict-undefined/_config.js +++ b/test/function/samples/does-not-deconflict-undefined/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not rename undefined' }); diff --git a/test/function/samples/does-not-fail-for-arguments-test/_config.js b/test/function/samples/does-not-fail-for-arguments-test/_config.js index 8d9dfcdf2f6..485c0adca3d 100644 --- a/test/function/samples/does-not-fail-for-arguments-test/_config.js +++ b/test/function/samples/does-not-fail-for-arguments-test/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not fail when non-integer arguments properties are accessed' }); diff --git a/test/function/samples/does-not-hang-on-missing-module/_config.js b/test/function/samples/does-not-hang-on-missing-module/_config.js index 73e410d0c75..1369337288a 100644 --- a/test/function/samples/does-not-hang-on-missing-module/_config.js +++ b/test/function/samples/does-not-hang-on-missing-module/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not hang on missing module (#53)', warnings: [ { diff --git a/test/function/samples/does-not-mangle-entry-point/_config.js b/test/function/samples/does-not-mangle-entry-point/_config.js index 76e984d0877..4cf513eeafa 100644 --- a/test/function/samples/does-not-mangle-entry-point/_config.js +++ b/test/function/samples/does-not-mangle-entry-point/_config.js @@ -5,7 +5,7 @@ const modules = { 'x/y': 'export default 24;' }; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not mangle input', options: { input: 'x\\y', diff --git a/test/function/samples/double-default-export/_config.js b/test/function/samples/double-default-export/_config.js index 4e05ddbb92a..a6760044b75 100644 --- a/test/function/samples/double-default-export/_config.js +++ b/test/function/samples/double-default-export/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_FOO = path.join(__dirname, 'foo.js'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws on double default exports', error: { cause: { diff --git a/test/function/samples/double-named-export/_config.js b/test/function/samples/double-named-export/_config.js index bf8617642d2..7e671029ad3 100644 --- a/test/function/samples/double-named-export/_config.js +++ b/test/function/samples/double-named-export/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws on duplicate named exports', error: { cause: { diff --git a/test/function/samples/double-named-reexport/_config.js b/test/function/samples/double-named-reexport/_config.js index ee5f850206b..4488a569c5e 100644 --- a/test/function/samples/double-named-reexport/_config.js +++ b/test/function/samples/double-named-reexport/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws on duplicate named exports', error: { cause: { diff --git a/test/function/samples/double-namespace-reexport/_config.js b/test/function/samples/double-namespace-reexport/_config.js index 3ab739bd134..25c28785975 100644 --- a/test/function/samples/double-namespace-reexport/_config.js +++ b/test/function/samples/double-namespace-reexport/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles chained namespace reexports from externals', options: { external: 'external' diff --git a/test/function/samples/duplicate-import-fails/_config.js b/test/function/samples/duplicate-import-fails/_config.js index bab2f282731..f4dee4a9339 100644 --- a/test/function/samples/duplicate-import-fails/_config.js +++ b/test/function/samples/duplicate-import-fails/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disallows duplicate imports', error: { cause: { diff --git a/test/function/samples/duplicate-import-specifier-fails/_config.js b/test/function/samples/duplicate-import-specifier-fails/_config.js index 0c9c7e1864e..17dd9bafc0f 100644 --- a/test/function/samples/duplicate-import-specifier-fails/_config.js +++ b/test/function/samples/duplicate-import-specifier-fails/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disallows duplicate import specifiers', error: { cause: { diff --git a/test/function/samples/duplicate-input-entry/_config.js b/test/function/samples/duplicate-input-entry/_config.js index 92e2f6d106b..d70246ccd92 100644 --- a/test/function/samples/duplicate-input-entry/_config.js +++ b/test/function/samples/duplicate-input-entry/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles duplicate entry modules when using the object form', options: { input: ['entry', 'entry.js'] diff --git a/test/function/samples/dynamic-import-default-mode-facade/_config.js b/test/function/samples/dynamic-import-default-mode-facade/_config.js index 2e429da9aa4..1d35721ce8e 100644 --- a/test/function/samples/dynamic-import-default-mode-facade/_config.js +++ b/test/function/samples/dynamic-import-default-mode-facade/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles dynamic imports from facades using default export mode', options: { input: ['main', 'foo', 'bar'] diff --git a/test/function/samples/dynamic-import-duplicates/_config.js b/test/function/samples/dynamic-import-duplicates/_config.js index 7d3475a4749..2bb12ee7cb1 100644 --- a/test/function/samples/dynamic-import-duplicates/_config.js +++ b/test/function/samples/dynamic-import-duplicates/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Dynamic import inlining', options: { output: { inlineDynamicImports: true } diff --git a/test/function/samples/dynamic-import-existing/_config.js b/test/function/samples/dynamic-import-existing/_config.js index 41e60221919..9506eac1aff 100644 --- a/test/function/samples/dynamic-import-existing/_config.js +++ b/test/function/samples/dynamic-import-existing/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Dynamic import inlining when resolution id is a module in the bundle', exports(exports) { assert.equal(exports.y, 42); diff --git a/test/function/samples/dynamic-import-expression/_config.js b/test/function/samples/dynamic-import-expression/_config.js index 8bcef4ccc27..9e754bac9d0 100644 --- a/test/function/samples/dynamic-import-expression/_config.js +++ b/test/function/samples/dynamic-import-expression/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Dynamic import expression replacement', options: { plugins: [ diff --git a/test/function/samples/dynamic-import-inlining/_config.js b/test/function/samples/dynamic-import-inlining/_config.js index 7d3475a4749..2bb12ee7cb1 100644 --- a/test/function/samples/dynamic-import-inlining/_config.js +++ b/test/function/samples/dynamic-import-inlining/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Dynamic import inlining', options: { output: { inlineDynamicImports: true } diff --git a/test/function/samples/dynamic-import-not-found/_config.js b/test/function/samples/dynamic-import-not-found/_config.js index af01876c91f..bfb13a5f340 100644 --- a/test/function/samples/dynamic-import-not-found/_config.js +++ b/test/function/samples/dynamic-import-not-found/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns if a dynamic import is not found', context: { require(id) { diff --git a/test/function/samples/dynamic-import-only-default/_config.js b/test/function/samples/dynamic-import-only-default/_config.js index d096e1a6170..bcd5cc10ec4 100644 --- a/test/function/samples/dynamic-import-only-default/_config.js +++ b/test/function/samples/dynamic-import-only-default/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly imports dynamic namespaces with only a default export from entry- and non-entry-point chunks', options: { diff --git a/test/function/samples/dynamic-import-relative-not-found/_config.js b/test/function/samples/dynamic-import-relative-not-found/_config.js index 4440891210f..e1e598193eb 100644 --- a/test/function/samples/dynamic-import-relative-not-found/_config.js +++ b/test/function/samples/dynamic-import-relative-not-found/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws if a dynamic relative import is not found', error: { code: 'UNRESOLVED_IMPORT', diff --git a/test/function/samples/dynamic-import-rewriting/_config.js b/test/function/samples/dynamic-import-rewriting/_config.js index 1ba38bbc538..5b7608a5a49 100644 --- a/test/function/samples/dynamic-import-rewriting/_config.js +++ b/test/function/samples/dynamic-import-rewriting/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Dynamic import string specifier resolving', options: { external: ['asdf'], diff --git a/test/function/samples/dynamic-import-this-arrow/_config.js b/test/function/samples/dynamic-import-this-arrow/_config.js index 728ce62656c..09d2320f1e9 100644 --- a/test/function/samples/dynamic-import-this-arrow/_config.js +++ b/test/function/samples/dynamic-import-this-arrow/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct "this" in dynamic imports when using arrow functions', context: { require(id) { diff --git a/test/function/samples/dynamic-import-this-function/_config.js b/test/function/samples/dynamic-import-this-function/_config.js index bcc0895be9e..069836e93b2 100644 --- a/test/function/samples/dynamic-import-this-function/_config.js +++ b/test/function/samples/dynamic-import-this-function/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct "this" in dynamic imports when not using arrow functions', context: { require(id) { diff --git a/test/function/samples/dynamic-imports-shared-exports/_config.js b/test/function/samples/dynamic-imports-shared-exports/_config.js index 1bc6b69eaca..7b43d4c92f2 100644 --- a/test/function/samples/dynamic-imports-shared-exports/_config.js +++ b/test/function/samples/dynamic-imports-shared-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows sharing imports between dynamic chunks', options: { preserveEntrySignatures: 'allow-extension' diff --git a/test/function/samples/dynamic-namespace-lookup/_config.js b/test/function/samples/dynamic-namespace-lookup/_config.js index 1a9e1fef123..d60a90bece8 100644 --- a/test/function/samples/dynamic-namespace-lookup/_config.js +++ b/test/function/samples/dynamic-namespace-lookup/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does namespace optimization when possible, but not for dynamic lookups' }); diff --git a/test/function/samples/emit-chunk-hash/_config.js b/test/function/samples/emit-chunk-hash/_config.js index 98d1f642921..cf145f5a87d 100644 --- a/test/function/samples/emit-chunk-hash/_config.js +++ b/test/function/samples/emit-chunk-hash/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'gives access to the hashed filed name via this.getFileName in generateBundle', options: { input: 'main', diff --git a/test/function/samples/emit-chunk-manual-asset-source/_config.js b/test/function/samples/emit-chunk-manual-asset-source/_config.js index 272ac51eda7..36dd0dcc4df 100644 --- a/test/function/samples/emit-chunk-manual-asset-source/_config.js +++ b/test/function/samples/emit-chunk-manual-asset-source/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports setting asset sources as side effect of the manual chunks option', options: { output: { diff --git a/test/function/samples/emit-chunk-manual/_config.js b/test/function/samples/emit-chunk-manual/_config.js index a2029052ec6..09e17c86da7 100644 --- a/test/function/samples/emit-chunk-manual/_config.js +++ b/test/function/samples/emit-chunk-manual/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports emitting chunks as side effect of the manual chunks option', options: { output: { diff --git a/test/function/samples/emit-file/asset-source-invalid/_config.js b/test/function/samples/emit-file/asset-source-invalid/_config.js index c6b08b7125c..e7176b36e91 100644 --- a/test/function/samples/emit-file/asset-source-invalid/_config.js +++ b/test/function/samples/emit-file/asset-source-invalid/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting an empty asset source', options: { plugins: { diff --git a/test/function/samples/emit-file/asset-source-invalid2/_config.js b/test/function/samples/emit-file/asset-source-invalid2/_config.js index be359d207ee..f835adc9bb7 100644 --- a/test/function/samples/emit-file/asset-source-invalid2/_config.js +++ b/test/function/samples/emit-file/asset-source-invalid2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting an empty asset source', options: { plugins: { diff --git a/test/function/samples/emit-file/asset-source-invalid3/_config.js b/test/function/samples/emit-file/asset-source-invalid3/_config.js index 3ba826385e7..0cf25fa9a8f 100644 --- a/test/function/samples/emit-file/asset-source-invalid3/_config.js +++ b/test/function/samples/emit-file/asset-source-invalid3/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting an empty asset source', options: { plugins: { diff --git a/test/function/samples/emit-file/asset-source-invalid4/_config.js b/test/function/samples/emit-file/asset-source-invalid4/_config.js index a684af0b46f..e1b66fa773a 100644 --- a/test/function/samples/emit-file/asset-source-invalid4/_config.js +++ b/test/function/samples/emit-file/asset-source-invalid4/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting an empty asset source', options: { plugins: { diff --git a/test/function/samples/emit-file/asset-source-missing/_config.js b/test/function/samples/emit-file/asset-source-missing/_config.js index 5b1a0c151ea..5989d82a6e5 100644 --- a/test/function/samples/emit-file/asset-source-missing/_config.js +++ b/test/function/samples/emit-file/asset-source-missing/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when not setting the asset source', options: { plugins: { diff --git a/test/function/samples/emit-file/asset-source-missing2/_config.js b/test/function/samples/emit-file/asset-source-missing2/_config.js index fe08ce5cd4e..b2ec171c523 100644 --- a/test/function/samples/emit-file/asset-source-missing2/_config.js +++ b/test/function/samples/emit-file/asset-source-missing2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when not setting the asset source', options: { plugins: { diff --git a/test/function/samples/emit-file/asset-source-missing3/_config.js b/test/function/samples/emit-file/asset-source-missing3/_config.js index 317f03f5e3b..f924cf85b86 100644 --- a/test/function/samples/emit-file/asset-source-missing3/_config.js +++ b/test/function/samples/emit-file/asset-source-missing3/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when accessing the file name before the asset source is set', options: { plugins: { diff --git a/test/function/samples/emit-file/asset-source-missing4/_config.js b/test/function/samples/emit-file/asset-source-missing4/_config.js index 025c0ec564c..9e1b27eb3be 100644 --- a/test/function/samples/emit-file/asset-source-missing4/_config.js +++ b/test/function/samples/emit-file/asset-source-missing4/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when accessing the file name before the asset source is set', options: { plugins: { diff --git a/test/function/samples/emit-file/asset-source-missing5/_config.js b/test/function/samples/emit-file/asset-source-missing5/_config.js index 44f6cccb1ce..346496edbe1 100644 --- a/test/function/samples/emit-file/asset-source-missing5/_config.js +++ b/test/function/samples/emit-file/asset-source-missing5/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when not setting the asset source and accessing the asset URL', options: { plugins: { diff --git a/test/function/samples/emit-file/chunk-filename-not-available-buildEnd/_config.js b/test/function/samples/emit-file/chunk-filename-not-available-buildEnd/_config.js index ab6cf87b2d9..065cde79c31 100644 --- a/test/function/samples/emit-file/chunk-filename-not-available-buildEnd/_config.js +++ b/test/function/samples/emit-file/chunk-filename-not-available-buildEnd/_config.js @@ -1,6 +1,6 @@ let chunkId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Throws when accessing the filename before it has been generated in buildEnd', options: { input: 'main.js', diff --git a/test/function/samples/emit-file/chunk-filename-not-available-renderStart/_config.js b/test/function/samples/emit-file/chunk-filename-not-available-renderStart/_config.js index db6c3bcf332..8879dc2cbfd 100644 --- a/test/function/samples/emit-file/chunk-filename-not-available-renderStart/_config.js +++ b/test/function/samples/emit-file/chunk-filename-not-available-renderStart/_config.js @@ -1,6 +1,6 @@ let chunkId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Throws when accessing the filename before it has been generated in renderStart', options: { input: 'main.js', diff --git a/test/function/samples/emit-file/chunk-filename-not-available/_config.js b/test/function/samples/emit-file/chunk-filename-not-available/_config.js index 1f6401caf7f..9eaa429e482 100644 --- a/test/function/samples/emit-file/chunk-filename-not-available/_config.js +++ b/test/function/samples/emit-file/chunk-filename-not-available/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Throws when accessing the filename before it has been generated', options: { input: 'main.js', diff --git a/test/function/samples/emit-file/chunk-not-found/_config.js b/test/function/samples/emit-file/chunk-not-found/_config.js index 7497de1278d..ebfa97a6ba9 100644 --- a/test/function/samples/emit-file/chunk-not-found/_config.js +++ b/test/function/samples/emit-file/chunk-not-found/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Throws if an emitted entry chunk cannot be resolved', options: { input: 'main.js', diff --git a/test/function/samples/emit-file/emit-from-output-options/_config.js b/test/function/samples/emit-file/emit-from-output-options/_config.js index abc2401eafe..ddbf0a8325a 100644 --- a/test/function/samples/emit-file/emit-from-output-options/_config.js +++ b/test/function/samples/emit-file/emit-from-output-options/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when trying to emit files from the outputOptions hook', options: { input: 'main', diff --git a/test/function/samples/emit-file/emit-same-file/_config.js b/test/function/samples/emit-file/emit-same-file/_config.js index b19e16f551a..baf87fffcc6 100644 --- a/test/function/samples/emit-file/emit-same-file/_config.js +++ b/test/function/samples/emit-file/emit-same-file/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns if multiple files with the same name are emitted', options: { input: 'main.js', diff --git a/test/function/samples/emit-file/file-references-in-bundle/_config.js b/test/function/samples/emit-file/file-references-in-bundle/_config.js index 4f247cfd646..3f676dc346a 100644 --- a/test/function/samples/emit-file/file-references-in-bundle/_config.js +++ b/test/function/samples/emit-file/file-references-in-bundle/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { pathToFileURL } = require('node:url'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'lists referenced files in the bundle', options: { input: 'main', diff --git a/test/function/samples/emit-file/invalid-asset-name/_config.js b/test/function/samples/emit-file/invalid-asset-name/_config.js index f628317845a..eb692ae74f3 100644 --- a/test/function/samples/emit-file/invalid-asset-name/_config.js +++ b/test/function/samples/emit-file/invalid-asset-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid asset names', options: { plugins: { diff --git a/test/function/samples/emit-file/invalid-asset-name3/_config.js b/test/function/samples/emit-file/invalid-asset-name3/_config.js index 85603f472e4..6f68bdf972e 100644 --- a/test/function/samples/emit-file/invalid-asset-name3/_config.js +++ b/test/function/samples/emit-file/invalid-asset-name3/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid asset names with absolute path on Windows OS', options: { plugins: { diff --git a/test/function/samples/emit-file/invalid-chunk-id/_config.js b/test/function/samples/emit-file/invalid-chunk-id/_config.js index 912a9ea90a3..d72840d73eb 100644 --- a/test/function/samples/emit-file/invalid-chunk-id/_config.js +++ b/test/function/samples/emit-file/invalid-chunk-id/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid chunk ids', options: { plugins: { diff --git a/test/function/samples/emit-file/invalid-file-type/_config.js b/test/function/samples/emit-file/invalid-file-type/_config.js index 673dc33d686..8641200205a 100644 --- a/test/function/samples/emit-file/invalid-file-type/_config.js +++ b/test/function/samples/emit-file/invalid-file-type/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid file types', options: { plugins: { diff --git a/test/function/samples/emit-file/invalid-reference-id/_config.js b/test/function/samples/emit-file/invalid-reference-id/_config.js index b36163123bd..e12a5463e79 100644 --- a/test/function/samples/emit-file/invalid-reference-id/_config.js +++ b/test/function/samples/emit-file/invalid-reference-id/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid reference ids', options: { plugins: { diff --git a/test/function/samples/emit-file/invalid-set-asset-source-id/_config.js b/test/function/samples/emit-file/invalid-set-asset-source-id/_config.js index 018601ecf1a..ea28ec8016c 100644 --- a/test/function/samples/emit-file/invalid-set-asset-source-id/_config.js +++ b/test/function/samples/emit-file/invalid-set-asset-source-id/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid asset ids', options: { plugins: { diff --git a/test/function/samples/emit-file/modules-loaded/_config.js b/test/function/samples/emit-file/modules-loaded/_config.js index 5f86f55f840..9e76edefffd 100644 --- a/test/function/samples/emit-file/modules-loaded/_config.js +++ b/test/function/samples/emit-file/modules-loaded/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Throws when adding a chunk after the modules have finished loading', options: { input: 'main.js', diff --git a/test/function/samples/emit-file/no-input/_config.js b/test/function/samples/emit-file/no-input/_config.js index de4dd2c7ec5..0665e74b5a8 100644 --- a/test/function/samples/emit-file/no-input/_config.js +++ b/test/function/samples/emit-file/no-input/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'It is not necessary to provide an input if a dynamic entry is emitted', options: { input: undefined, diff --git a/test/function/samples/emit-file/set-asset-source-chunk/_config.js b/test/function/samples/emit-file/set-asset-source-chunk/_config.js index 9c689eaba73..ede4397957d 100644 --- a/test/function/samples/emit-file/set-asset-source-chunk/_config.js +++ b/test/function/samples/emit-file/set-asset-source-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when trying to set the asset source of a chunk', options: { plugins: { diff --git a/test/function/samples/emit-file/set-asset-source-transform/_config.js b/test/function/samples/emit-file/set-asset-source-transform/_config.js index 11296a4b348..667055fdb92 100644 --- a/test/function/samples/emit-file/set-asset-source-transform/_config.js +++ b/test/function/samples/emit-file/set-asset-source-transform/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting the asset source in the transform hook', options: { plugins: { diff --git a/test/function/samples/emit-file/set-asset-source-twice/_config.js b/test/function/samples/emit-file/set-asset-source-twice/_config.js index e29d8e100ca..695ed5de025 100644 --- a/test/function/samples/emit-file/set-asset-source-twice/_config.js +++ b/test/function/samples/emit-file/set-asset-source-twice/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting the asset source twice', options: { plugins: { diff --git a/test/function/samples/emit-file/set-asset-source-twice2/_config.js b/test/function/samples/emit-file/set-asset-source-twice2/_config.js index cd7dc359788..45bcbb9fb0e 100644 --- a/test/function/samples/emit-file/set-asset-source-twice2/_config.js +++ b/test/function/samples/emit-file/set-asset-source-twice2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting the asset source twice', options: { plugins: { diff --git a/test/function/samples/emit-file/set-source-in-output-options/_config.js b/test/function/samples/emit-file/set-source-in-output-options/_config.js index c143ce4c251..1f19e4a67ca 100644 --- a/test/function/samples/emit-file/set-source-in-output-options/_config.js +++ b/test/function/samples/emit-file/set-source-in-output-options/_config.js @@ -1,6 +1,6 @@ let referenceId; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when trying to set file sources in the outputOptions hook', options: { input: 'main', diff --git a/test/function/samples/empty-imports-have-side-effects/_config.js b/test/function/samples/empty-imports-have-side-effects/_config.js index 5a36229f1c2..b9b1ce68533 100644 --- a/test/function/samples/empty-imports-have-side-effects/_config.js +++ b/test/function/samples/empty-imports-have-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'empty imports are assumed to contain side-effects' }); diff --git a/test/function/samples/empty-string-as-module-name/_config.js b/test/function/samples/empty-string-as-module-name/_config.js index 0fff62cd43c..df34004792a 100644 --- a/test/function/samples/empty-string-as-module-name/_config.js +++ b/test/function/samples/empty-string-as-module-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows using empty string as a valid module name', options: { external: () => false, diff --git a/test/function/samples/enforce-plugin-order/_config.js b/test/function/samples/enforce-plugin-order/_config.js index 3ac5e181ecc..1ce69b69fb9 100644 --- a/test/function/samples/enforce-plugin-order/_config.js +++ b/test/function/samples/enforce-plugin-order/_config.js @@ -73,7 +73,7 @@ function addPlugin(order) { plugins.push(plugin); } -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to enforce plugin hook order', options: { plugins, diff --git a/test/function/samples/enforce-sequential-plugin-order/_config.js b/test/function/samples/enforce-sequential-plugin-order/_config.js index f77d7650469..138b7c25344 100644 --- a/test/function/samples/enforce-sequential-plugin-order/_config.js +++ b/test/function/samples/enforce-sequential-plugin-order/_config.js @@ -59,7 +59,7 @@ function addPlugin(order, sequential) { plugins.push(plugin); } -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to enforce sequential plugin hook order for parallel plugin hooks', options: { plugins diff --git a/test/function/samples/error-after-transform-should-throw-correct-location/_config.js b/test/function/samples/error-after-transform-should-throw-correct-location/_config.js index 265918bf850..3d24ffa9c63 100644 --- a/test/function/samples/error-after-transform-should-throw-correct-location/_config.js +++ b/test/function/samples/error-after-transform-should-throw-correct-location/_config.js @@ -3,7 +3,7 @@ const MagicString = require('magic-string'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_EMPTY = path.join(__dirname, 'empty.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'error after transform should throw with correct location of file', options: { plugins: [ diff --git a/test/function/samples/error-missing-umd-name/_config.js b/test/function/samples/error-missing-umd-name/_config.js index 847b6099d80..650de3601c4 100644 --- a/test/function/samples/error-missing-umd-name/_config.js +++ b/test/function/samples/error-missing-umd-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws an error if no name is provided for a UMD bundle', options: { output: { format: 'umd' } }, generateError: { diff --git a/test/function/samples/error-parse-json/_config.js b/test/function/samples/error-parse-json/_config.js index 158b3fb0420..d3a36449ac3 100644 --- a/test/function/samples/error-parse-json/_config.js +++ b/test/function/samples/error-parse-json/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_JSON = path.join(__dirname, 'file.json'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws with an extended error message when failing to parse a file with ".json" extension', error: { diff --git a/test/function/samples/error-parse-unknown-extension/_config.js b/test/function/samples/error-parse-unknown-extension/_config.js index a25a275e4d2..ca130f979d0 100644 --- a/test/function/samples/error-parse-unknown-extension/_config.js +++ b/test/function/samples/error-parse-unknown-extension/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_CSS = path.join(__dirname, 'file.css'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws with an extended error message when failing to parse a file without .(m)js extension', error: { diff --git a/test/function/samples/es5-class-called-without-new/_config.js b/test/function/samples/es5-class-called-without-new/_config.js index 988f2c1ba6d..76acf9c94b0 100644 --- a/test/function/samples/es5-class-called-without-new/_config.js +++ b/test/function/samples/es5-class-called-without-new/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not swallow type errors when running constructor functions without "new"' }); diff --git a/test/function/samples/escape-arguments/_config.js b/test/function/samples/escape-arguments/_config.js index ac0b6fbb093..d6a327e57a5 100644 --- a/test/function/samples/escape-arguments/_config.js +++ b/test/function/samples/escape-arguments/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not use "arguments" as a placeholder variable for a default export', exports(exports) { assert.deepStrictEqual(exports, { foo: { __proto__: null, default: 42 } }); diff --git a/test/function/samples/export-all-from-external/_config.js b/test/function/samples/export-all-from-external/_config.js index e9a11b03916..20a52edb094 100644 --- a/test/function/samples/export-all-from-external/_config.js +++ b/test/function/samples/export-all-from-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows `export *` from external module, internally', options: { external: ['path'] diff --git a/test/function/samples/export-all-multiple/_config.js b/test/function/samples/export-all-multiple/_config.js index aaee6530d60..8fac9a0598d 100644 --- a/test/function/samples/export-all-multiple/_config.js +++ b/test/function/samples/export-all-multiple/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows multiple export * statements' }); diff --git a/test/function/samples/export-all/_config.js b/test/function/samples/export-all/_config.js index 77ccaf442ab..8afb75446b8 100644 --- a/test/function/samples/export-all/_config.js +++ b/test/function/samples/export-all/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows export *' }); diff --git a/test/function/samples/export-and-import-reference-share-var/_config.js b/test/function/samples/export-and-import-reference-share-var/_config.js index 8785b945b01..f68560540d1 100644 --- a/test/function/samples/export-and-import-reference-share-var/_config.js +++ b/test/function/samples/export-and-import-reference-share-var/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows export and import reference to share name', exports(exports) { assert.equal(exports.b, 9); diff --git a/test/function/samples/export-as/_config.js b/test/function/samples/export-as/_config.js index ad07972c1af..a9bb4b25e06 100644 --- a/test/function/samples/export-as/_config.js +++ b/test/function/samples/export-as/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows export { x as y }' }); diff --git a/test/function/samples/export-deconflicted-names/_config.js b/test/function/samples/export-deconflicted-names/_config.js index 3cc6b7c65ed..00393c19e77 100644 --- a/test/function/samples/export-deconflicted-names/_config.js +++ b/test/function/samples/export-deconflicted-names/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly exports deconflicted names', exports(exports) { assert.equal(exports.bar(), 'bar'); diff --git a/test/function/samples/export-default-anonymous-function/_config.js b/test/function/samples/export-default-anonymous-function/_config.js index ec2254c2402..a01760d97b0 100644 --- a/test/function/samples/export-default-anonymous-function/_config.js +++ b/test/function/samples/export-default-anonymous-function/_config.js @@ -1,7 +1,7 @@ const { readFileSync } = require('node:fs'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports an anonymous function with custom ID resolver', // yeah, this is a real edge case options: { plugins: [ diff --git a/test/function/samples/export-default-as-b/_config.js b/test/function/samples/export-default-as-b/_config.js index 4efcde241e6..9755f45e3c8 100644 --- a/test/function/samples/export-default-as-b/_config.js +++ b/test/function/samples/export-default-as-b/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports default-as-named from sibling module (b)' }); diff --git a/test/function/samples/export-default-as-c/_config.js b/test/function/samples/export-default-as-c/_config.js index 8ab6f87c2d4..941a5f01610 100644 --- a/test/function/samples/export-default-as-c/_config.js +++ b/test/function/samples/export-default-as-c/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports default-as-named from sibling module (c)', exports(exports) { assert.equal(exports.namespace.baz, 'BAZ'); diff --git a/test/function/samples/export-default-as/_config.js b/test/function/samples/export-default-as/_config.js index 81dbee4edc3..5ab369b8ed4 100644 --- a/test/function/samples/export-default-as/_config.js +++ b/test/function/samples/export-default-as/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports default-as-named from sibling module', exports(exports) { assert.equal(exports.foo, 'FOO'); diff --git a/test/function/samples/export-default-exported-id/_config.js b/test/function/samples/export-default-exported-id/_config.js index eb4b53d2de6..cd35ba842a4 100644 --- a/test/function/samples/export-default-exported-id/_config.js +++ b/test/function/samples/export-default-exported-id/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports an id that is also a default export', options: { output: { exports: 'named' } diff --git a/test/function/samples/export-default-expression/_config.js b/test/function/samples/export-default-expression/_config.js index f8711bb06cb..49325dbe0ed 100644 --- a/test/function/samples/export-default-expression/_config.js +++ b/test/function/samples/export-default-expression/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports a default value as module.exports', exports(exports) { assert.equal(exports, 42); diff --git a/test/function/samples/export-default-from-external/_config.js b/test/function/samples/export-default-from-external/_config.js index 3b8c581343d..1d539072e3b 100644 --- a/test/function/samples/export-default-from-external/_config.js +++ b/test/function/samples/export-default-from-external/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ensures external modules have correct names', options: { external: ['path'] diff --git a/test/function/samples/export-default-named-function/_config.js b/test/function/samples/export-default-named-function/_config.js index a64abdc5da9..1cb4ade0599 100644 --- a/test/function/samples/export-default-named-function/_config.js +++ b/test/function/samples/export-default-named-function/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports a default named function', exports(exports) { assert.equal(exports(), 42); diff --git a/test/function/samples/export-default-no-space/_config.js b/test/function/samples/export-default-no-space/_config.js index 16d15e7687e..3cbc2cd9ec9 100644 --- a/test/function/samples/export-default-no-space/_config.js +++ b/test/function/samples/export-default-no-space/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles default exports with no space before declaration', exports: exports => { assert.deepEqual(exports, {}); diff --git a/test/function/samples/export-destruction/_config.js b/test/function/samples/export-destruction/_config.js index a0c90f30722..67e9ef50538 100644 --- a/test/function/samples/export-destruction/_config.js +++ b/test/function/samples/export-destruction/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handle destruction patterns in export declarations', exports(exports) { diff --git a/test/function/samples/export-from-default-renamed/_config.js b/test/function/samples/export-from-default-renamed/_config.js index 81e18d299bd..248b8bff2c2 100644 --- a/test/function/samples/export-from-default-renamed/_config.js +++ b/test/function/samples/export-from-default-renamed/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'export from works with multiple renamed default exports' }); diff --git a/test/function/samples/export-from-default/_config.js b/test/function/samples/export-from-default/_config.js index b3bd8cf3acd..1c69852f27c 100644 --- a/test/function/samples/export-from-default/_config.js +++ b/test/function/samples/export-from-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'export from works with default exports' }); diff --git a/test/function/samples/export-from-external/_config.js b/test/function/samples/export-from-external/_config.js index 8ed2511c620..e389acb7a46 100644 --- a/test/function/samples/export-from-external/_config.js +++ b/test/function/samples/export-from-external/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports directly from an external module', options: { external: ['path'] diff --git a/test/function/samples/export-from-internal-module/_config.js b/test/function/samples/export-from-internal-module/_config.js index 4b7c61dbd68..f9435024a18 100644 --- a/test/function/samples/export-from-internal-module/_config.js +++ b/test/function/samples/export-from-internal-module/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports from an internal module', exports(exports) { assert.equal(exports.foo, 42); diff --git a/test/function/samples/export-from-multiple-no-default-conflict/_config.js b/test/function/samples/export-from-multiple-no-default-conflict/_config.js index 099230571ab..a40476decb8 100644 --- a/test/function/samples/export-from-multiple-no-default-conflict/_config.js +++ b/test/function/samples/export-from-multiple-no-default-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'export from does not cause erroneous warning if multiple modules export default', warnings: [], exports: exports => { diff --git a/test/function/samples/export-from-no-local-binding-var/_config.js b/test/function/samples/export-from-no-local-binding-var/_config.js index e2376c08bec..7857a2c5270 100644 --- a/test/function/samples/export-from-no-local-binding-var/_config.js +++ b/test/function/samples/export-from-no-local-binding-var/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'export from does not create a local binding', runtimeError(error) { assert.ok(/foo is not defined/.test(error.message)); diff --git a/test/function/samples/export-from-no-local-binding/_config.js b/test/function/samples/export-from-no-local-binding/_config.js index bf66df9a15d..b4d3d6a524b 100644 --- a/test/function/samples/export-from-no-local-binding/_config.js +++ b/test/function/samples/export-from-no-local-binding/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'export from does not create a local binding' }); diff --git a/test/function/samples/export-from-renamed/_config.js b/test/function/samples/export-from-renamed/_config.js index 2d02dbdb691..e22fd52dff8 100644 --- a/test/function/samples/export-from-renamed/_config.js +++ b/test/function/samples/export-from-renamed/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows export { x as y } from ...', exports(exports) { assert.equal(exports.y, 42); diff --git a/test/function/samples/export-from-with-definition-conflict/_config.js b/test/function/samples/export-from-with-definition-conflict/_config.js index e032561e035..64b549c6ad0 100644 --- a/test/function/samples/export-from-with-definition-conflict/_config.js +++ b/test/function/samples/export-from-with-definition-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ignores conflict between local definitions and export from declaration', exports(exports) { assert.equal(exports.foo, 'a-bar'); diff --git a/test/function/samples/export-from-with-import-conflict/_config.js b/test/function/samples/export-from-with-import-conflict/_config.js index 2510aeb84bd..cade051df75 100644 --- a/test/function/samples/export-from-with-import-conflict/_config.js +++ b/test/function/samples/export-from-with-import-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ignores conflict between import declaration and export from declaration', exports(exports) { assert.equal(exports.foo, 'a-bar'); diff --git a/test/function/samples/export-global/_config.js b/test/function/samples/export-global/_config.js index f2a7907390f..888caf9ae95 100644 --- a/test/function/samples/export-global/_config.js +++ b/test/function/samples/export-global/_config.js @@ -5,7 +5,7 @@ const assert = require('node:assert'); // see https://github.com/acornjs/acorn/issues/806 // Consider reverting this change should this become an acorn option -module.exports = defineRollupTest({ +module.exports = defineTest({ description: '"variables corresponding to globals can be exported"', exports(exports) { diff --git a/test/function/samples/export-not-at-top-level-fails/_config.js b/test/function/samples/export-not-at-top-level-fails/_config.js index 9eba6b8b2ed..74eca72d482 100644 --- a/test/function/samples/export-not-at-top-level-fails/_config.js +++ b/test/function/samples/export-not-at-top-level-fails/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disallows non-top-level exports', error: { cause: { diff --git a/test/function/samples/export-two-ways-default-b/_config.js b/test/function/samples/export-two-ways-default-b/_config.js index f7686b7418d..15cadf2373c 100644 --- a/test/function/samples/export-two-ways-default-b/_config.js +++ b/test/function/samples/export-two-ways-default-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'side-effects are preserved if subject is exported in multiple ways, even if default export has no direct link to original (#733)' }); diff --git a/test/function/samples/export-two-ways-default/_config.js b/test/function/samples/export-two-ways-default/_config.js index 8d2fb98187e..7633a12e50e 100644 --- a/test/function/samples/export-two-ways-default/_config.js +++ b/test/function/samples/export-two-ways-default/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'side-effects are preserved if subject is exported in multiple ways (#733)' }); diff --git a/test/function/samples/export-two-ways-function/_config.js b/test/function/samples/export-two-ways-function/_config.js index 878a2c08e82..3c6145a4791 100644 --- a/test/function/samples/export-two-ways-function/_config.js +++ b/test/function/samples/export-two-ways-function/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports the same function more than one way (#648)', exports(exports) { assert.equal(exports.foo, exports.bar); diff --git a/test/function/samples/export-two-ways/_config.js b/test/function/samples/export-two-ways/_config.js index ddffc91fca4..eea2c7b07c6 100644 --- a/test/function/samples/export-two-ways/_config.js +++ b/test/function/samples/export-two-ways/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports the same binding more than one way', exports(exports) { assert.equal(exports.a, 2); diff --git a/test/function/samples/export-type-mismatch-b/_config.js b/test/function/samples/export-type-mismatch-b/_config.js index fbddfae62f6..548ede76828 100644 --- a/test/function/samples/export-type-mismatch-b/_config.js +++ b/test/function/samples/export-type-mismatch-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'export type must be auto, default, named or none', options: { output: { exports: 'blah' } }, generateError: { diff --git a/test/function/samples/export-type-mismatch-c/_config.js b/test/function/samples/export-type-mismatch-c/_config.js index 972cca25e58..be7b3966ac7 100644 --- a/test/function/samples/export-type-mismatch-c/_config.js +++ b/test/function/samples/export-type-mismatch-c/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'cannot have named exports if explicit export type is default', options: { output: { exports: 'none' } }, generateError: { diff --git a/test/function/samples/export-type-mismatch/_config.js b/test/function/samples/export-type-mismatch/_config.js index c73f83ec68c..ff7f55fb83b 100644 --- a/test/function/samples/export-type-mismatch/_config.js +++ b/test/function/samples/export-type-mismatch/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'cannot have named exports if explicit export type is default', options: { output: { exports: 'default' } }, generateError: { diff --git a/test/function/samples/exports-flag-allowed-in-options/_config.js b/test/function/samples/exports-flag-allowed-in-options/_config.js index 7552aac27a0..4ec097478a8 100644 --- a/test/function/samples/exports-flag-allowed-in-options/_config.js +++ b/test/function/samples/exports-flag-allowed-in-options/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports flag is passed through to bundle options', options: { output: { exports: 'named' } diff --git a/test/function/samples/exports-named-values/_config.js b/test/function/samples/exports-named-values/_config.js index 11d1718f551..c14ac2da2a4 100644 --- a/test/function/samples/exports-named-values/_config.js +++ b/test/function/samples/exports-named-values/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exports named values from the bundle entry module', exports(exports) { assert.equal(exports.answer, 42); diff --git a/test/function/samples/external-alias-parent/_config.js b/test/function/samples/external-alias-parent/_config.js index 9394384c818..00ce290e63c 100644 --- a/test/function/samples/external-alias-parent/_config.js +++ b/test/function/samples/external-alias-parent/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes an external module included dynamically by an alias', options: { input: path.join(__dirname, 'first', 'main.js'), diff --git a/test/function/samples/external-alias/_config.js b/test/function/samples/external-alias/_config.js index c3caecbb970..179e6d925d8 100644 --- a/test/function/samples/external-alias/_config.js +++ b/test/function/samples/external-alias/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes an external module included dynamically by an alias', options: { input: path.join(__dirname, 'first', 'main.js'), diff --git a/test/function/samples/external-conflict/_config.js b/test/function/samples/external-conflict/_config.js index d04ff8e652b..372c4c7c5d9 100644 --- a/test/function/samples/external-conflict/_config.js +++ b/test/function/samples/external-conflict/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external paths from custom resolver remain external (#633)', options: { external: (_id, parent) => parent === 'dep', diff --git a/test/function/samples/external-directory-import/_config.js b/test/function/samples/external-directory-import/_config.js index 9a622aed456..ca23b880156 100644 --- a/test/function/samples/external-directory-import/_config.js +++ b/test/function/samples/external-directory-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles using ../ as external import (#4349)', options: { external() { diff --git a/test/function/samples/external-dynamic-import-live-binding-compact/_config.js b/test/function/samples/external-dynamic-import-live-binding-compact/_config.js index 44f31ea35f7..9601e9279e4 100644 --- a/test/function/samples/external-dynamic-import-live-binding-compact/_config.js +++ b/test/function/samples/external-dynamic-import-live-binding-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports external dynamic imports with live bindings in compact mode', options: { external() { diff --git a/test/function/samples/external-dynamic-import-live-binding/_config.js b/test/function/samples/external-dynamic-import-live-binding/_config.js index cf26e171146..8c77233964c 100644 --- a/test/function/samples/external-dynamic-import-live-binding/_config.js +++ b/test/function/samples/external-dynamic-import-live-binding/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports external dynamic imports with live bindings', options: { external() { diff --git a/test/function/samples/external-entry-point-object/_config.js b/test/function/samples/external-entry-point-object/_config.js index 788c9dac0d9..4618a0f27a5 100644 --- a/test/function/samples/external-entry-point-object/_config.js +++ b/test/function/samples/external-entry-point-object/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for entry points that are resolved as an external object by plugins', options: { plugins: { diff --git a/test/function/samples/external-entry-point/_config.js b/test/function/samples/external-entry-point/_config.js index b07a0441922..bfaa5d82286 100644 --- a/test/function/samples/external-entry-point/_config.js +++ b/test/function/samples/external-entry-point/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for entry points that are resolved as false by plugins', options: { plugins: { diff --git a/test/function/samples/external-function-always-true/_config.js b/test/function/samples/external-function-always-true/_config.js index 55597cc141a..4cf8147cb3d 100644 --- a/test/function/samples/external-function-always-true/_config.js +++ b/test/function/samples/external-function-always-true/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Does not call external for entry point', options: { external(id, parentId) { diff --git a/test/function/samples/external-function/_config.js b/test/function/samples/external-function/_config.js index 61faaf5d14d..b795ca84f90 100644 --- a/test/function/samples/external-function/_config.js +++ b/test/function/samples/external-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows external option to be a function (#522)', options: { external: id => id === 'external' diff --git a/test/function/samples/external-ids-not-resolved/_config.js b/test/function/samples/external-ids-not-resolved/_config.js index 548a101181d..aa1c6979162 100644 --- a/test/function/samples/external-ids-not-resolved/_config.js +++ b/test/function/samples/external-ids-not-resolved/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not attempt to resolve external IDs', options: { external: ['external'], diff --git a/test/function/samples/external-ignore-reserved-null-marker/_config.js b/test/function/samples/external-ignore-reserved-null-marker/_config.js index 6029fc86f77..9af6e35ef9f 100644 --- a/test/function/samples/external-ignore-reserved-null-marker/_config.js +++ b/test/function/samples/external-ignore-reserved-null-marker/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external function ignores \\0 started ids', options: { external(id) { diff --git a/test/function/samples/external-live-binding-compact/_config.js b/test/function/samples/external-live-binding-compact/_config.js index 7252ce8b9ad..f2f087dc7bb 100644 --- a/test/function/samples/external-live-binding-compact/_config.js +++ b/test/function/samples/external-live-binding-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles external live-bindings', options: { external: ['named', 'star'], diff --git a/test/function/samples/external-live-binding/_config.js b/test/function/samples/external-live-binding/_config.js index 217a46af78c..fdfbcd3d435 100644 --- a/test/function/samples/external-live-binding/_config.js +++ b/test/function/samples/external-live-binding/_config.js @@ -4,7 +4,7 @@ let named; let star; let defaulted; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles external live-bindings', options: { external: ['named', 'star', 'defaulted'], diff --git a/test/function/samples/external-normalization/_config.js b/test/function/samples/external-normalization/_config.js index 62b57ac1617..94f4a0674bf 100644 --- a/test/function/samples/external-normalization/_config.js +++ b/test/function/samples/external-normalization/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external paths from custom resolver remain external (#633)', options: { external: ['path'], diff --git a/test/function/samples/external-regex-array/_config.js b/test/function/samples/external-regex-array/_config.js index ef61c304202..7e4d1e16d6a 100644 --- a/test/function/samples/external-regex-array/_config.js +++ b/test/function/samples/external-regex-array/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows external option to be an array of regex and strings', options: { external: [/external/, 'other'] diff --git a/test/function/samples/external-regex/_config.js b/test/function/samples/external-regex/_config.js index 5ebb6ebd968..8dc20af4a7b 100644 --- a/test/function/samples/external-regex/_config.js +++ b/test/function/samples/external-regex/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows external option to be a regex', options: { external: /external/ diff --git a/test/function/samples/external-resolve-false/_config.js b/test/function/samples/external-resolve-false/_config.js index ffe8c1aa7a1..51a23830865 100644 --- a/test/function/samples/external-resolve-false/_config.js +++ b/test/function/samples/external-resolve-false/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes an external module with a false resolve return', options: { input: 'main.js', diff --git a/test/function/samples/external-resolved/_config.js b/test/function/samples/external-resolved/_config.js index de01e199aae..9e00a9bac9b 100644 --- a/test/function/samples/external-resolved/_config.js +++ b/test/function/samples/external-resolved/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const testedIds = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'passes both unresolved and resolved ids to the external option', context: { require() { diff --git a/test/function/samples/externally-reassigned-default-exports/_config.js b/test/function/samples/externally-reassigned-default-exports/_config.js index 53fe97d0421..e360e0e8bfc 100644 --- a/test/function/samples/externally-reassigned-default-exports/_config.js +++ b/test/function/samples/externally-reassigned-default-exports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'calls to externally reassigned methods of default exports must be retained', exports(exports) { let triggered = false; diff --git a/test/function/samples/externally-reassigned-globals/_config.js b/test/function/samples/externally-reassigned-globals/_config.js index 1683a1c0380..387c8ed9793 100644 --- a/test/function/samples/externally-reassigned-globals/_config.js +++ b/test/function/samples/externally-reassigned-globals/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'calls to externally reassigned global methods must be retained', exports(exports) { let triggered1 = false; diff --git a/test/function/samples/externally-reassigned-named-exports/_config.js b/test/function/samples/externally-reassigned-named-exports/_config.js index 0afcde3db77..1ee23f4b552 100644 --- a/test/function/samples/externally-reassigned-named-exports/_config.js +++ b/test/function/samples/externally-reassigned-named-exports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'calls to externally reassigned methods of named exports must be retained', exports(exports) { let triggered1 = false; diff --git a/test/function/samples/externally-reassigned-named-reexports/_config.js b/test/function/samples/externally-reassigned-named-reexports/_config.js index 6ffff45daa6..15fab6b87eb 100644 --- a/test/function/samples/externally-reassigned-named-reexports/_config.js +++ b/test/function/samples/externally-reassigned-named-reexports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'calls to externally reassigned methods of named reexports must be retained', exports(exports) { let triggered = false; diff --git a/test/function/samples/externally-reassigned-star-reexports/_config.js b/test/function/samples/externally-reassigned-star-reexports/_config.js index 61aef7b4f37..c726c1ae3e4 100644 --- a/test/function/samples/externally-reassigned-star-reexports/_config.js +++ b/test/function/samples/externally-reassigned-star-reexports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'calls to externally reassigned methods of namespace reexports must be retained', exports(exports) { let triggered = false; diff --git a/test/function/samples/facade-reexports/_config.js b/test/function/samples/facade-reexports/_config.js index d60aee59842..4144e6becf4 100644 --- a/test/function/samples/facade-reexports/_config.js +++ b/test/function/samples/facade-reexports/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles reexports when creating a facade chunk and transitive dependencies are not hoisted', options: { diff --git a/test/function/samples/fallback-on-warn/_config.js b/test/function/samples/fallback-on-warn/_config.js index 756868384b2..78737c182a3 100644 --- a/test/function/samples/fallback-on-warn/_config.js +++ b/test/function/samples/fallback-on-warn/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); let oldConsoleWarn; const warnings = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'logs as a fallback if no onwarn handler is provided', options: { onwarn: null diff --git a/test/function/samples/file-and-dir/_config.js b/test/function/samples/file-and-dir/_config.js index 836beb038cd..80213977ca9 100644 --- a/test/function/samples/file-and-dir/_config.js +++ b/test/function/samples/file-and-dir/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using both the file and the dir option', options: { output: { file: 'bundle.js', dir: 'dist' } diff --git a/test/function/samples/for-in-accessors/_config.js b/test/function/samples/for-in-accessors/_config.js index 80e0bfe2d3f..74c22c4655b 100644 --- a/test/function/samples/for-in-accessors/_config.js +++ b/test/function/samples/for-in-accessors/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes "this" for accessors triggered by for-in loops' }); diff --git a/test/function/samples/for-in-loop-head-dependencies/_config.js b/test/function/samples/for-in-loop-head-dependencies/_config.js index f26516e7b6a..98cc663fd7d 100644 --- a/test/function/samples/for-in-loop-head-dependencies/_config.js +++ b/test/function/samples/for-in-loop-head-dependencies/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses parent scope for right-hand-side in for-in statement (#1480)' }); diff --git a/test/function/samples/for-loop-head-dependencies/_config.js b/test/function/samples/for-loop-head-dependencies/_config.js index 054befebc0b..b215e966462 100644 --- a/test/function/samples/for-loop-head-dependencies/_config.js +++ b/test/function/samples/for-loop-head-dependencies/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses correct scope in for statement (#1538)' }); diff --git a/test/function/samples/for-loop-parameter/_config.js b/test/function/samples/for-loop-parameter/_config.js index a363f561e99..5b608c21d64 100644 --- a/test/function/samples/for-loop-parameter/_config.js +++ b/test/function/samples/for-loop-parameter/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes for-loop parameters', exports({ checkObject, checkArray }) { assert.strictEqual(checkObject({ foo: 1 }), 1, 'object'); diff --git a/test/function/samples/for-loops-as-assignments/_config.js b/test/function/samples/for-loops-as-assignments/_config.js index 317d6a9338c..1b166fb4b5d 100644 --- a/test/function/samples/for-loops-as-assignments/_config.js +++ b/test/function/samples/for-loops-as-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'make sure for loops are counted as variable assignments (#2199)' }); diff --git a/test/function/samples/for-of-accessors/_config.js b/test/function/samples/for-of-accessors/_config.js index 59af0ced9aa..768c251a6c8 100644 --- a/test/function/samples/for-of-accessors/_config.js +++ b/test/function/samples/for-of-accessors/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes "this" for accessors triggered by for-of loops' }); diff --git a/test/function/samples/for-of-loop-head-dependencies/_config.js b/test/function/samples/for-of-loop-head-dependencies/_config.js index 9c8f8e0f51d..10a5199dde4 100644 --- a/test/function/samples/for-of-loop-head-dependencies/_config.js +++ b/test/function/samples/for-of-loop-head-dependencies/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses parent scope for right-hand-side in for-of statement (#1539)' }); diff --git a/test/function/samples/for-of-with-in-operator/_config.js b/test/function/samples/for-of-with-in-operator/_config.js index eed462dc2ab..cde77532f9c 100644 --- a/test/function/samples/for-of-with-in-operator/_config.js +++ b/test/function/samples/for-of-with-in-operator/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles using the in operator in the iterator of a for-of loop (#2337)' }); diff --git a/test/function/samples/function-asm-directive/_config.js b/test/function/samples/function-asm-directive/_config.js index 240e0df797b..b1180a59f11 100644 --- a/test/function/samples/function-asm-directive/_config.js +++ b/test/function/samples/function-asm-directive/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: "shouldn't delete use asm from the start of a function body", code(code) { assert.notEqual(code.indexOf('use asm'), -1); diff --git a/test/function/samples/function-directive-not-first/_config.js b/test/function/samples/function-directive-not-first/_config.js index 8d753cb7430..7a4a593c3c9 100644 --- a/test/function/samples/function-directive-not-first/_config.js +++ b/test/function/samples/function-directive-not-first/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'should delete use asm from function body if it is not the first expression', code(code) { assert.ok(!code.includes('use asm')); diff --git a/test/function/samples/function-expressions-simplified-to-statement/_config.js b/test/function/samples/function-expressions-simplified-to-statement/_config.js index a879cda01c0..46403b4721d 100644 --- a/test/function/samples/function-expressions-simplified-to-statement/_config.js +++ b/test/function/samples/function-expressions-simplified-to-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly handles function expressions which are simplified to statements' }); diff --git a/test/function/samples/function-getter-side-effects/_config.js b/test/function/samples/function-getter-side-effects/_config.js index 10de92c833c..54e6d953558 100644 --- a/test/function/samples/function-getter-side-effects/_config.js +++ b/test/function/samples/function-getter-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects getters created on functions' }); diff --git a/test/function/samples/function-side-effects/_config.js b/test/function/samples/function-side-effects/_config.js index c6515c26ef3..5752f688a50 100644 --- a/test/function/samples/function-side-effects/_config.js +++ b/test/function/samples/function-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'assumes functions may mutate objects passed in' }); diff --git a/test/function/samples/function-use-strict-directive-removed/_config.js b/test/function/samples/function-use-strict-directive-removed/_config.js index 53aa543994a..412c158b82f 100644 --- a/test/function/samples/function-use-strict-directive-removed/_config.js +++ b/test/function/samples/function-use-strict-directive-removed/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'should delete use strict from function body', code(code) { assert.equal(code.lastIndexOf('use strict'), 1); diff --git a/test/function/samples/functions-renamed-correctly/_config.js b/test/function/samples/functions-renamed-correctly/_config.js index 3f38d599a21..c9824eb0d8f 100644 --- a/test/function/samples/functions-renamed-correctly/_config.js +++ b/test/function/samples/functions-renamed-correctly/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renames function expression IDs correctly' }); diff --git a/test/function/samples/generate-bundle-mutation/_config.js b/test/function/samples/generate-bundle-mutation/_config.js index affdff67041..83085e18144 100644 --- a/test/function/samples/generate-bundle-mutation/_config.js +++ b/test/function/samples/generate-bundle-mutation/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles adding or deleting symbols in generateBundle', options: { plugins: [ diff --git a/test/function/samples/globally-called-modifying-function/_config.js b/test/function/samples/globally-called-modifying-function/_config.js index 4232cc854ca..b4b847d500a 100644 --- a/test/function/samples/globally-called-modifying-function/_config.js +++ b/test/function/samples/globally-called-modifying-function/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'globally called function should be included if it modifies an exported value (#112)' }); diff --git a/test/function/samples/handle-calling-uncallable/_config.js b/test/function/samples/handle-calling-uncallable/_config.js index 44977d2be35..0f3939a476b 100644 --- a/test/function/samples/handle-calling-uncallable/_config.js +++ b/test/function/samples/handle-calling-uncallable/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not give cryptic error when calling uncallable things (#1257)' }); diff --git a/test/function/samples/handle-labels-inside-functions/_config.js b/test/function/samples/handle-labels-inside-functions/_config.js index 9f0ca3e60be..35cd1299978 100644 --- a/test/function/samples/handle-labels-inside-functions/_config.js +++ b/test/function/samples/handle-labels-inside-functions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not fail when using labels inside functions (#1706)' }); diff --git a/test/function/samples/handle-missing-export-source/_config.js b/test/function/samples/handle-missing-export-source/_config.js index e1437b95d5c..80f965ccb04 100644 --- a/test/function/samples/handle-missing-export-source/_config.js +++ b/test/function/samples/handle-missing-export-source/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not fail if a pre-generated AST is omitting the source property of an unused named export (#3210)', options: { diff --git a/test/function/samples/handle-object-rest-spread-patterns/_config.js b/test/function/samples/handle-object-rest-spread-patterns/_config.js index 47c1ab57d2b..d0f87e8bd68 100644 --- a/test/function/samples/handle-object-rest-spread-patterns/_config.js +++ b/test/function/samples/handle-object-rest-spread-patterns/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles properties created by an object rest spread operator' }); diff --git a/test/function/samples/handle-object-rest-spread-properties/_config.js b/test/function/samples/handle-object-rest-spread-properties/_config.js index 47c1ab57d2b..d0f87e8bd68 100644 --- a/test/function/samples/handle-object-rest-spread-properties/_config.js +++ b/test/function/samples/handle-object-rest-spread-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles properties created by an object rest spread operator' }); diff --git a/test/function/samples/handle-object-rest-spread-reassigments/_config.js b/test/function/samples/handle-object-rest-spread-reassigments/_config.js index 47c1ab57d2b..d0f87e8bd68 100644 --- a/test/function/samples/handle-object-rest-spread-reassigments/_config.js +++ b/test/function/samples/handle-object-rest-spread-reassigments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles properties created by an object rest spread operator' }); diff --git a/test/function/samples/handle-statically-resolvable-if-statements/_config.js b/test/function/samples/handle-statically-resolvable-if-statements/_config.js index 157cdd349b7..7ea2bbd27be 100644 --- a/test/function/samples/handle-statically-resolvable-if-statements/_config.js +++ b/test/function/samples/handle-statically-resolvable-if-statements/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles statically resolvable "if" statements (#2134)', context: { value: 1 diff --git a/test/function/samples/handles-double-declarations/_config.js b/test/function/samples/handles-double-declarations/_config.js index c642f78485c..054fa15679a 100644 --- a/test/function/samples/handles-double-declarations/_config.js +++ b/test/function/samples/handles-double-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not fail for double declarations with initializers from other modules' }); diff --git a/test/function/samples/handles-empty-string-sourcemap-mappings/_config.js b/test/function/samples/handles-empty-string-sourcemap-mappings/_config.js index 1233b4410ff..1e6ea8a6311 100644 --- a/test/function/samples/handles-empty-string-sourcemap-mappings/_config.js +++ b/test/function/samples/handles-empty-string-sourcemap-mappings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles transforms that return sourcemap with empty mappings', options: { diff --git a/test/function/samples/handles-stringified-sourcemaps/_config.js b/test/function/samples/handles-stringified-sourcemaps/_config.js index 8a4b5209c2e..b8a91a55b82 100644 --- a/test/function/samples/handles-stringified-sourcemaps/_config.js +++ b/test/function/samples/handles-stringified-sourcemaps/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles transforms that return stringified source maps (#377)', options: { diff --git a/test/function/samples/has-default-export/_config.js b/test/function/samples/has-default-export/_config.js index 437e0d0db43..c90fb861252 100644 --- a/test/function/samples/has-default-export/_config.js +++ b/test/function/samples/has-default-export/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reports if a module has a default export', options: { plugins: [ diff --git a/test/function/samples/has-modules-array/_config.js b/test/function/samples/has-modules-array/_config.js index 974947aaa94..61bd8a5fd1a 100644 --- a/test/function/samples/has-modules-array/_config.js +++ b/test/function/samples/has-modules-array/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'user-facing bundle has modules array', bundle(bundle) { assert.ok(bundle.cache.modules); diff --git a/test/function/samples/hashing/length-at-non-hash/_config.js b/test/function/samples/hashing/length-at-non-hash/_config.js index ce196bbbb71..2e40dbf8c52 100644 --- a/test/function/samples/hashing/length-at-non-hash/_config.js +++ b/test/function/samples/hashing/length-at-non-hash/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when configuring a length for placeholder other than "hash"', options: { output: { chunkFileNames: '[name:3].js' } }, generateError: { diff --git a/test/function/samples/hashing/maximum-hash-size/_config.js b/test/function/samples/hashing/maximum-hash-size/_config.js index 9739d1cc165..fb8159901df 100644 --- a/test/function/samples/hashing/maximum-hash-size/_config.js +++ b/test/function/samples/hashing/maximum-hash-size/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when the maximum hash size is exceeded', options: { output: { chunkFileNames: '[hash:65].js' } }, generateError: { diff --git a/test/function/samples/hashing/minimum-hash-size/_config.js b/test/function/samples/hashing/minimum-hash-size/_config.js index 985b64d125a..b5500a3be19 100644 --- a/test/function/samples/hashing/minimum-hash-size/_config.js +++ b/test/function/samples/hashing/minimum-hash-size/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when the maximum hash size is exceeded', options: { output: { chunkFileNames: '[hash:3].js' } }, generateError: { diff --git a/test/function/samples/hidden-directories/_config.js b/test/function/samples/hidden-directories/_config.js index 75981479263..d8927e53f72 100644 --- a/test/function/samples/hidden-directories/_config.js +++ b/test/function/samples/hidden-directories/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows imports from directories with leading "." character' }); diff --git a/test/function/samples/hoisted-variable-if-else/_config.js b/test/function/samples/hoisted-variable-if-else/_config.js index 44dfa1e02a2..16dce08e17c 100644 --- a/test/function/samples/hoisted-variable-if-else/_config.js +++ b/test/function/samples/hoisted-variable-if-else/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles hoisted variables in chained if statements', exports(exports) { exports.test(true); diff --git a/test/function/samples/identifiers-in-template-literals/_config.js b/test/function/samples/identifiers-in-template-literals/_config.js index b84d9006a8c..0e5cdcad754 100644 --- a/test/function/samples/identifiers-in-template-literals/_config.js +++ b/test/function/samples/identifiers-in-template-literals/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'identifiers in template literals are rendered correctly' }); diff --git a/test/function/samples/if-statement-insert-whitespace/_config.js b/test/function/samples/if-statement-insert-whitespace/_config.js index 5d543e0a324..ea2b1b462d3 100644 --- a/test/function/samples/if-statement-insert-whitespace/_config.js +++ b/test/function/samples/if-statement-insert-whitespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'inserts necessary white-space when simplifying if-statements (#3419)', options: { external: 'external' diff --git a/test/function/samples/if-statement-with-assignment/_config.js b/test/function/samples/if-statement-with-assignment/_config.js index 3237d776476..2f41d0cbbb4 100644 --- a/test/function/samples/if-statement-with-assignment/_config.js +++ b/test/function/samples/if-statement-with-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'update assignments to names are preserved (#930)' }); diff --git a/test/function/samples/if-statement-with-false-condition/_config.js b/test/function/samples/if-statement-with-false-condition/_config.js index 6c3671e6ef0..19caab3443b 100644 --- a/test/function/samples/if-statement-with-false-condition/_config.js +++ b/test/function/samples/if-statement-with-false-condition/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'if statements with false condition do not break render (#973)' }); diff --git a/test/function/samples/if-statement-with-update/_config.js b/test/function/samples/if-statement-with-update/_config.js index e641f7d7cbe..65771fc03e0 100644 --- a/test/function/samples/if-statement-with-update/_config.js +++ b/test/function/samples/if-statement-with-update/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'updates to names are preserved (#930)' }); diff --git a/test/function/samples/iife-code-splitting/_config.js b/test/function/samples/iife-code-splitting/_config.js index 54be7005e73..5544f274155 100644 --- a/test/function/samples/iife-code-splitting/_config.js +++ b/test/function/samples/iife-code-splitting/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when generating multiple chunks for an IIFE build', options: { output: { format: 'iife' } diff --git a/test/function/samples/iife-comments/_config.js b/test/function/samples/iife-comments/_config.js index 87b230a6fd5..911aadc6933 100644 --- a/test/function/samples/iife-comments/_config.js +++ b/test/function/samples/iife-comments/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not wrongly append comments', exports(exports) { assert.equal(exports, 42); diff --git a/test/function/samples/implicit-dependencies/dependant-dynamic-import-no-effects/_config.js b/test/function/samples/implicit-dependencies/dependant-dynamic-import-no-effects/_config.js index 904c987e8ad..e9ad92105a8 100644 --- a/test/function/samples/implicit-dependencies/dependant-dynamic-import-no-effects/_config.js +++ b/test/function/samples/implicit-dependencies/dependant-dynamic-import-no-effects/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when a module that is loaded before an emitted chunk is fully tree-shaken', options: { plugins: { diff --git a/test/function/samples/implicit-dependencies/dependant-dynamic-import-not-included/_config.js b/test/function/samples/implicit-dependencies/dependant-dynamic-import-not-included/_config.js index dcdfecc6f20..fbc85389ebf 100644 --- a/test/function/samples/implicit-dependencies/dependant-dynamic-import-not-included/_config.js +++ b/test/function/samples/implicit-dependencies/dependant-dynamic-import-not-included/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when a module that is loaded before an emitted chunk is only linked to the module graph via a tree-shaken dynamic import', options: { diff --git a/test/function/samples/implicit-dependencies/dependant-not-part-of-graph/_config.js b/test/function/samples/implicit-dependencies/dependant-not-part-of-graph/_config.js index 758e723780c..1239ea0e146 100644 --- a/test/function/samples/implicit-dependencies/dependant-not-part-of-graph/_config.js +++ b/test/function/samples/implicit-dependencies/dependant-not-part-of-graph/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when a module that is loaded before an emitted chunk is not part of the module graph', options: { diff --git a/test/function/samples/implicit-dependencies/external-dependant/_config.js b/test/function/samples/implicit-dependencies/external-dependant/_config.js index dd58dc1bca0..41d77574084 100644 --- a/test/function/samples/implicit-dependencies/external-dependant/_config.js +++ b/test/function/samples/implicit-dependencies/external-dependant/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when a module that is loaded before an emitted chunk does not exist', options: { plugins: { diff --git a/test/function/samples/implicit-dependencies/missing-dependant/_config.js b/test/function/samples/implicit-dependencies/missing-dependant/_config.js index 0c7bb14aa7f..3b833ff0552 100644 --- a/test/function/samples/implicit-dependencies/missing-dependant/_config.js +++ b/test/function/samples/implicit-dependencies/missing-dependant/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when a module that is loaded before an emitted chunk is external', options: { plugins: { diff --git a/test/function/samples/import-as/_config.js b/test/function/samples/import-as/_config.js index 321d260bc33..d54b17334d1 100644 --- a/test/function/samples/import-as/_config.js +++ b/test/function/samples/import-as/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renames named and default imports' }); diff --git a/test/function/samples/import-assertions/plugin-assertions-this-resolve/_config.js b/test/function/samples/import-assertions/plugin-assertions-this-resolve/_config.js index c6fa3eca5d8..fa8f8b69e1b 100644 --- a/test/function/samples/import-assertions/plugin-assertions-this-resolve/_config.js +++ b/test/function/samples/import-assertions/plugin-assertions-this-resolve/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows plugins to provide assertions for this.resolve', options: { plugins: [ diff --git a/test/function/samples/import-assertions/warn-assertion-conflicts/_config.js b/test/function/samples/import-assertions/warn-assertion-conflicts/_config.js index 75d6cb0138a..45bfe811da1 100644 --- a/test/function/samples/import-assertions/warn-assertion-conflicts/_config.js +++ b/test/function/samples/import-assertions/warn-assertion-conflicts/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns for conflicting import assertions', options: { external: id => id.startsWith('external') diff --git a/test/function/samples/import-binding/_config.js b/test/function/samples/import-binding/_config.js index 3417e291c1d..bb0c9aff598 100644 --- a/test/function/samples/import-binding/_config.js +++ b/test/function/samples/import-binding/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'import binding' }); diff --git a/test/function/samples/import-chain-as/_config.js b/test/function/samples/import-chain-as/_config.js index 7876ede2fcd..e63edbe8fa0 100644 --- a/test/function/samples/import-chain-as/_config.js +++ b/test/function/samples/import-chain-as/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports as- chained exports' }); diff --git a/test/function/samples/import-chain/_config.js b/test/function/samples/import-chain/_config.js index 81190909b32..34b4702f62e 100644 --- a/test/function/samples/import-chain/_config.js +++ b/test/function/samples/import-chain/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports chained exports' }); diff --git a/test/function/samples/import-default-and-named-function/_config.js b/test/function/samples/import-default-and-named-function/_config.js index 00f509a711b..56341431d1c 100644 --- a/test/function/samples/import-default-and-named-function/_config.js +++ b/test/function/samples/import-default-and-named-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports default and named exports in same declaration' }); diff --git a/test/function/samples/import-default-as-named/_config.js b/test/function/samples/import-default-as-named/_config.js index 3b25c3e301a..524fc8bdc2a 100644 --- a/test/function/samples/import-default-as-named/_config.js +++ b/test/function/samples/import-default-as-named/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a default export by a name' }); diff --git a/test/function/samples/import-default-as-other/_config.js b/test/function/samples/import-default-as-other/_config.js index 635adbacdd5..0223a0de039 100644 --- a/test/function/samples/import-default-as-other/_config.js +++ b/test/function/samples/import-default-as-other/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a default import by another name' }); diff --git a/test/function/samples/import-default-class/_config.js b/test/function/samples/import-default-class/_config.js index 2865045611c..c5b4da3743a 100644 --- a/test/function/samples/import-default-class/_config.js +++ b/test/function/samples/import-default-class/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a default class' }); diff --git a/test/function/samples/import-default-expression/_config.js b/test/function/samples/import-default-expression/_config.js index bbe1f3400c1..24227282531 100644 --- a/test/function/samples/import-default-expression/_config.js +++ b/test/function/samples/import-default-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a default expression' }); diff --git a/test/function/samples/import-default-from-external/_config.js b/test/function/samples/import-default-from-external/_config.js index 4341c0ee3c6..5dc0683e7db 100644 --- a/test/function/samples/import-default-from-external/_config.js +++ b/test/function/samples/import-default-from-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports default from external module', options: { external: ['path'] diff --git a/test/function/samples/import-default-function/_config.js b/test/function/samples/import-default-function/_config.js index db34e3a0980..418b9d421e9 100644 --- a/test/function/samples/import-default-function/_config.js +++ b/test/function/samples/import-default-function/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a default function' }); diff --git a/test/function/samples/import-dependency-in-other-module/_config.js b/test/function/samples/import-dependency-in-other-module/_config.js index cff131dc485..5daebf9f5e3 100644 --- a/test/function/samples/import-dependency-in-other-module/_config.js +++ b/test/function/samples/import-dependency-in-other-module/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a dependency from a separate module' }); diff --git a/test/function/samples/import-dependency-in-same-module/_config.js b/test/function/samples/import-dependency-in-same-module/_config.js index 7f9cc3c9a7c..c77b1524141 100644 --- a/test/function/samples/import-dependency-in-same-module/_config.js +++ b/test/function/samples/import-dependency-in-same-module/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a dependency from the same module' }); diff --git a/test/function/samples/import-empty-from-external/_config.js b/test/function/samples/import-empty-from-external/_config.js index d9a0c2ad980..0727f120eed 100644 --- a/test/function/samples/import-empty-from-external/_config.js +++ b/test/function/samples/import-empty-from-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports external module for side effects', context: { // override require here, making "foo" appear as a global module diff --git a/test/function/samples/import-meta-url/_config.js b/test/function/samples/import-meta-url/_config.js index 472bc4adfac..e64f382480d 100644 --- a/test/function/samples/import-meta-url/_config.js +++ b/test/function/samples/import-meta-url/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const URL = require('node:url').URL; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'resolves import.meta.url', context: { __filename: path.join(__dirname, 'main.js') diff --git a/test/function/samples/import-named-class/_config.js b/test/function/samples/import-named-class/_config.js index c96404ca8c8..df42f64087a 100644 --- a/test/function/samples/import-named-class/_config.js +++ b/test/function/samples/import-named-class/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a named class' }); diff --git a/test/function/samples/import-named-from-external/_config.js b/test/function/samples/import-named-from-external/_config.js index 000c289389e..2c57d1a22b8 100644 --- a/test/function/samples/import-named-from-external/_config.js +++ b/test/function/samples/import-named-from-external/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports names from an external module', options: { external: ['path'] diff --git a/test/function/samples/import-named-function-as-other/_config.js b/test/function/samples/import-named-function-as-other/_config.js index 1902fdc0c2a..84d41aadf42 100644 --- a/test/function/samples/import-named-function-as-other/_config.js +++ b/test/function/samples/import-named-function-as-other/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a named function by another name' }); diff --git a/test/function/samples/import-named-function/_config.js b/test/function/samples/import-named-function/_config.js index cf3ba361163..6563ac91667 100644 --- a/test/function/samples/import-named-function/_config.js +++ b/test/function/samples/import-named-function/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a named function' }); diff --git a/test/function/samples/import-nameless-class-expression/_config.js b/test/function/samples/import-nameless-class-expression/_config.js index 4b489907533..93771bba1ad 100644 --- a/test/function/samples/import-nameless-class-expression/_config.js +++ b/test/function/samples/import-nameless-class-expression/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a nameless class expression' }); diff --git a/test/function/samples/import-namespace-from-external-module-renamed/_config.js b/test/function/samples/import-namespace-from-external-module-renamed/_config.js index 2072ac656f2..7ac860b7dc8 100644 --- a/test/function/samples/import-namespace-from-external-module-renamed/_config.js +++ b/test/function/samples/import-namespace-from-external-module-renamed/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a namespace from an external module and renames it', options: { external: ['path'] diff --git a/test/function/samples/import-namespace-from-external-module/_config.js b/test/function/samples/import-namespace-from-external-module/_config.js index 24fc2f099d8..5590999a6a8 100644 --- a/test/function/samples/import-namespace-from-external-module/_config.js +++ b/test/function/samples/import-namespace-from-external-module/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a namespace from an external module', options: { external: ['path'] diff --git a/test/function/samples/import-namespace-from-internal-module-renamed/_config.js b/test/function/samples/import-namespace-from-internal-module-renamed/_config.js index eb32960e7c7..80097934062 100644 --- a/test/function/samples/import-namespace-from-internal-module-renamed/_config.js +++ b/test/function/samples/import-namespace-from-internal-module-renamed/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly exports x as y inside a bundle' }); diff --git a/test/function/samples/import-namespace-from-internal-module/_config.js b/test/function/samples/import-namespace-from-internal-module/_config.js index fc9bacec8e8..7ce1e566f39 100644 --- a/test/function/samples/import-namespace-from-internal-module/_config.js +++ b/test/function/samples/import-namespace-from-internal-module/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a namespace from an internal module' }); diff --git a/test/function/samples/import-not-at-top-level-fails/_config.js b/test/function/samples/import-not-at-top-level-fails/_config.js index b27f40a73ee..9cf9999a022 100644 --- a/test/function/samples/import-not-at-top-level-fails/_config.js +++ b/test/function/samples/import-not-at-top-level-fails/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disallows non-top-level imports', error: { cause: { diff --git a/test/function/samples/import-of-unexported-fails/_config.js b/test/function/samples/import-of-unexported-fails/_config.js index 95400bc24d3..a50bbaf0664 100644 --- a/test/function/samples/import-of-unexported-fails/_config.js +++ b/test/function/samples/import-of-unexported-fails/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_EMPTY = path.join(__dirname, 'empty.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marking an imported, but unexported, identifier should throw', error: { binding: 'default', diff --git a/test/function/samples/import-var-declaration/_config.js b/test/function/samples/import-var-declaration/_config.js index 05b39fe19b4..f09d8c9eeaa 100644 --- a/test/function/samples/import-var-declaration/_config.js +++ b/test/function/samples/import-var-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports a variable declaration' }); diff --git a/test/function/samples/imports-are-deconflicted-b/_config.js b/test/function/samples/imports-are-deconflicted-b/_config.js index 5f70992aff6..6513e42a50c 100644 --- a/test/function/samples/imports-are-deconflicted-b/_config.js +++ b/test/function/samples/imports-are-deconflicted-b/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts imports (redux)', options: { external: ['path'] diff --git a/test/function/samples/imports-are-deconflicted-c/_config.js b/test/function/samples/imports-are-deconflicted-c/_config.js index fe9f119dc88..4995fb27bd2 100644 --- a/test/function/samples/imports-are-deconflicted-c/_config.js +++ b/test/function/samples/imports-are-deconflicted-c/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts imports, again' }); diff --git a/test/function/samples/imports-are-deconflicted/_config.js b/test/function/samples/imports-are-deconflicted/_config.js index bf746cc2548..bffa735ccd0 100644 --- a/test/function/samples/imports-are-deconflicted/_config.js +++ b/test/function/samples/imports-are-deconflicted/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts imports', options: { external: ['path'] diff --git a/test/function/samples/includes-internally-used-default-export/_config.js b/test/function/samples/includes-internally-used-default-export/_config.js index 62b173a492a..0a2c6c9f02c 100644 --- a/test/function/samples/includes-internally-used-default-export/_config.js +++ b/test/function/samples/includes-internally-used-default-export/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes default exports that are only used internally' }); diff --git a/test/function/samples/includes-reassignments/_config.js b/test/function/samples/includes-reassignments/_config.js index 29ac4443583..bf17b4186f3 100644 --- a/test/function/samples/includes-reassignments/_config.js +++ b/test/function/samples/includes-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes reassignments that are ignored on an initial pass' }); diff --git a/test/function/samples/includes-superclass/_config.js b/test/function/samples/includes-superclass/_config.js index 023343f9b78..aef55b3abe2 100644 --- a/test/function/samples/includes-superclass/_config.js +++ b/test/function/samples/includes-superclass/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes superclass (#932)' }); diff --git a/test/function/samples/inline-dynamic-imports-bundle/_config.js b/test/function/samples/inline-dynamic-imports-bundle/_config.js index 94b7da54831..c5c4a99d7c6 100644 --- a/test/function/samples/inline-dynamic-imports-bundle/_config.js +++ b/test/function/samples/inline-dynamic-imports-bundle/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ignores non-bundled modules when inlining dynamic imports', options: { output: { inlineDynamicImports: true }, diff --git a/test/function/samples/inline-dynamic-no-treeshake/_config.js b/test/function/samples/inline-dynamic-no-treeshake/_config.js index 015e3b43f09..89f7f7caedf 100644 --- a/test/function/samples/inline-dynamic-no-treeshake/_config.js +++ b/test/function/samples/inline-dynamic-no-treeshake/_config.js @@ -1,6 +1,6 @@ const MAGIC_ENTRY = 'main'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles inlining dynamic imports when treeshaking is disabled for modules (#4098)', options: { input: MAGIC_ENTRY, diff --git a/test/function/samples/inline-imports-with-manual/_config.js b/test/function/samples/inline-imports-with-manual/_config.js index e5be54ca54d..df7b34acd33 100644 --- a/test/function/samples/inline-imports-with-manual/_config.js +++ b/test/function/samples/inline-imports-with-manual/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Manual chunks are not supported when inlining dynamic imports', options: { input: ['main.js'], diff --git a/test/function/samples/inline-imports-with-multiple-array/_config.js b/test/function/samples/inline-imports-with-multiple-array/_config.js index 57c205ea934..d2494f70b8a 100644 --- a/test/function/samples/inline-imports-with-multiple-array/_config.js +++ b/test/function/samples/inline-imports-with-multiple-array/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Having multiple inputs in an array is not supported when inlining dynamic imports', options: { input: ['main.js', 'lib.js'], diff --git a/test/function/samples/inline-imports-with-multiple-object/_config.js b/test/function/samples/inline-imports-with-multiple-object/_config.js index adc9cdaf474..bc8dc2150a8 100644 --- a/test/function/samples/inline-imports-with-multiple-object/_config.js +++ b/test/function/samples/inline-imports-with-multiple-object/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Having multiple inputs in an object is not supported when inlining dynamic imports', options: { input: { main: 'main.js', lib: 'lib.js' }, diff --git a/test/function/samples/inlined-dynamic-namespace-compact/_config.js b/test/function/samples/inlined-dynamic-namespace-compact/_config.js index b7f1ca97b3e..46930df80e3 100644 --- a/test/function/samples/inlined-dynamic-namespace-compact/_config.js +++ b/test/function/samples/inlined-dynamic-namespace-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly resolves inlined dynamic namespaces in compact mode', options: { output: { compact: true } }, exports(exports) { diff --git a/test/function/samples/input-name-validation/_config.js b/test/function/samples/input-name-validation/_config.js index 5aa7f4bcc4f..5dc766e619f 100644 --- a/test/function/samples/input-name-validation/_config.js +++ b/test/function/samples/input-name-validation/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for absolute paths as input names', options: { input: { '/test': 'main.js' } diff --git a/test/function/samples/input-name-validation2/_config.js b/test/function/samples/input-name-validation2/_config.js index 56b159f2c18..24f9b5b0a2a 100644 --- a/test/function/samples/input-name-validation2/_config.js +++ b/test/function/samples/input-name-validation2/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for relative paths as input names', options: { input: { './test': 'main.js' } diff --git a/test/function/samples/input-name-validation3/_config.js b/test/function/samples/input-name-validation3/_config.js index 0158d42408c..f7eaa0e73f9 100644 --- a/test/function/samples/input-name-validation3/_config.js +++ b/test/function/samples/input-name-validation3/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for relative paths as input names', options: { input: { '../test': 'main.js' } diff --git a/test/function/samples/instanceof/left-hand-effect/_config.js b/test/function/samples/instanceof/left-hand-effect/_config.js index cce3575e143..20f3087b793 100644 --- a/test/function/samples/instanceof/left-hand-effect/_config.js +++ b/test/function/samples/instanceof/left-hand-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains side effects in the left hand side of instanceof' }); diff --git a/test/function/samples/instanceof/right-hand-effect/_config.js b/test/function/samples/instanceof/right-hand-effect/_config.js index f82459f7dee..16ad2a1dece 100644 --- a/test/function/samples/instanceof/right-hand-effect/_config.js +++ b/test/function/samples/instanceof/right-hand-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains side effects in the right hand side of instanceof' }); diff --git a/test/function/samples/instanceof/used-parameter/_config.js b/test/function/samples/instanceof/used-parameter/_config.js index 3d2c6be0724..b054dd1b8fa 100644 --- a/test/function/samples/instanceof/used-parameter/_config.js +++ b/test/function/samples/instanceof/used-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains instanceof for function parameters' }); diff --git a/test/function/samples/instanceof/used/_config.js b/test/function/samples/instanceof/used/_config.js index 2ff79ad83a2..9056ea08051 100644 --- a/test/function/samples/instanceof/used/_config.js +++ b/test/function/samples/instanceof/used/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains instanceof if it is true' }); diff --git a/test/function/samples/inter-chunk-execution-order/_config.js b/test/function/samples/inter-chunk-execution-order/_config.js index 4984e742b9a..7fa0f55be46 100644 --- a/test/function/samples/inter-chunk-execution-order/_config.js +++ b/test/function/samples/inter-chunk-execution-order/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const execution = { index: 0 }; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'sorts imports between chunks to closely match the actual execution order', context: { execution }, options: { diff --git a/test/function/samples/internal-reexports-from-external/_config.js b/test/function/samples/internal-reexports-from-external/_config.js index f9a0658afc5..88e1dcb3a01 100644 --- a/test/function/samples/internal-reexports-from-external/_config.js +++ b/test/function/samples/internal-reexports-from-external/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const fs = require('node:fs'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports namespaces with external star reexports', options: { external: ['fs', 'path'], diff --git a/test/function/samples/interop-auto-live-bindings/_config.js b/test/function/samples/interop-auto-live-bindings/_config.js index a3016f299ab..7680e514d9f 100644 --- a/test/function/samples/interop-auto-live-bindings/_config.js +++ b/test/function/samples/interop-auto-live-bindings/_config.js @@ -4,7 +4,7 @@ let barCjs = 'bar'; let fooDefault = 'foo'; let barDefault = 'bar'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles interop "auto" with live-bindings support', options: { external: id => id.startsWith('external') || id === 'update', diff --git a/test/function/samples/interop-auto-no-live-bindings/_config.js b/test/function/samples/interop-auto-no-live-bindings/_config.js index 6b58af07863..38031492af8 100644 --- a/test/function/samples/interop-auto-no-live-bindings/_config.js +++ b/test/function/samples/interop-auto-no-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles interop "auto" without live-bindings support', options: { external: id => id.startsWith('external') || id === 'update', diff --git a/test/function/samples/interop-default-conflict/_config.js b/test/function/samples/interop-default-conflict/_config.js index e9244ca4ead..48271360c7b 100644 --- a/test/function/samples/interop-default-conflict/_config.js +++ b/test/function/samples/interop-default-conflict/_config.js @@ -3,7 +3,7 @@ const assert = require('node:assert'); let bar = 'initial bar'; let defaultValue = 'initial foo'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles conflicts with added interop default variables and supports default live bindings', options: { diff --git a/test/function/samples/interop-default-only-named-import/_config.js b/test/function/samples/interop-default-only-named-import/_config.js index 264beef3fac..2b03b54fae3 100644 --- a/test/function/samples/interop-default-only-named-import/_config.js +++ b/test/function/samples/interop-default-only-named-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using a named import with interop "defaultOnly"', options: { external: 'external', diff --git a/test/function/samples/interop-default-only-named-namespace-reexport/_config.js b/test/function/samples/interop-default-only-named-namespace-reexport/_config.js index f9f2678b8e1..ee2ecff0135 100644 --- a/test/function/samples/interop-default-only-named-namespace-reexport/_config.js +++ b/test/function/samples/interop-default-only-named-namespace-reexport/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows reexporting a namespace as a name when interop is "defaultOnly"', options: { external: 'external', diff --git a/test/function/samples/interop-default-only-named-reexport/_config.js b/test/function/samples/interop-default-only-named-reexport/_config.js index 85b5eb54d0e..2c45a5cdbb1 100644 --- a/test/function/samples/interop-default-only-named-reexport/_config.js +++ b/test/function/samples/interop-default-only-named-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when reexporting a namespace with interop "defaultOnly"', options: { external: 'external', diff --git a/test/function/samples/interop-default-only-namespace-import/_config.js b/test/function/samples/interop-default-only-namespace-import/_config.js index fd02835cfc8..c817587da2e 100644 --- a/test/function/samples/interop-default-only-namespace-import/_config.js +++ b/test/function/samples/interop-default-only-namespace-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows importing a namespace when interop is "defaultOnly"', options: { external: 'external', diff --git a/test/function/samples/interop-default-only-namespace-reexport/_config.js b/test/function/samples/interop-default-only-namespace-reexport/_config.js index 9b033100e1c..90522d2ae92 100644 --- a/test/function/samples/interop-default-only-namespace-reexport/_config.js +++ b/test/function/samples/interop-default-only-namespace-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when reexporting a namespace with interop "defaultOnly"', options: { external: 'external', diff --git a/test/function/samples/interop-default-only/_config.js b/test/function/samples/interop-default-only/_config.js index a7511b7f961..1e229dca03b 100644 --- a/test/function/samples/interop-default-only/_config.js +++ b/test/function/samples/interop-default-only/_config.js @@ -4,7 +4,7 @@ let barCjs = 'bar'; let fooDefault = 'foo'; let barDefault = 'bar'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles interop "defaultOnly"', options: { external: id => id.startsWith('external') || id === 'update', diff --git a/test/function/samples/interop-default/_config.js b/test/function/samples/interop-default/_config.js index 33252c147c3..9e97be301ad 100644 --- a/test/function/samples/interop-default/_config.js +++ b/test/function/samples/interop-default/_config.js @@ -4,7 +4,7 @@ let barCjs = 'bar'; let fooDefault = 'foo'; let barDefault = 'bar'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles interop "default" with live-bindings support', options: { external: id => id.startsWith('external') || id === 'update', diff --git a/test/function/samples/interop-esmodule/_config.js b/test/function/samples/interop-esmodule/_config.js index 763e093bdb0..219e1b96223 100644 --- a/test/function/samples/interop-esmodule/_config.js +++ b/test/function/samples/interop-esmodule/_config.js @@ -4,7 +4,7 @@ let barCjs = 'bar'; let fooDefault = 'foo'; let barDefault = 'bar'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles interop "esModule" with live-bindings support', options: { external: id => id.startsWith('external') || id === 'update', diff --git a/test/function/samples/invalid-addon-hook/_config.js b/test/function/samples/invalid-addon-hook/_config.js index 8720d49e17f..685dd940e0f 100644 --- a/test/function/samples/invalid-addon-hook/_config.js +++ b/test/function/samples/invalid-addon-hook/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when providing a non-string value for an addon hook', options: { plugins: { diff --git a/test/function/samples/invalid-default-export-mode/_config.js b/test/function/samples/invalid-default-export-mode/_config.js index d682f9db7c1..bef2235260f 100644 --- a/test/function/samples/invalid-default-export-mode/_config.js +++ b/test/function/samples/invalid-default-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throw for invalid default export mode', options: { output: { diff --git a/test/function/samples/invalid-ignore-list-function/_config.js b/test/function/samples/invalid-ignore-list-function/_config.js index fdc15a12619..48a4611f758 100644 --- a/test/function/samples/invalid-ignore-list-function/_config.js +++ b/test/function/samples/invalid-ignore-list-function/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throw descriptive error if sourcemapIgnoreList-function does not return a boolean', options: { output: { diff --git a/test/function/samples/invalid-interop/_config.js b/test/function/samples/invalid-interop/_config.js index 181cc80f899..2dae351f071 100644 --- a/test/function/samples/invalid-interop/_config.js +++ b/test/function/samples/invalid-interop/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid interop values', options: { external: 'external', diff --git a/test/function/samples/invalid-pattern-replacement/_config.js b/test/function/samples/invalid-pattern-replacement/_config.js index a75e72afbca..31b7448b93d 100644 --- a/test/function/samples/invalid-pattern-replacement/_config.js +++ b/test/function/samples/invalid-pattern-replacement/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid placeholders in patterns', options: { output: { entryFileNames: '[invalid].js' } diff --git a/test/function/samples/invalid-pattern/_config.js b/test/function/samples/invalid-pattern/_config.js index 55961ef090f..26d8f1cde7f 100644 --- a/test/function/samples/invalid-pattern/_config.js +++ b/test/function/samples/invalid-pattern/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid patterns', options: { output: { entryFileNames: '../main.js' } diff --git a/test/function/samples/invalid-property-assignments/_config.js b/test/function/samples/invalid-property-assignments/_config.js index cf323ac0105..430ec38353b 100644 --- a/test/function/samples/invalid-property-assignments/_config.js +++ b/test/function/samples/invalid-property-assignments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes invalid property assignments', context: { globalOther: 'other' }, options: { diff --git a/test/function/samples/invalid-property-calls/_config.js b/test/function/samples/invalid-property-calls/_config.js index 68014c8566a..eca49dda3b0 100644 --- a/test/function/samples/invalid-property-calls/_config.js +++ b/test/function/samples/invalid-property-calls/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes invalid property calls', context: { globalFirst: 'first', globalOther: 'other' }, options: { diff --git a/test/function/samples/invalid-top-level-await/_config.js b/test/function/samples/invalid-top-level-await/_config.js index 9ce8b2aa36c..4586d5a5d62 100644 --- a/test/function/samples/invalid-top-level-await/_config.js +++ b/test/function/samples/invalid-top-level-await/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid top-level-await format', generateError: { code: 'INVALID_TLA_FORMAT', diff --git a/test/function/samples/invalid-transform-source-function/_config.js b/test/function/samples/invalid-transform-source-function/_config.js index a447b2481b3..375e67a57d6 100644 --- a/test/function/samples/invalid-transform-source-function/_config.js +++ b/test/function/samples/invalid-transform-source-function/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throw descriptive error if sourcemapPathTransform-function does not return a string (#3484)', options: { diff --git a/test/function/samples/keep-cjs-dynamic-import/_config.js b/test/function/samples/keep-cjs-dynamic-import/_config.js index 36950461898..1bfa3cc2443 100644 --- a/test/function/samples/keep-cjs-dynamic-import/_config.js +++ b/test/function/samples/keep-cjs-dynamic-import/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps dynamic imports in CJS output by default', options: { external: ['external-esm'] }, async exports({ result }) { diff --git a/test/function/samples/keep-used-imports-from-pure-external-modules/_config.js b/test/function/samples/keep-used-imports-from-pure-external-modules/_config.js index b54b40d7213..b63182345a9 100644 --- a/test/function/samples/keep-used-imports-from-pure-external-modules/_config.js +++ b/test/function/samples/keep-used-imports-from-pure-external-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'imports from pure external modules that are used should not be omitted', options: { external: ['warning'], diff --git a/test/function/samples/labeled-statement-conditional-break/_config.js b/test/function/samples/labeled-statement-conditional-break/_config.js index e5a4e9a4d01..53fd176d78b 100644 --- a/test/function/samples/labeled-statement-conditional-break/_config.js +++ b/test/function/samples/labeled-statement-conditional-break/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles conditional control flow due to labeled statements' }); diff --git a/test/function/samples/legal-import-modification/_config.js b/test/function/samples/legal-import-modification/_config.js index 58029c62520..d53f41da92e 100644 --- a/test/function/samples/legal-import-modification/_config.js +++ b/test/function/samples/legal-import-modification/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'assigning to properties of imported bindings is permitted' }); diff --git a/test/function/samples/legal-suggested-names/_config.js b/test/function/samples/legal-suggested-names/_config.js index 06c96bb3229..3bca1753545 100644 --- a/test/function/samples/legal-suggested-names/_config.js +++ b/test/function/samples/legal-suggested-names/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'illegal name suggestions are ignored' }); diff --git a/test/function/samples/load-module-error/buildEnd/_config.js b/test/function/samples/load-module-error/buildEnd/_config.js index 51ff22c84ba..327db966a4a 100644 --- a/test/function/samples/load-module-error/buildEnd/_config.js +++ b/test/function/samples/load-module-error/buildEnd/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/load-module-error/buildStart/_config.js b/test/function/samples/load-module-error/buildStart/_config.js index 0d4cf41a697..6ea085f42fc 100644 --- a/test/function/samples/load-module-error/buildStart/_config.js +++ b/test/function/samples/load-module-error/buildStart/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/load-module-error/generateBundle/_config.js b/test/function/samples/load-module-error/generateBundle/_config.js index 238e5a609e1..7e17c2b92aa 100644 --- a/test/function/samples/load-module-error/generateBundle/_config.js +++ b/test/function/samples/load-module-error/generateBundle/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/load-module-error/load/_config.js b/test/function/samples/load-module-error/load/_config.js index 1fd437e13c1..298a54b9bc7 100644 --- a/test/function/samples/load-module-error/load/_config.js +++ b/test/function/samples/load-module-error/load/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when a module cannot be loaded', options: { plugins: [ diff --git a/test/function/samples/load-module-error/renderChunk/_config.js b/test/function/samples/load-module-error/renderChunk/_config.js index 7effb36e1b9..dcc254529b6 100644 --- a/test/function/samples/load-module-error/renderChunk/_config.js +++ b/test/function/samples/load-module-error/renderChunk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/load-module-error/renderStart/_config.js b/test/function/samples/load-module-error/renderStart/_config.js index dd2e0519641..4756298ddb4 100644 --- a/test/function/samples/load-module-error/renderStart/_config.js +++ b/test/function/samples/load-module-error/renderStart/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/load-module-error/resolveId/_config.js b/test/function/samples/load-module-error/resolveId/_config.js index 20f0cdf0ed7..9b3390ca35c 100644 --- a/test/function/samples/load-module-error/resolveId/_config.js +++ b/test/function/samples/load-module-error/resolveId/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/load-module-error/transform/_config.js b/test/function/samples/load-module-error/transform/_config.js index 8e3bdf9933c..1c893155d14 100644 --- a/test/function/samples/load-module-error/transform/_config.js +++ b/test/function/samples/load-module-error/transform/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'plugin transform hooks can use `this.error({...}, char)` (#1140)', options: { plugins: [ diff --git a/test/function/samples/load-resolve-dependencies/_config.js b/test/function/samples/load-resolve-dependencies/_config.js index 709e47cb097..6542590fc3d 100644 --- a/test/function/samples/load-resolve-dependencies/_config.js +++ b/test/function/samples/load-resolve-dependencies/_config.js @@ -6,7 +6,7 @@ const ID_THIRD = path.join(__dirname, 'third.js'); const DYNAMIC_IMPORT_PROXY_PREFIX = '\0dynamic-import:'; const chunks = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to wait for dependency resolution in this.load to scan dependency trees', context: { chunks }, async exports(exports) { diff --git a/test/function/samples/load-returns-empty-string/_config.js b/test/function/samples/load-returns-empty-string/_config.js index 03cc33756e4..bfd45a48d10 100644 --- a/test/function/samples/load-returns-empty-string/_config.js +++ b/test/function/samples/load-returns-empty-string/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'loaders are permitted to return the empty string', options: { plugins: [ diff --git a/test/function/samples/load-returns-string-or-null/_config.js b/test/function/samples/load-returns-string-or-null/_config.js index 7bc4a8462ba..fb5a74390f4 100644 --- a/test/function/samples/load-returns-string-or-null/_config.js +++ b/test/function/samples/load-returns-string-or-null/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws error if load returns something wacky', options: { plugins: [ diff --git a/test/function/samples/long-path-deopt/_config.js b/test/function/samples/long-path-deopt/_config.js index f3a702dd506..926f705cb02 100644 --- a/test/function/samples/long-path-deopt/_config.js +++ b/test/function/samples/long-path-deopt/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes getting return expression for long property paths' }); diff --git a/test/function/samples/manual-chunks-conflict/_config.js b/test/function/samples/manual-chunks-conflict/_config.js index 3e6ba986e9b..b5e44eb8c1f 100644 --- a/test/function/samples/manual-chunks-conflict/_config.js +++ b/test/function/samples/manual-chunks-conflict/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Throws for conflicts between manual chunks', options: { input: ['main.js'], diff --git a/test/function/samples/manual-chunks-info/_config.js b/test/function/samples/manual-chunks-info/_config.js index 604ba8bd5d8..6bcbf2c1c01 100644 --- a/test/function/samples/manual-chunks-info/_config.js +++ b/test/function/samples/manual-chunks-info/_config.js @@ -6,7 +6,7 @@ function getId(name) { return path.join(__dirname, `${name}.js`); } -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides additional chunk information to a manualChunks function', options: { external: 'external', diff --git a/test/function/samples/mark-namespace-members/_config.js b/test/function/samples/mark-namespace-members/_config.js index 673c83cc555..9a1d833f06e 100644 --- a/test/function/samples/mark-namespace-members/_config.js +++ b/test/function/samples/mark-namespace-members/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'marks namespace members' }); diff --git a/test/function/samples/max-parallel-file-operations/default/_config.js b/test/function/samples/max-parallel-file-operations/default/_config.js index ea0b8ab2c2f..ac3a1805883 100644 --- a/test/function/samples/max-parallel-file-operations/default/_config.js +++ b/test/function/samples/max-parallel-file-operations/default/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileOps not set', before() { fs.readFile = async (path, options) => { diff --git a/test/function/samples/max-parallel-file-operations/error/_config.js b/test/function/samples/max-parallel-file-operations/error/_config.js index c291b5de73e..ad0dba87566 100644 --- a/test/function/samples/max-parallel-file-operations/error/_config.js +++ b/test/function/samples/max-parallel-file-operations/error/_config.js @@ -4,7 +4,7 @@ const { loader } = require('../../../../utils.js'); const fsReadFile = fs.readFile; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileOps: fileRead error is forwarded', options: { input: 'main', diff --git a/test/function/samples/max-parallel-file-operations/infinity/_config.js b/test/function/samples/max-parallel-file-operations/infinity/_config.js index 837c3184dbc..bbb75a6e53f 100644 --- a/test/function/samples/max-parallel-file-operations/infinity/_config.js +++ b/test/function/samples/max-parallel-file-operations/infinity/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileOps set to infinity', options: { maxParallelFileOps: 0 diff --git a/test/function/samples/max-parallel-file-operations/set/_config.js b/test/function/samples/max-parallel-file-operations/set/_config.js index bfed552f07d..0467b557e07 100644 --- a/test/function/samples/max-parallel-file-operations/set/_config.js +++ b/test/function/samples/max-parallel-file-operations/set/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileOps set to 3', options: { maxParallelFileOps: 3 diff --git a/test/function/samples/max-parallel-file-operations/with-plugin/_config.js b/test/function/samples/max-parallel-file-operations/with-plugin/_config.js index 1abddd357d0..7384959a049 100644 --- a/test/function/samples/max-parallel-file-operations/with-plugin/_config.js +++ b/test/function/samples/max-parallel-file-operations/with-plugin/_config.js @@ -6,7 +6,7 @@ const fsReadFile = fs.readFile; let currentReads = 0; let maxReads = 0; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'maxParallelFileOps with plugin', options: { maxParallelFileOps: 3, diff --git a/test/function/samples/member-expression-assignment-in-function/_config.js b/test/function/samples/member-expression-assignment-in-function/_config.js index 6a1cc72eda3..efec2823c8c 100644 --- a/test/function/samples/member-expression-assignment-in-function/_config.js +++ b/test/function/samples/member-expression-assignment-in-function/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detect side effect in member expression assignment when not top level', code(code) { assert.ok(code.includes('function set(key, value) { foo[key] = value; }'), code); diff --git a/test/function/samples/merged-namespace-live-bindings/_config.js b/test/function/samples/merged-namespace-live-bindings/_config.js index b4fce6aeb3c..cb279471181 100644 --- a/test/function/samples/merged-namespace-live-bindings/_config.js +++ b/test/function/samples/merged-namespace-live-bindings/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects getters when accessing properties of an instance', context: { require(id) { diff --git a/test/function/samples/method-call-mutates-this/_config.js b/test/function/samples/method-call-mutates-this/_config.js index a9e611fb247..2a19ae00979 100644 --- a/test/function/samples/method-call-mutates-this/_config.js +++ b/test/function/samples/method-call-mutates-this/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'method calls are assumed to mutate the owner' }); diff --git a/test/function/samples/method-call-side-effects/_config.js b/test/function/samples/method-call-side-effects/_config.js index b3798c2c48b..364be1ac609 100644 --- a/test/function/samples/method-call-side-effects/_config.js +++ b/test/function/samples/method-call-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'assumes methods may mutate objects passed in, and self' }); diff --git a/test/function/samples/missing-spaces-after-simplification/_config.js b/test/function/samples/missing-spaces-after-simplification/_config.js index 0a3c4dd73e8..d7bd26822d5 100644 --- a/test/function/samples/missing-spaces-after-simplification/_config.js +++ b/test/function/samples/missing-spaces-after-simplification/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handle situations where the simplification of an expression can lead to issues due to missing white-space', options: { treeshake: { tryCatchDeoptimization: false } } diff --git a/test/function/samples/mixed-external-paths/_config.js b/test/function/samples/mixed-external-paths/_config.js index 1db8169568f..79cbf850c41 100644 --- a/test/function/samples/mixed-external-paths/_config.js +++ b/test/function/samples/mixed-external-paths/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows using the path option selectively', options: { external: ['dep-a', 'dep-b'], diff --git a/test/function/samples/modify-assumed-global/_config.js b/test/function/samples/modify-assumed-global/_config.js index 40b22b513e9..3bf2795cce5 100644 --- a/test/function/samples/modify-assumed-global/_config.js +++ b/test/function/samples/modify-assumed-global/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const Math = {}; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'side-effects to assumed globals are included', context: { Math diff --git a/test/function/samples/modify-meta/_config.js b/test/function/samples/modify-meta/_config.js index 65db5c50649..dda6989060b 100644 --- a/test/function/samples/modify-meta/_config.js +++ b/test/function/samples/modify-meta/_config.js @@ -4,7 +4,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); let initialMeta; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to freely modify moduleInfo.meta and maintain object identity', options: { plugins: [ diff --git a/test/function/samples/modify-object-via-this-a/_config.js b/test/function/samples/modify-object-via-this-a/_config.js index 1b75dd84020..c32149fef49 100644 --- a/test/function/samples/modify-object-via-this-a/_config.js +++ b/test/function/samples/modify-object-via-this-a/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks object modification via "this"' }); diff --git a/test/function/samples/modify-object-via-this-b/_config.js b/test/function/samples/modify-object-via-this-b/_config.js index 1b75dd84020..c32149fef49 100644 --- a/test/function/samples/modify-object-via-this-b/_config.js +++ b/test/function/samples/modify-object-via-this-b/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks object modification via "this"' }); diff --git a/test/function/samples/modify-object-via-this-c/_config.js b/test/function/samples/modify-object-via-this-c/_config.js index 1b75dd84020..c32149fef49 100644 --- a/test/function/samples/modify-object-via-this-c/_config.js +++ b/test/function/samples/modify-object-via-this-c/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks object modification via "this"' }); diff --git a/test/function/samples/modify-object-via-this-d/_config.js b/test/function/samples/modify-object-via-this-d/_config.js index 1b75dd84020..c32149fef49 100644 --- a/test/function/samples/modify-object-via-this-d/_config.js +++ b/test/function/samples/modify-object-via-this-d/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks object modification via "this"' }); diff --git a/test/function/samples/modify-this-via-getter/deoptimized-props-with-getter/_config.js b/test/function/samples/modify-this-via-getter/deoptimized-props-with-getter/_config.js index 5f7161b237a..80f4db1bf3b 100644 --- a/test/function/samples/modify-this-via-getter/deoptimized-props-with-getter/_config.js +++ b/test/function/samples/modify-this-via-getter/deoptimized-props-with-getter/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles fully deoptimized objects', context: { require() { diff --git a/test/function/samples/modify-this-via-getter/getter-in-assignment/_config.js b/test/function/samples/modify-this-via-getter/getter-in-assignment/_config.js index 5d16fb52b8a..8fdcc8df131 100644 --- a/test/function/samples/modify-this-via-getter/getter-in-assignment/_config.js +++ b/test/function/samples/modify-this-via-getter/getter-in-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles known getters that are triggered via an assignment' }); diff --git a/test/function/samples/modify-this-via-getter/getters-on-this/_config.js b/test/function/samples/modify-this-via-getter/getters-on-this/_config.js index d14379cfe76..ed16aacef5a 100644 --- a/test/function/samples/modify-this-via-getter/getters-on-this/_config.js +++ b/test/function/samples/modify-this-via-getter/getters-on-this/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles calling getters on "this"' }); diff --git a/test/function/samples/modify-this-via-getter/known-getter/_config.js b/test/function/samples/modify-this-via-getter/known-getter/_config.js index b485fdbbe0f..0808865bde2 100644 --- a/test/function/samples/modify-this-via-getter/known-getter/_config.js +++ b/test/function/samples/modify-this-via-getter/known-getter/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles known getters that modify "this"' }); diff --git a/test/function/samples/modify-this-via-getter/known-super-prop/_config.js b/test/function/samples/modify-this-via-getter/known-super-prop/_config.js index a1603bf6659..79dfc448949 100644 --- a/test/function/samples/modify-this-via-getter/known-super-prop/_config.js +++ b/test/function/samples/modify-this-via-getter/known-super-prop/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles getters that modify "this" on prototypes for known properties' }); diff --git a/test/function/samples/modify-this-via-getter/unknown-prop-getter/_config.js b/test/function/samples/modify-this-via-getter/unknown-prop-getter/_config.js index a586f8eede4..0c7b01133f1 100644 --- a/test/function/samples/modify-this-via-getter/unknown-prop-getter/_config.js +++ b/test/function/samples/modify-this-via-getter/unknown-prop-getter/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles unknown getters that modify "this"', context: { require() { diff --git a/test/function/samples/modify-this-via-getter/unknown-prop-unknown-access/_config.js b/test/function/samples/modify-this-via-getter/unknown-prop-unknown-access/_config.js index e9139e609a0..5ef55c92a2a 100644 --- a/test/function/samples/modify-this-via-getter/unknown-prop-unknown-access/_config.js +++ b/test/function/samples/modify-this-via-getter/unknown-prop-unknown-access/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles unknown getters that modify "this" for unknown property access', context: { require() { diff --git a/test/function/samples/modify-this-via-getter/unknown-property-access/_config.js b/test/function/samples/modify-this-via-getter/unknown-property-access/_config.js index 6817e6dc5a9..bb4f3e89906 100644 --- a/test/function/samples/modify-this-via-getter/unknown-property-access/_config.js +++ b/test/function/samples/modify-this-via-getter/unknown-property-access/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles getters that modify "this" for unknown property access', context: { require() { diff --git a/test/function/samples/modify-this-via-getter/unknown-super-prop/_config.js b/test/function/samples/modify-this-via-getter/unknown-super-prop/_config.js index ede9627fe77..a29f383894e 100644 --- a/test/function/samples/modify-this-via-getter/unknown-super-prop/_config.js +++ b/test/function/samples/modify-this-via-getter/unknown-super-prop/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles getters that modify "this" on prototypes for unknown properties', context: { require() { diff --git a/test/function/samples/modify-this-via-setter/deoptimized-props-with-setter/_config.js b/test/function/samples/modify-this-via-setter/deoptimized-props-with-setter/_config.js index 5f7161b237a..80f4db1bf3b 100644 --- a/test/function/samples/modify-this-via-setter/deoptimized-props-with-setter/_config.js +++ b/test/function/samples/modify-this-via-setter/deoptimized-props-with-setter/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles fully deoptimized objects', context: { require() { diff --git a/test/function/samples/modify-this-via-setter/known-setter/_config.js b/test/function/samples/modify-this-via-setter/known-setter/_config.js index 80ee37e878a..be3a5b32853 100644 --- a/test/function/samples/modify-this-via-setter/known-setter/_config.js +++ b/test/function/samples/modify-this-via-setter/known-setter/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles known setters that modify "this"' }); diff --git a/test/function/samples/modify-this-via-setter/known-super-prop/_config.js b/test/function/samples/modify-this-via-setter/known-super-prop/_config.js index 270e6b6a361..76b842c2941 100644 --- a/test/function/samples/modify-this-via-setter/known-super-prop/_config.js +++ b/test/function/samples/modify-this-via-setter/known-super-prop/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles setters that modify "this" on prototypes for known properties' }); diff --git a/test/function/samples/modify-this-via-setter/unknown-prop-setter/_config.js b/test/function/samples/modify-this-via-setter/unknown-prop-setter/_config.js index 4ab8018bb92..ffb357c57d6 100644 --- a/test/function/samples/modify-this-via-setter/unknown-prop-setter/_config.js +++ b/test/function/samples/modify-this-via-setter/unknown-prop-setter/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles unknown setters that modify "this"', context: { require() { diff --git a/test/function/samples/modify-this-via-setter/unknown-prop-unknown-access/_config.js b/test/function/samples/modify-this-via-setter/unknown-prop-unknown-access/_config.js index 65bd3d2e1bd..70a60fc3168 100644 --- a/test/function/samples/modify-this-via-setter/unknown-prop-unknown-access/_config.js +++ b/test/function/samples/modify-this-via-setter/unknown-prop-unknown-access/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles unknown setters that modify "this" for unknown property access', context: { require() { diff --git a/test/function/samples/modify-this-via-setter/unknown-super-prop/_config.js b/test/function/samples/modify-this-via-setter/unknown-super-prop/_config.js index 934ee7de7c4..bbd4bf974ad 100644 --- a/test/function/samples/modify-this-via-setter/unknown-super-prop/_config.js +++ b/test/function/samples/modify-this-via-setter/unknown-super-prop/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles setters that modify "this" on prototypes for unknown properties', context: { require() { diff --git a/test/function/samples/module-level-directive/_config.js b/test/function/samples/module-level-directive/_config.js index 98a7799c30b..27b8be297fe 100644 --- a/test/function/samples/module-level-directive/_config.js +++ b/test/function/samples/module-level-directive/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'module level directives should produce warnings', warnings: [ { diff --git a/test/function/samples/module-parsed-hook/_config.js b/test/function/samples/module-parsed-hook/_config.js index 1946f7d35e2..3987d551c94 100644 --- a/test/function/samples/module-parsed-hook/_config.js +++ b/test/function/samples/module-parsed-hook/_config.js @@ -6,7 +6,7 @@ const parsedModules = []; const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'calls the moduleParsedHook once a module is parsed', options: { plugins: { diff --git a/test/function/samples/module-parsed-imported-ids/_config.js b/test/function/samples/module-parsed-imported-ids/_config.js index 0a6d7983ba7..ee051e50216 100644 --- a/test/function/samples/module-parsed-imported-ids/_config.js +++ b/test/function/samples/module-parsed-imported-ids/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides full importedIds and dynamicallyImportedIds in the moduleParsed hook', options: { plugins: [ diff --git a/test/function/samples/module-side-effect-reexport/_config.js b/test/function/samples/module-side-effect-reexport/_config.js index 849bd0b3400..324ef02fe83 100644 --- a/test/function/samples/module-side-effect-reexport/_config.js +++ b/test/function/samples/module-side-effect-reexport/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes side effects of re-exporters unless they have moduleSideEffects: false', options: { plugins: [ diff --git a/test/function/samples/module-side-effects/array/_config.js b/test/function/samples/module-side-effects/array/_config.js index f92d30cff89..06eb5a435b5 100644 --- a/test/function/samples/module-side-effects/array/_config.js +++ b/test/function/samples/module-side-effects/array/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports setting module side effects via an array', context: { require(id) { diff --git a/test/function/samples/module-side-effects/external-false/_config.js b/test/function/samples/module-side-effects/external-false/_config.js index 8115ef32cb9..0b3c82f5f33 100644 --- a/test/function/samples/module-side-effects/external-false/_config.js +++ b/test/function/samples/module-side-effects/external-false/_config.js @@ -4,7 +4,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports setting module side effects to false for external modules', context: { require(id) { diff --git a/test/function/samples/module-side-effects/global-false/_config.js b/test/function/samples/module-side-effects/global-false/_config.js index 6dd1a5d24e2..828d4ffe47a 100644 --- a/test/function/samples/module-side-effects/global-false/_config.js +++ b/test/function/samples/module-side-effects/global-false/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports setting module side effects to false for all modules', context: { require(id) { diff --git a/test/function/samples/module-side-effects/invalid-option/_config.js b/test/function/samples/module-side-effects/invalid-option/_config.js index 7fa29e8302e..4e8cf447089 100644 --- a/test/function/samples/module-side-effects/invalid-option/_config.js +++ b/test/function/samples/module-side-effects/invalid-option/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns for invalid options', options: { treeshake: { diff --git a/test/function/samples/module-side-effects/load/_config.js b/test/function/samples/module-side-effects/load/_config.js index f51b7d9036a..b31dec74d7e 100644 --- a/test/function/samples/module-side-effects/load/_config.js +++ b/test/function/samples/module-side-effects/load/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles setting moduleSideEffects in the load hook', context: { sideEffects diff --git a/test/function/samples/module-side-effects/reexport-from-external/_config.js b/test/function/samples/module-side-effects/reexport-from-external/_config.js index 1368cda215a..d04b7f3e2c8 100644 --- a/test/function/samples/module-side-effects/reexport-from-external/_config.js +++ b/test/function/samples/module-side-effects/reexport-from-external/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles reexporting external values when module side-effects are false', context: { require(id) { diff --git a/test/function/samples/module-side-effects/reexports/_config.js b/test/function/samples/module-side-effects/reexports/_config.js index 9b69404f32f..2fb509027fc 100644 --- a/test/function/samples/module-side-effects/reexports/_config.js +++ b/test/function/samples/module-side-effects/reexports/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles reexporting values when module side-effects are false', context: { sideEffects diff --git a/test/function/samples/module-side-effects/resolve-id-external/_config.js b/test/function/samples/module-side-effects/resolve-id-external/_config.js index 80427c2a74f..2e0aa6c06a4 100644 --- a/test/function/samples/module-side-effects/resolve-id-external/_config.js +++ b/test/function/samples/module-side-effects/resolve-id-external/_config.js @@ -6,7 +6,7 @@ const path = require('node:path'); const sideEffects = []; const { getObject } = require('../../../../utils'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include modules without used exports if moduleSideEffect is false', context: { require(id) { diff --git a/test/function/samples/module-side-effects/resolve-id/_config.js b/test/function/samples/module-side-effects/resolve-id/_config.js index fbb8d5f72c1..7ad65ab72af 100644 --- a/test/function/samples/module-side-effects/resolve-id/_config.js +++ b/test/function/samples/module-side-effects/resolve-id/_config.js @@ -4,7 +4,7 @@ const { getObject } = require('../../../../utils'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include modules without used exports if moduleSideEffect is false', context: { sideEffects diff --git a/test/function/samples/module-side-effects/transform/_config.js b/test/function/samples/module-side-effects/transform/_config.js index 0cfa5ebfe7e..03e489b4925 100644 --- a/test/function/samples/module-side-effects/transform/_config.js +++ b/test/function/samples/module-side-effects/transform/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const path = require('node:path'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles setting moduleSideEffects in the transform hook', context: { sideEffects diff --git a/test/function/samples/module-side-effects/writable/_config.js b/test/function/samples/module-side-effects/writable/_config.js index f2b945161fc..77d0982d914 100644 --- a/test/function/samples/module-side-effects/writable/_config.js +++ b/test/function/samples/module-side-effects/writable/_config.js @@ -3,7 +3,7 @@ const POLYFILL_ID = '\0polyfill'; const PROXY_SUFFIX = '?inject-polyfill-proxy'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'ModuleInfo.moduleSideEffects should be writable during build time', options: { treeshake: { moduleSideEffects: false }, diff --git a/test/function/samples/module-sort-order/_config.js b/test/function/samples/module-sort-order/_config.js index 79090ed69e5..9fbcae5201f 100644 --- a/test/function/samples/module-sort-order/_config.js +++ b/test/function/samples/module-sort-order/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'module sorter is not confused by top-level call expressions' }); diff --git a/test/function/samples/module-tree/_config.js b/test/function/samples/module-tree/_config.js index d57af7d7c44..8c978703ffe 100644 --- a/test/function/samples/module-tree/_config.js +++ b/test/function/samples/module-tree/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'bundle.modules includes dependencies (#903)', bundle(bundle) { const modules = bundle.cache.modules.map(module => ({ diff --git a/test/function/samples/name-conflict-object/_config.js b/test/function/samples/name-conflict-object/_config.js index ee8f7f8aad2..18f76ca1d44 100644 --- a/test/function/samples/name-conflict-object/_config.js +++ b/test/function/samples/name-conflict-object/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids name conflicts with local variables named Object', options: { external: 'external', diff --git a/test/function/samples/name-conflict-promise/_config.js b/test/function/samples/name-conflict-promise/_config.js index bc3596713d6..a6581386894 100644 --- a/test/function/samples/name-conflict-promise/_config.js +++ b/test/function/samples/name-conflict-promise/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids name conflicts with local variables named Promise', async exports(exports) { assert.strictEqual(exports.Promise, 'bar'); diff --git a/test/function/samples/name-conflict-symbol/_config.js b/test/function/samples/name-conflict-symbol/_config.js index 2e021c02fa0..1cd7b638ffe 100644 --- a/test/function/samples/name-conflict-symbol/_config.js +++ b/test/function/samples/name-conflict-symbol/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids name conflicts with local variables named Symbol', options: { output: { diff --git a/test/function/samples/named-external-method-in-prototype/_config.js b/test/function/samples/named-external-method-in-prototype/_config.js index b1d5501a2c7..0f8f68f5ef5 100644 --- a/test/function/samples/named-external-method-in-prototype/_config.js +++ b/test/function/samples/named-external-method-in-prototype/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'method of external named import used inside prototype method (#68)', context: { // override require here, making "foo" appear as a global module diff --git a/test/function/samples/namespace-keys-are-sorted/_config.js b/test/function/samples/namespace-keys-are-sorted/_config.js index aa453cd30eb..8c49c57fb2c 100644 --- a/test/function/samples/namespace-keys-are-sorted/_config.js +++ b/test/function/samples/namespace-keys-are-sorted/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports sorted namespace keys' }); diff --git a/test/function/samples/namespace-literal-value/_config.js b/test/function/samples/namespace-literal-value/_config.js index 3869242edad..07297018242 100644 --- a/test/function/samples/namespace-literal-value/_config.js +++ b/test/function/samples/namespace-literal-value/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not simplify accessing unknown properties from namespaces', exports({ isNull }) { assert.strictEqual(isNull('a'), true); diff --git a/test/function/samples/namespace-member-side-effects/assignment/_config.js b/test/function/samples/namespace-member-side-effects/assignment/_config.js index c7ba5fa8e28..e60754de781 100644 --- a/test/function/samples/namespace-member-side-effects/assignment/_config.js +++ b/test/function/samples/namespace-member-side-effects/assignment/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'checks side effects when reassigning namespace members', options: { treeshake: { tryCatchDeoptimization: false } diff --git a/test/function/samples/namespace-member-side-effects/call/_config.js b/test/function/samples/namespace-member-side-effects/call/_config.js index c9d9ca9d31e..2c88f17e7e5 100644 --- a/test/function/samples/namespace-member-side-effects/call/_config.js +++ b/test/function/samples/namespace-member-side-effects/call/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'checks side effects when calling a namespace', options: { treeshake: { tryCatchDeoptimization: false } diff --git a/test/function/samples/namespace-member-side-effects/member-call/_config.js b/test/function/samples/namespace-member-side-effects/member-call/_config.js index 1c3cb0ab100..6898b7ef559 100644 --- a/test/function/samples/namespace-member-side-effects/member-call/_config.js +++ b/test/function/samples/namespace-member-side-effects/member-call/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects side effects when namespace members are called' }); diff --git a/test/function/samples/namespace-member-side-effects/missing-access/_config.js b/test/function/samples/namespace-member-side-effects/missing-access/_config.js index d2680d73fbc..0b3f7d78605 100644 --- a/test/function/samples/namespace-member-side-effects/missing-access/_config.js +++ b/test/function/samples/namespace-member-side-effects/missing-access/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects side effects when accessing missing namespace members', options: { treeshake: { tryCatchDeoptimization: false } diff --git a/test/function/samples/namespace-member-side-effects/unknown-access/_config.js b/test/function/samples/namespace-member-side-effects/unknown-access/_config.js index 0370e32d52d..60d9f90176d 100644 --- a/test/function/samples/namespace-member-side-effects/unknown-access/_config.js +++ b/test/function/samples/namespace-member-side-effects/unknown-access/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respects side effects when accessing unknown namespace members', options: { external: ['external'], diff --git a/test/function/samples/namespace-missing-export/_config.js b/test/function/samples/namespace-missing-export/_config.js index 2fc56078ce9..33e436e49fc 100644 --- a/test/function/samples/namespace-missing-export/_config.js +++ b/test/function/samples/namespace-missing-export/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_EMPTY = path.join(__dirname, 'empty.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'replaces missing namespace members with undefined and warns about them', warnings: [ { diff --git a/test/function/samples/namespace-override/_config.js b/test/function/samples/namespace-override/_config.js index 581ef99f4c3..16502433322 100644 --- a/test/function/samples/namespace-override/_config.js +++ b/test/function/samples/namespace-override/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not warn when overriding namespace reexports with explicit ones' }); diff --git a/test/function/samples/namespace-reassign-import-fails/_config.js b/test/function/samples/namespace-reassign-import-fails/_config.js index 8cb09b94db1..fccf0274364 100644 --- a/test/function/samples/namespace-reassign-import-fails/_config.js +++ b/test/function/samples/namespace-reassign-import-fails/_config.js @@ -4,7 +4,7 @@ const { assertIncludes } = require('../../../utils.js'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns for reassignments to namespace exports', code(code) { assertIncludes(code, 'foo = 2'); diff --git a/test/function/samples/namespace-tostring/dynamic-import-default-mode/_config.js b/test/function/samples/namespace-tostring/dynamic-import-default-mode/_config.js index 75508156f5b..2f680fad574 100644 --- a/test/function/samples/namespace-tostring/dynamic-import-default-mode/_config.js +++ b/test/function/samples/namespace-tostring/dynamic-import-default-mode/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', options: { diff --git a/test/function/samples/namespace-tostring/dynamic-import/_config.js b/test/function/samples/namespace-tostring/dynamic-import/_config.js index 9b06740e5c0..5a31d438523 100644 --- a/test/function/samples/namespace-tostring/dynamic-import/_config.js +++ b/test/function/samples/namespace-tostring/dynamic-import/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to dynamic imports', options: { output: { diff --git a/test/function/samples/namespace-tostring/entry-default/_config.js b/test/function/samples/namespace-tostring/entry-default/_config.js index c4e4b386223..d01569bbdb2 100644 --- a/test/function/samples/namespace-tostring/entry-default/_config.js +++ b/test/function/samples/namespace-tostring/entry-default/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not add Symbol.toStringTag property to entry chunks with default export mode', options: { output: { diff --git a/test/function/samples/namespace-tostring/entry-named/_config.js b/test/function/samples/namespace-tostring/entry-named/_config.js index 629c5ddcb34..f7b51b78b2b 100644 --- a/test/function/samples/namespace-tostring/entry-named/_config.js +++ b/test/function/samples/namespace-tostring/entry-named/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to entry chunks with named exports', options: { output: { diff --git a/test/function/samples/namespace-tostring/external-namespaces/_config.js b/test/function/samples/namespace-tostring/external-namespaces/_config.js index 1ff06d11eaf..3006d93c60b 100644 --- a/test/function/samples/namespace-tostring/external-namespaces/_config.js +++ b/test/function/samples/namespace-tostring/external-namespaces/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to external namespaces', options: { external(id) { diff --git a/test/function/samples/namespace-tostring/inlined-namespace/_config.js b/test/function/samples/namespace-tostring/inlined-namespace/_config.js index 34c95be1857..84f1a0b3d2c 100644 --- a/test/function/samples/namespace-tostring/inlined-namespace/_config.js +++ b/test/function/samples/namespace-tostring/inlined-namespace/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds Symbol.toStringTag property to inlined namespaces', options: { output: { diff --git a/test/function/samples/namespace-tostring/interop-property-descriptor/_config.js b/test/function/samples/namespace-tostring/interop-property-descriptor/_config.js index 5d34a5d1a3e..37661d70c8f 100644 --- a/test/function/samples/namespace-tostring/interop-property-descriptor/_config.js +++ b/test/function/samples/namespace-tostring/interop-property-descriptor/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generated interop namespaces should have correct Symbol.toStringTag', context: { require() { diff --git a/test/function/samples/namespace-tostring/property-descriptor/_config.js b/test/function/samples/namespace-tostring/property-descriptor/_config.js index 7a10631e006..cd74750611a 100644 --- a/test/function/samples/namespace-tostring/property-descriptor/_config.js +++ b/test/function/samples/namespace-tostring/property-descriptor/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'namespace export should have @@toStringTag with correct property descriptors #4336', options: { output: { diff --git a/test/function/samples/namespace-update-import-fails/_config.js b/test/function/samples/namespace-update-import-fails/_config.js index f6c427625bb..d4c95497bb9 100644 --- a/test/function/samples/namespace-update-import-fails/_config.js +++ b/test/function/samples/namespace-update-import-fails/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const { assertIncludes } = require('../../../utils.js'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disallows updates to namespace exports', code(code) { assertIncludes(code, 'foo++'); diff --git a/test/function/samples/namespaces-are-frozen/_config.js b/test/function/samples/namespaces-are-frozen/_config.js index 919051385b4..cd3cfa710c5 100644 --- a/test/function/samples/namespaces-are-frozen/_config.js +++ b/test/function/samples/namespaces-are-frozen/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'namespaces should be non-extensible and its properties immutatable and non-configurable', diff --git a/test/function/samples/namespaces-have-null-prototype/_config.js b/test/function/samples/namespaces-have-null-prototype/_config.js index 08a9d4afaac..bdcb27927b1 100644 --- a/test/function/samples/namespaces-have-null-prototype/_config.js +++ b/test/function/samples/namespaces-have-null-prototype/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates namespaces with null prototypes' }); diff --git a/test/function/samples/namespacing-collisions-2/_config.js b/test/function/samples/namespacing-collisions-2/_config.js index 6e1b82a682e..bc01f4f5e53 100644 --- a/test/function/samples/namespacing-collisions-2/_config.js +++ b/test/function/samples/namespacing-collisions-2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly namespaces when using * exports, take two (#910)', exports(exports) { assert.deepEqual(exports, ['Material', 'MaterialAgain', 'Something', 'SomethingAgain']); diff --git a/test/function/samples/namespacing-collisions/_config.js b/test/function/samples/namespacing-collisions/_config.js index 34ff766153c..905caf5f41a 100644 --- a/test/function/samples/namespacing-collisions/_config.js +++ b/test/function/samples/namespacing-collisions/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly namespaces when using * exports (#910)', exports(exports) { assert.deepStrictEqual(exports, ['Material', 'Something']); diff --git a/test/function/samples/namespacing-in-sub-functions/_config.js b/test/function/samples/namespacing-in-sub-functions/_config.js index b16770c4cc4..5f870676190 100644 --- a/test/function/samples/namespacing-in-sub-functions/_config.js +++ b/test/function/samples/namespacing-in-sub-functions/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly namespaces sub-functions (#910)', exports(exports) { assert.equal(exports, 'foobar'); diff --git a/test/function/samples/nested-and-async-plugin/_config.js b/test/function/samples/nested-and-async-plugin/_config.js index 6a5515cd4cb..4fefef40c11 100644 --- a/test/function/samples/nested-and-async-plugin/_config.js +++ b/test/function/samples/nested-and-async-plugin/_config.js @@ -15,7 +15,7 @@ const pluginB = Promise.resolve({ } }); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'works when nested plugin', options: { // eslint-disable-next-line no-sparse-arrays diff --git a/test/function/samples/nested-foreach/_config.js b/test/function/samples/nested-foreach/_config.js index 590a0af3a3f..53e8cf59b53 100644 --- a/test/function/samples/nested-foreach/_config.js +++ b/test/function/samples/nested-foreach/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side-effects in nested .forEach calls (#3533)', exports: exports => assert.strictEqual(exports.result, 9) }); diff --git a/test/function/samples/nested-inlined-dynamic-import-1/_config.js b/test/function/samples/nested-inlined-dynamic-import-1/_config.js index f6010d56c43..57985c03fac 100644 --- a/test/function/samples/nested-inlined-dynamic-import-1/_config.js +++ b/test/function/samples/nested-inlined-dynamic-import-1/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts variables when nested dynamic imports are inlined via inlineDynamicImports', options: { diff --git a/test/function/samples/nested-inlined-dynamic-import-2/_config.js b/test/function/samples/nested-inlined-dynamic-import-2/_config.js index ea06c16938c..afeaa07b397 100644 --- a/test/function/samples/nested-inlined-dynamic-import-2/_config.js +++ b/test/function/samples/nested-inlined-dynamic-import-2/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_LIB1 = path.join(__dirname, 'lib1.js'); const ID_LIB2 = path.join(__dirname, 'lib2.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts variables when nested dynamic imports are inlined', warnings: [ { diff --git a/test/function/samples/nested-namespace-member-expression/_config.js b/test/function/samples/nested-namespace-member-expression/_config.js index ad7cea11060..1667bb77f9e 100644 --- a/test/function/samples/nested-namespace-member-expression/_config.js +++ b/test/function/samples/nested-namespace-member-expression/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles accessing members of namespaces correctly', exports(exports) { assert.strictEqual(exports, false); diff --git a/test/function/samples/nested-property-call-performance/_config.js b/test/function/samples/nested-property-call-performance/_config.js index 2ed2a52c3ef..bcef3ccdff8 100644 --- a/test/function/samples/nested-property-call-performance/_config.js +++ b/test/function/samples/nested-property-call-performance/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles nested property calls with acceptable performance' }); diff --git a/test/function/samples/new-target-meta/_config.js b/test/function/samples/new-target-meta/_config.js index c7ed494aab9..653ce117be9 100644 --- a/test/function/samples/new-target-meta/_config.js +++ b/test/function/samples/new-target-meta/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not change new.target usages' }); diff --git a/test/function/samples/newline-after-comment/_config.js b/test/function/samples/newline-after-comment/_config.js index 01aac33eae8..0b4b8516b31 100644 --- a/test/function/samples/newline-after-comment/_config.js +++ b/test/function/samples/newline-after-comment/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'inserts newline after comment', exports(exports) { assert.equal(exports(), 42); diff --git a/test/function/samples/no-external-live-bindings-compact/_config.js b/test/function/samples/no-external-live-bindings-compact/_config.js index 9a46a24e581..47b8962979f 100644 --- a/test/function/samples/no-external-live-bindings-compact/_config.js +++ b/test/function/samples/no-external-live-bindings-compact/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Allows omitting the code that handles external live bindings', options: { external: () => true, diff --git a/test/function/samples/no-external-live-bindings/_config.js b/test/function/samples/no-external-live-bindings/_config.js index 446a9ab09d7..c64b44028f0 100644 --- a/test/function/samples/no-external-live-bindings/_config.js +++ b/test/function/samples/no-external-live-bindings/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Allows omitting the code that handles external live bindings', options: { external: () => true, diff --git a/test/function/samples/no-imports/_config.js b/test/function/samples/no-imports/_config.js index f0fa4c62268..5a78cb28118 100644 --- a/test/function/samples/no-imports/_config.js +++ b/test/function/samples/no-imports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'creates a bundle from a module with no imports' }); diff --git a/test/function/samples/no-relative-external/_config.js b/test/function/samples/no-relative-external/_config.js index 72911b7e769..37a9d861e3c 100644 --- a/test/function/samples/no-relative-external/_config.js +++ b/test/function/samples/no-relative-external/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'missing relative imports are an error, not a warning', error: { code: 'UNRESOLVED_IMPORT', diff --git a/test/function/samples/non-extension-dot/_config.js b/test/function/samples/non-extension-dot/_config.js index 77f338f8039..3095f7fe3d6 100644 --- a/test/function/samples/non-extension-dot/_config.js +++ b/test/function/samples/non-extension-dot/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds .js to module paths with non-extension dots in them' }); diff --git a/test/function/samples/non-function-hook-async/_config.js b/test/function/samples/non-function-hook-async/_config.js index 806243313ec..fb9aabc78ef 100644 --- a/test/function/samples/non-function-hook-async/_config.js +++ b/test/function/samples/non-function-hook-async/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when providing a value for an async function hook', options: { plugins: { diff --git a/test/function/samples/non-function-hook-sync/_config.js b/test/function/samples/non-function-hook-sync/_config.js index e0da651f595..f592d0883e0 100644 --- a/test/function/samples/non-function-hook-sync/_config.js +++ b/test/function/samples/non-function-hook-sync/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when providing a value for a sync function hook', options: { plugins: { diff --git a/test/function/samples/non-js-extensions/_config.js b/test/function/samples/non-js-extensions/_config.js index d8b974b20af..bfa68d294af 100644 --- a/test/function/samples/non-js-extensions/_config.js +++ b/test/function/samples/non-js-extensions/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'non .js extensions are preserved', options: { plugins: [ diff --git a/test/function/samples/object-deep-access-effect/_config.js b/test/function/samples/object-deep-access-effect/_config.js index 267c308dcde..bc6d80ea127 100644 --- a/test/function/samples/object-deep-access-effect/_config.js +++ b/test/function/samples/object-deep-access-effect/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when an nested property of an unknown object property is accessed', context: { require() { diff --git a/test/function/samples/object-destructuring-renaming/_config.js b/test/function/samples/object-destructuring-renaming/_config.js index 60de63b8e0d..c43e833e21b 100644 --- a/test/function/samples/object-destructuring-renaming/_config.js +++ b/test/function/samples/object-destructuring-renaming/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renaming destructured object properties should request the correct property (#527)', exports(exports) { assert.equal(exports.env, process.env); diff --git a/test/function/samples/object-dynamic-properties/_config.js b/test/function/samples/object-dynamic-properties/_config.js index c0af78c6b77..a54d8060d49 100644 --- a/test/function/samples/object-dynamic-properties/_config.js +++ b/test/function/samples/object-dynamic-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'dynamic object assignments should be imported' }); diff --git a/test/function/samples/object-expression-shadowed-properties/_config.js b/test/function/samples/object-expression-shadowed-properties/_config.js index d2369b66f20..b07e9093bde 100644 --- a/test/function/samples/object-expression-shadowed-properties/_config.js +++ b/test/function/samples/object-expression-shadowed-properties/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not remove calls to object expression methods that may have side-effects when properties may be shadowed', context: { diff --git a/test/function/samples/object-properties/_config.js b/test/function/samples/object-properties/_config.js index cea7a01faac..cd8ec59de21 100644 --- a/test/function/samples/object-properties/_config.js +++ b/test/function/samples/object-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes object properties in definitions' }); diff --git a/test/function/samples/object-prototype-properties/_config.js b/test/function/samples/object-prototype-properties/_config.js index 228d870660e..4c4c48b8a31 100644 --- a/test/function/samples/object-prototype-properties/_config.js +++ b/test/function/samples/object-prototype-properties/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles names conflicting with Object.prototype properties' }); diff --git a/test/function/samples/object-spread-side-effect/_config.js b/test/function/samples/object-spread-side-effect/_config.js index 4e5d8ebd85c..16841b87bc1 100644 --- a/test/function/samples/object-spread-side-effect/_config.js +++ b/test/function/samples/object-spread-side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'triggers getter side effects when spreading objects' }); diff --git a/test/function/samples/optional-catch-binding/_config.js b/test/function/samples/optional-catch-binding/_config.js index bd8914c0a25..5f8cc6162a1 100644 --- a/test/function/samples/optional-catch-binding/_config.js +++ b/test/function/samples/optional-catch-binding/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows optional catch binding with appropriate acorn settings', exports(exports) { assert.equal(exports.foo, true); diff --git a/test/function/samples/optional-chaining-side-effect/_config.js b/test/function/samples/optional-chaining-side-effect/_config.js index 3f3f1038e84..24d7316b6bb 100644 --- a/test/function/samples/optional-chaining-side-effect/_config.js +++ b/test/function/samples/optional-chaining-side-effect/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles side effects in optional chaining (#4806)', exports({ get, set }) { set(['test']); diff --git a/test/function/samples/options-async-hook/_config.js b/test/function/samples/options-async-hook/_config.js index 7af90619598..382cb0bac23 100644 --- a/test/function/samples/options-async-hook/_config.js +++ b/test/function/samples/options-async-hook/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { promises: fs } = require('node:fs'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'resolves promises between sequential options hooks', options: { input: 'super-unused', diff --git a/test/function/samples/options-hook/_config.js b/test/function/samples/options-hook/_config.js index 283394fbe12..42f6cc2f13d 100644 --- a/test/function/samples/options-hook/_config.js +++ b/test/function/samples/options-hook/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to read and modify options in the options hook', options: { input: 'unused', diff --git a/test/function/samples/options-in-renderstart/_config.js b/test/function/samples/options-in-renderstart/_config.js index c6c6b0edc00..5ffe74bfaaf 100644 --- a/test/function/samples/options-in-renderstart/_config.js +++ b/test/function/samples/options-in-renderstart/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const checkedOptions = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes input and output options available in renderStart', options: { context: 'global', diff --git a/test/function/samples/output-options-hook/_config.js b/test/function/samples/output-options-hook/_config.js index b7e3a4a40e6..b4ff287f121 100644 --- a/test/function/samples/output-options-hook/_config.js +++ b/test/function/samples/output-options-hook/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows to read and modify options in the options hook', exports(exports) { assert.deepStrictEqual(exports, { diff --git a/test/function/samples/override-external-namespace/_config.js b/test/function/samples/override-external-namespace/_config.js index cb736f3f813..0ce2f804a5a 100644 --- a/test/function/samples/override-external-namespace/_config.js +++ b/test/function/samples/override-external-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows overriding imports of external namespace reexports', options: { external: 'path' diff --git a/test/function/samples/override-static-external-namespace/_config.js b/test/function/samples/override-static-external-namespace/_config.js index b4f5e6e4aef..44409f65263 100644 --- a/test/function/samples/override-static-external-namespace/_config.js +++ b/test/function/samples/override-static-external-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows overriding imports of external namespace reexports without external live-bindings', options: { diff --git a/test/function/samples/parameter-defaults/arrays/_config.js b/test/function/samples/parameter-defaults/arrays/_config.js index f92e447619a..12e61487e58 100644 --- a/test/function/samples/parameter-defaults/arrays/_config.js +++ b/test/function/samples/parameter-defaults/arrays/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps parameter defaults for array elements' }); diff --git a/test/function/samples/parameter-defaults/class-fields/_config.js b/test/function/samples/parameter-defaults/class-fields/_config.js index 957b98f82c0..8d2e22acba1 100644 --- a/test/function/samples/parameter-defaults/class-fields/_config.js +++ b/test/function/samples/parameter-defaults/class-fields/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps parameter defaults for class fields' }); diff --git a/test/function/samples/parameter-defaults/exported/_config.js b/test/function/samples/parameter-defaults/exported/_config.js index 5f892fd74de..63514ca6530 100644 --- a/test/function/samples/parameter-defaults/exported/_config.js +++ b/test/function/samples/parameter-defaults/exported/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes default parameters for exported functions', exports({ funDecl, funExp, arrow }) { assert.strictEqual(funDecl(), 'defaultValue', 'function declaration'); diff --git a/test/function/samples/parameter-defaults/function-as-default/_config.js b/test/function/samples/parameter-defaults/function-as-default/_config.js index 831f48b9d18..6c3745d9e93 100644 --- a/test/function/samples/parameter-defaults/function-as-default/_config.js +++ b/test/function/samples/parameter-defaults/function-as-default/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes functions supplied as default values' }); diff --git a/test/function/samples/parameter-defaults/function-return/_config.js b/test/function/samples/parameter-defaults/function-return/_config.js index d0cb38a8b83..d21db6c718e 100644 --- a/test/function/samples/parameter-defaults/function-return/_config.js +++ b/test/function/samples/parameter-defaults/function-return/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks parameter defaults for returned functions' }); diff --git a/test/function/samples/parameter-defaults/logical-expressions/_config.js b/test/function/samples/parameter-defaults/logical-expressions/_config.js index b5ac742e500..99b64bd5eb2 100644 --- a/test/function/samples/parameter-defaults/logical-expressions/_config.js +++ b/test/function/samples/parameter-defaults/logical-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes default parameters in logical expressios' }); diff --git a/test/function/samples/parameter-defaults/module-side-effects/_config.js b/test/function/samples/parameter-defaults/module-side-effects/_config.js index b08b44b5bf4..66497faaa0b 100644 --- a/test/function/samples/parameter-defaults/module-side-effects/_config.js +++ b/test/function/samples/parameter-defaults/module-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not tree-shake necessary parameter defaults when modulesSideEffects are disabled', options: { diff --git a/test/function/samples/parameter-defaults/objects/_config.js b/test/function/samples/parameter-defaults/objects/_config.js index 1f1845a75f6..72f3b276774 100644 --- a/test/function/samples/parameter-defaults/objects/_config.js +++ b/test/function/samples/parameter-defaults/objects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps parameter defaults for methods in objects' }); diff --git a/test/function/samples/parameter-defaults/return-expressions/_config.js b/test/function/samples/parameter-defaults/return-expressions/_config.js index fc248ff4082..fe72312b818 100644 --- a/test/function/samples/parameter-defaults/return-expressions/_config.js +++ b/test/function/samples/parameter-defaults/return-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps parameter defaults for returned expressions' }); diff --git a/test/function/samples/parameter-defaults/super-classes/_config.js b/test/function/samples/parameter-defaults/super-classes/_config.js index ed6a8b43ef9..e1df2f59e12 100644 --- a/test/function/samples/parameter-defaults/super-classes/_config.js +++ b/test/function/samples/parameter-defaults/super-classes/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps parameter defaults for super classes' }); diff --git a/test/function/samples/parameter-defaults/tagged-templates/_config.js b/test/function/samples/parameter-defaults/tagged-templates/_config.js index a655623dae3..200eeb118e2 100644 --- a/test/function/samples/parameter-defaults/tagged-templates/_config.js +++ b/test/function/samples/parameter-defaults/tagged-templates/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes necessary default parameters for tagged template literals' }); diff --git a/test/function/samples/parameter-defaults/try-catch/_config.js b/test/function/samples/parameter-defaults/try-catch/_config.js index 715224a818c..7236445903a 100644 --- a/test/function/samples/parameter-defaults/try-catch/_config.js +++ b/test/function/samples/parameter-defaults/try-catch/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'keeps parameter defaults when called from try-statement' }); diff --git a/test/function/samples/parameter-side-effects/_config.js b/test/function/samples/parameter-side-effects/_config.js index ffbcb85b414..c9f1ce0fecf 100644 --- a/test/function/samples/parameter-side-effects/_config.js +++ b/test/function/samples/parameter-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'retains calls with parameter side effects' }); diff --git a/test/function/samples/parenthesised-default-export/_config.js b/test/function/samples/parenthesised-default-export/_config.js index 53e4eeec41d..18f4cfef73e 100644 --- a/test/function/samples/parenthesised-default-export/_config.js +++ b/test/function/samples/parenthesised-default-export/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows default exports to be enclosed in parentheses' }); diff --git a/test/function/samples/pass-namespace-to-function/_config.js b/test/function/samples/pass-namespace-to-function/_config.js index 229a74d3a2a..6995cca2961 100644 --- a/test/function/samples/pass-namespace-to-function/_config.js +++ b/test/function/samples/pass-namespace-to-function/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows a namespace to be passed to a function' }); diff --git a/test/function/samples/paths-are-case-sensitive/_config.js b/test/function/samples/paths-are-case-sensitive/_config.js index f02f5b5556d..f6943a314c4 100644 --- a/test/function/samples/paths-are-case-sensitive/_config.js +++ b/test/function/samples/paths-are-case-sensitive/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'insists on correct casing for imports', error: { code: 'UNRESOLVED_IMPORT', diff --git a/test/function/samples/per-output-plugins-warn-hooks/_config.js b/test/function/samples/per-output-plugins-warn-hooks/_config.js index a584756abc1..7cbd090f18c 100644 --- a/test/function/samples/per-output-plugins-warn-hooks/_config.js +++ b/test/function/samples/per-output-plugins-warn-hooks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when input hooks are used in output plugins', options: { output: { diff --git a/test/function/samples/perf-adds-plugin-context-to-plugins/_config.js b/test/function/samples/perf-adds-plugin-context-to-plugins/_config.js index 721d5c01a59..677d299eae7 100644 --- a/test/function/samples/perf-adds-plugin-context-to-plugins/_config.js +++ b/test/function/samples/perf-adds-plugin-context-to-plugins/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Adds plugin context to plugins with perf=true', options: { perf: true, diff --git a/test/function/samples/perf-supports-object-hooks/_config.js b/test/function/samples/perf-supports-object-hooks/_config.js index e665f0366b3..47523617555 100644 --- a/test/function/samples/perf-supports-object-hooks/_config.js +++ b/test/function/samples/perf-supports-object-hooks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Supports object hooks with perf=true', options: { perf: true, diff --git a/test/function/samples/plugin-cache/anonymous-delete/_config.js b/test/function/samples/plugin-cache/anonymous-delete/_config.js index 99f47d675de..ce7dbf23340 100644 --- a/test/function/samples/plugin-cache/anonymous-delete/_config.js +++ b/test/function/samples/plugin-cache/anonymous-delete/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for anonymous plugins deleting from the cache', options: { plugins: { diff --git a/test/function/samples/plugin-cache/anonymous-get/_config.js b/test/function/samples/plugin-cache/anonymous-get/_config.js index d2a913f0e1f..8dbacf0d3a2 100644 --- a/test/function/samples/plugin-cache/anonymous-get/_config.js +++ b/test/function/samples/plugin-cache/anonymous-get/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for anonymous plugins reading the cache', options: { plugins: { diff --git a/test/function/samples/plugin-cache/anonymous-has/_config.js b/test/function/samples/plugin-cache/anonymous-has/_config.js index a6721785259..ef142eda86e 100644 --- a/test/function/samples/plugin-cache/anonymous-has/_config.js +++ b/test/function/samples/plugin-cache/anonymous-has/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for anonymous plugins checking the cache', options: { plugins: { diff --git a/test/function/samples/plugin-cache/anonymous-set/_config.js b/test/function/samples/plugin-cache/anonymous-set/_config.js index 31b44a3b4ee..5349a523437 100644 --- a/test/function/samples/plugin-cache/anonymous-set/_config.js +++ b/test/function/samples/plugin-cache/anonymous-set/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for anonymous plugins adding to the cache', options: { plugins: { diff --git a/test/function/samples/plugin-cache/duplicate-names-no-cache/_config.js b/test/function/samples/plugin-cache/duplicate-names-no-cache/_config.js index 1407865f154..eb95b812345 100644 --- a/test/function/samples/plugin-cache/duplicate-names-no-cache/_config.js +++ b/test/function/samples/plugin-cache/duplicate-names-no-cache/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows plugins to have the same name if they do not access the cache', options: { plugins: [ diff --git a/test/function/samples/plugin-cache/duplicate-names/_config.js b/test/function/samples/plugin-cache/duplicate-names/_config.js index 4f6d841f64d..3a12be306c3 100644 --- a/test/function/samples/plugin-cache/duplicate-names/_config.js +++ b/test/function/samples/plugin-cache/duplicate-names/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws if two plugins with the same name and no cache key access the cache', options: { plugins: [ diff --git a/test/function/samples/plugin-error-loc-instead-pos/_config.js b/test/function/samples/plugin-error-loc-instead-pos/_config.js index 9e961138ef2..8619397ece3 100644 --- a/test/function/samples/plugin-error-loc-instead-pos/_config.js +++ b/test/function/samples/plugin-error-loc-instead-pos/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: '`this.error(...)` accepts { line, column } object as second parameter (#1265)', options: { plugins: [ diff --git a/test/function/samples/plugin-error-module-parsed/_config.js b/test/function/samples/plugin-error-module-parsed/_config.js index e1e9cec3b32..53a0e53fd8d 100644 --- a/test/function/samples/plugin-error-module-parsed/_config.js +++ b/test/function/samples/plugin-error-module-parsed/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'errors in moduleParsed abort the build', options: { plugins: [ diff --git a/test/function/samples/plugin-error-only-first-render-chunk/_config.js b/test/function/samples/plugin-error-only-first-render-chunk/_config.js index 26b82ddc220..0e328c029c0 100644 --- a/test/function/samples/plugin-error-only-first-render-chunk/_config.js +++ b/test/function/samples/plugin-error-only-first-render-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws error only with first plugin renderChunk', options: { plugins: [ diff --git a/test/function/samples/plugin-error-only-first-transform/_config.js b/test/function/samples/plugin-error-only-first-transform/_config.js index b8830a124b4..f36043808d1 100644 --- a/test/function/samples/plugin-error-only-first-transform/_config.js +++ b/test/function/samples/plugin-error-only-first-transform/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws error only with first plugin transform', options: { plugins: [ diff --git a/test/function/samples/plugin-error-should-transform/_config.js b/test/function/samples/plugin-error-should-transform/_config.js index 572669f7d97..a7417a9b78c 100644 --- a/test/function/samples/plugin-error-should-transform/_config.js +++ b/test/function/samples/plugin-error-should-transform/_config.js @@ -4,7 +4,7 @@ const acorn = require('acorn'); const code = 'export default 42;\n'; const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'errors in shouldTransformCachedModule abort the build', options: { cache: { diff --git a/test/function/samples/plugin-error/buildEnd/_config.js b/test/function/samples/plugin-error/buildEnd/_config.js index 51ff22c84ba..327db966a4a 100644 --- a/test/function/samples/plugin-error/buildEnd/_config.js +++ b/test/function/samples/plugin-error/buildEnd/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/plugin-error/buildStart/_config.js b/test/function/samples/plugin-error/buildStart/_config.js index 0d4cf41a697..6ea085f42fc 100644 --- a/test/function/samples/plugin-error/buildStart/_config.js +++ b/test/function/samples/plugin-error/buildStart/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/plugin-error/generateBundle/_config.js b/test/function/samples/plugin-error/generateBundle/_config.js index 238e5a609e1..7e17c2b92aa 100644 --- a/test/function/samples/plugin-error/generateBundle/_config.js +++ b/test/function/samples/plugin-error/generateBundle/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/plugin-error/load/_config.js b/test/function/samples/plugin-error/load/_config.js index 5f25731c9ef..270ef537b52 100644 --- a/test/function/samples/plugin-error/load/_config.js +++ b/test/function/samples/plugin-error/load/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/plugin-error/renderChunk/_config.js b/test/function/samples/plugin-error/renderChunk/_config.js index 7effb36e1b9..dcc254529b6 100644 --- a/test/function/samples/plugin-error/renderChunk/_config.js +++ b/test/function/samples/plugin-error/renderChunk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/plugin-error/renderStart/_config.js b/test/function/samples/plugin-error/renderStart/_config.js index dd2e0519641..4756298ddb4 100644 --- a/test/function/samples/plugin-error/renderStart/_config.js +++ b/test/function/samples/plugin-error/renderStart/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/plugin-error/resolveId/_config.js b/test/function/samples/plugin-error/resolveId/_config.js index 20f0cdf0ed7..9b3390ca35c 100644 --- a/test/function/samples/plugin-error/resolveId/_config.js +++ b/test/function/samples/plugin-error/resolveId/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'buildStart hooks can use this.error', options: { plugins: [ diff --git a/test/function/samples/plugin-error/transform/_config.js b/test/function/samples/plugin-error/transform/_config.js index 8e3bdf9933c..1c893155d14 100644 --- a/test/function/samples/plugin-error/transform/_config.js +++ b/test/function/samples/plugin-error/transform/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'plugin transform hooks can use `this.error({...}, char)` (#1140)', options: { plugins: [ diff --git a/test/function/samples/plugin-module-information-early-access/_config.js b/test/function/samples/plugin-module-information-early-access/_config.js index 9d69f53c744..16e1e96e0cc 100644 --- a/test/function/samples/plugin-module-information-early-access/_config.js +++ b/test/function/samples/plugin-module-information-early-access/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles accessing module information via plugins early in a graceful way', options: { external: ['path'], diff --git a/test/function/samples/plugin-module-information-no-cache/_config.js b/test/function/samples/plugin-module-information-no-cache/_config.js index b84b8e87f36..3ea09c6a823 100644 --- a/test/function/samples/plugin-module-information-no-cache/_config.js +++ b/test/function/samples/plugin-module-information-no-cache/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles accessing module information via plugins with cache disabled', options: { cache: false, diff --git a/test/function/samples/plugin-module-information/_config.js b/test/function/samples/plugin-module-information/_config.js index c63b1bf1231..9890061d0fd 100644 --- a/test/function/samples/plugin-module-information/_config.js +++ b/test/function/samples/plugin-module-information/_config.js @@ -9,7 +9,7 @@ const ID_PATH = 'path'; let rendered = false; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides module information on the plugin context', options: { external: ['path'], diff --git a/test/function/samples/plugin-parse-ast-receives-comments/_config.js b/test/function/samples/plugin-parse-ast-receives-comments/_config.js index e8d91032219..2b25e45184e 100644 --- a/test/function/samples/plugin-parse-ast-receives-comments/_config.js +++ b/test/function/samples/plugin-parse-ast-receives-comments/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const comments = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'plugin parse ast receives comments', options: { plugins: [ diff --git a/test/function/samples/plugin-parse-ast-remove-sourcemapping/_config.js b/test/function/samples/plugin-parse-ast-remove-sourcemapping/_config.js index b72807fcca5..a9f1387ca80 100644 --- a/test/function/samples/plugin-parse-ast-remove-sourcemapping/_config.js +++ b/test/function/samples/plugin-parse-ast-remove-sourcemapping/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'remove source mapping comment even if code is parsed by PluginContext.parse method', options: { plugins: [ diff --git a/test/function/samples/plugin-parse/_config.js b/test/function/samples/plugin-parse/_config.js index 097f59b51f3..b3e98c64e1e 100644 --- a/test/function/samples/plugin-parse/_config.js +++ b/test/function/samples/plugin-parse/_config.js @@ -1,6 +1,6 @@ const MagicString = require('magic-string'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'plugin transform hooks can use `this.parse(code, options)`', options: { plugins: [ diff --git a/test/function/samples/plugin-warn-loc-instead-pos/_config.js b/test/function/samples/plugin-warn-loc-instead-pos/_config.js index 7f58e70d324..1fe4904b40c 100644 --- a/test/function/samples/plugin-warn-loc-instead-pos/_config.js +++ b/test/function/samples/plugin-warn-loc-instead-pos/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: '`this.warn(...)` accepts { line, column } object as second parameter (#1265)', options: { plugins: [ diff --git a/test/function/samples/plugin-warn/_config.js b/test/function/samples/plugin-warn/_config.js index 4065152e570..32c110eadc7 100644 --- a/test/function/samples/plugin-warn/_config.js +++ b/test/function/samples/plugin-warn/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'plugin transform hooks can use `this.warn({...}, char)` (#1140)', options: { plugins: [ diff --git a/test/function/samples/plugins-can-manipulate-options/_config.js b/test/function/samples/plugins-can-manipulate-options/_config.js index 3b5e91d705b..90fa3d26b1f 100644 --- a/test/function/samples/plugins-can-manipulate-options/_config.js +++ b/test/function/samples/plugins-can-manipulate-options/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'plugins can manipulate the options object', options: { plugins: [ diff --git a/test/function/samples/preload-after-build/_config.js b/test/function/samples/preload-after-build/_config.js index 38e49b24048..408fd1998e5 100644 --- a/test/function/samples/preload-after-build/_config.js +++ b/test/function/samples/preload-after-build/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports this.load() in buildEnd and renderStart', options: { plugins: [ diff --git a/test/function/samples/preload-cyclic-module/_config.js b/test/function/samples/preload-cyclic-module/_config.js index 5ee213ed4de..9d666accef4 100644 --- a/test/function/samples/preload-cyclic-module/_config.js +++ b/test/function/samples/preload-cyclic-module/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_PROXY = path.join(__dirname, 'main.js?proxy'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles pre-loading a cyclic module in the resolveId hook', warnings: [ { diff --git a/test/function/samples/preload-loading-module/_config.js b/test/function/samples/preload-loading-module/_config.js index 2a1c50c31eb..8779dfafa26 100644 --- a/test/function/samples/preload-loading-module/_config.js +++ b/test/function/samples/preload-loading-module/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); let preloadedCode; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'waits for pre-loaded modules that are currently loading', options: { plugins: [ diff --git a/test/function/samples/preload-module/_config.js b/test/function/samples/preload-module/_config.js index 9d4d0d992c0..9cc42cc09b2 100644 --- a/test/function/samples/preload-module/_config.js +++ b/test/function/samples/preload-module/_config.js @@ -8,7 +8,7 @@ const loadedModules = []; const transformedModules = []; const parsedModules = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows pre-loading modules via this.load', options: { plugins: [ diff --git a/test/function/samples/preserve-for-of-iterable/_config.js b/test/function/samples/preserve-for-of-iterable/_config.js index b33cebaa6e4..d9b466ae710 100644 --- a/test/function/samples/preserve-for-of-iterable/_config.js +++ b/test/function/samples/preserve-for-of-iterable/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves for...of loops' }); diff --git a/test/function/samples/preserve-modules-circular-order/_config.js b/test/function/samples/preserve-modules-circular-order/_config.js index d087f3c548c..39b23282274 100644 --- a/test/function/samples/preserve-modules-circular-order/_config.js +++ b/test/function/samples/preserve-modules-circular-order/_config.js @@ -5,7 +5,7 @@ const ID_DATA = path.join(__dirname, 'data.js'); const ID_TAG = path.join(__dirname, 'tag.js'); const executionOrder = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves execution order for circular dependencies when preserving modules', options: { output: { preserveModules: true } diff --git a/test/function/samples/preserve-modules-default-mode-namespace/_config.js b/test/function/samples/preserve-modules-default-mode-namespace/_config.js index fbe8e968a22..3a1661a514c 100644 --- a/test/function/samples/preserve-modules-default-mode-namespace/_config.js +++ b/test/function/samples/preserve-modules-default-mode-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'import namespace from chunks with default export mode when preserving modules', options: { input: ['main', 'lib'], diff --git a/test/function/samples/preserve-modules/inline-dynamic-imports/_config.js b/test/function/samples/preserve-modules/inline-dynamic-imports/_config.js index f58460ada68..a23f486275e 100644 --- a/test/function/samples/preserve-modules/inline-dynamic-imports/_config.js +++ b/test/function/samples/preserve-modules/inline-dynamic-imports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Inlining dynamic imports is not supported when preserving modules', options: { input: ['main.js'], diff --git a/test/function/samples/preserve-modules/invalid-default-export-mode/_config.js b/test/function/samples/preserve-modules/invalid-default-export-mode/_config.js index a256a9e28e3..105e59a7c53 100644 --- a/test/function/samples/preserve-modules/invalid-default-export-mode/_config.js +++ b/test/function/samples/preserve-modules/invalid-default-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using default export mode with named exports', options: { input: ['main.js'], diff --git a/test/function/samples/preserve-modules/invalid-no-preserve-entry-signatures/_config.js b/test/function/samples/preserve-modules/invalid-no-preserve-entry-signatures/_config.js index be7bf6a01a0..2b32dc41517 100644 --- a/test/function/samples/preserve-modules/invalid-no-preserve-entry-signatures/_config.js +++ b/test/function/samples/preserve-modules/invalid-no-preserve-entry-signatures/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when setting preserveEntrySignatures to false', options: { input: ['main.js'], diff --git a/test/function/samples/preserve-modules/invalid-none-export-mode/_config.js b/test/function/samples/preserve-modules/invalid-none-export-mode/_config.js index 299228ebea7..2f887691bc7 100644 --- a/test/function/samples/preserve-modules/invalid-none-export-mode/_config.js +++ b/test/function/samples/preserve-modules/invalid-none-export-mode/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws when using none export mode with named exports', options: { input: ['main.js'], diff --git a/test/function/samples/preserve-modules/manual-chunks/_config.js b/test/function/samples/preserve-modules/manual-chunks/_config.js index 51fd43adc8a..9bfdc36703d 100644 --- a/test/function/samples/preserve-modules/manual-chunks/_config.js +++ b/test/function/samples/preserve-modules/manual-chunks/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Assigning manual chunks fails when preserving modules', options: { input: ['main.js'], diff --git a/test/function/samples/preserve-modules/mixed-exports/_config.js b/test/function/samples/preserve-modules/mixed-exports/_config.js index 8ef37964527..1b09118f0bf 100644 --- a/test/function/samples/preserve-modules/mixed-exports/_config.js +++ b/test/function/samples/preserve-modules/mixed-exports/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_LIB1 = path.join(__dirname, 'lib1.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns for mixed exports in all chunks when preserving modules', options: { input: ['main.js'], diff --git a/test/function/samples/preserve-modules/virtual-modules-conflict/_config.js b/test/function/samples/preserve-modules/virtual-modules-conflict/_config.js index da99df0d072..1ed78a68107 100644 --- a/test/function/samples/preserve-modules/virtual-modules-conflict/_config.js +++ b/test/function/samples/preserve-modules/virtual-modules-conflict/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { plugins: [ diff --git a/test/function/samples/preserve-modules/virtual-modules/_config.js b/test/function/samples/preserve-modules/virtual-modules/_config.js index 8a15b22e179..b5ea264179c 100644 --- a/test/function/samples/preserve-modules/virtual-modules/_config.js +++ b/test/function/samples/preserve-modules/virtual-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Generates actual files for virtual modules when preserving modules', options: { plugins: [ diff --git a/test/function/samples/preserve-symlink/_config.js b/test/function/samples/preserve-symlink/_config.js index abc9f8c9d15..cdc08ad12dd 100644 --- a/test/function/samples/preserve-symlink/_config.js +++ b/test/function/samples/preserve-symlink/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ skip: process.platform === 'win32', description: 'follows symlinks', options: { diff --git a/test/function/samples/preserves-catch-argument/_config.js b/test/function/samples/preserves-catch-argument/_config.js index 80905337c7f..f3e02e49af6 100644 --- a/test/function/samples/preserves-catch-argument/_config.js +++ b/test/function/samples/preserves-catch-argument/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not replace argument to catch block (#1462)', options: { external: ['path'] diff --git a/test/function/samples/preserves-default-exports-used-locally/_config.js b/test/function/samples/preserves-default-exports-used-locally/_config.js index fdc38985eac..6a5ad4fc865 100644 --- a/test/function/samples/preserves-default-exports-used-locally/_config.js +++ b/test/function/samples/preserves-default-exports-used-locally/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves default exports that are only used locally (#984)' }); diff --git a/test/function/samples/preserves-function-expression-names/_config.js b/test/function/samples/preserves-function-expression-names/_config.js index 181d3d721c7..4a43c05ce18 100644 --- a/test/function/samples/preserves-function-expression-names/_config.js +++ b/test/function/samples/preserves-function-expression-names/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not rewrite function expression names incorrectly (#1083)', options: { external: ['path'] diff --git a/test/function/samples/preserves-var-declarations-in-dead-branches/_config.js b/test/function/samples/preserves-var-declarations-in-dead-branches/_config.js index 55301996a21..6ee480a836c 100644 --- a/test/function/samples/preserves-var-declarations-in-dead-branches/_config.js +++ b/test/function/samples/preserves-var-declarations-in-dead-branches/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves var declarations in dead branches (#977)' }); diff --git a/test/function/samples/prevent-asi-with-line-comments/_config.js b/test/function/samples/prevent-asi-with-line-comments/_config.js index daa566739d8..eb22ceada03 100644 --- a/test/function/samples/prevent-asi-with-line-comments/_config.js +++ b/test/function/samples/prevent-asi-with-line-comments/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prevent semicolon insertion for return statements when there are line comments', exports(exports) { assert.strictEqual(exports(), 1); diff --git a/test/function/samples/prevent-context-resolve-loop/_config.js b/test/function/samples/prevent-context-resolve-loop/_config.js index 9a6d0916da5..50259501cb7 100644 --- a/test/function/samples/prevent-context-resolve-loop/_config.js +++ b/test/function/samples/prevent-context-resolve-loop/_config.js @@ -8,7 +8,7 @@ const ID_OTHER_4 = path.join(__dirname, 'other4.js'); const thirdPluginCalls = new Set(); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prevents infinite loops when several plugins are calling this.resolve in resolveId', options: { plugins: [ diff --git a/test/function/samples/prevent-tree-shaking-asi/_config.js b/test/function/samples/prevent-tree-shaking-asi/_config.js index aa2192ca35a..7431deafbd1 100644 --- a/test/function/samples/prevent-tree-shaking-asi/_config.js +++ b/test/function/samples/prevent-tree-shaking-asi/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prevent automatic semicolon insertion from changing behaviour when tree-shaking', options: { treeshake: { tryCatchDeoptimization: false } diff --git a/test/function/samples/property-keys-not-renamed/_config.js b/test/function/samples/property-keys-not-renamed/_config.js index 5cf551a130b..bb53d7ef257 100644 --- a/test/function/samples/property-keys-not-renamed/_config.js +++ b/test/function/samples/property-keys-not-renamed/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not rename property keys' }); diff --git a/test/function/samples/propertyReadSideEffects-always/_config.js b/test/function/samples/propertyReadSideEffects-always/_config.js index e6be3a6232c..09a7f87920f 100644 --- a/test/function/samples/propertyReadSideEffects-always/_config.js +++ b/test/function/samples/propertyReadSideEffects-always/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'verify property accesses are retained for getters with side effects', options: { treeshake: { propertyReadSideEffects: 'always' } } }); diff --git a/test/function/samples/protect-cjs-globals/_config.js b/test/function/samples/protect-cjs-globals/_config.js index bf9f2f1772b..e9a4157b03f 100644 --- a/test/function/samples/protect-cjs-globals/_config.js +++ b/test/function/samples/protect-cjs-globals/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'prevent conflicts with cjs module globals' }); diff --git a/test/function/samples/proto-accessors/_config.js b/test/function/samples/proto-accessors/_config.js index 57787d9c8c3..795ccf6aa52 100644 --- a/test/function/samples/proto-accessors/_config.js +++ b/test/function/samples/proto-accessors/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles getters and setters on __proto__ properties' }); diff --git a/test/function/samples/re-export-default-import/_config.js b/test/function/samples/re-export-default-import/_config.js index fae2914d005..412ac13e7bd 100644 --- a/test/function/samples/re-export-default-import/_config.js +++ b/test/function/samples/re-export-default-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports a default import' }); diff --git a/test/function/samples/re-export-namespace-import/_config.js b/test/function/samples/re-export-namespace-import/_config.js index 50ee89a11dc..36cdfe295ad 100644 --- a/test/function/samples/re-export-namespace-import/_config.js +++ b/test/function/samples/re-export-namespace-import/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports a namespace import' }); diff --git a/test/function/samples/reassign-array-literal-elements/_config.js b/test/function/samples/reassign-array-literal-elements/_config.js index 38239028818..a0e0cc67550 100644 --- a/test/function/samples/reassign-array-literal-elements/_config.js +++ b/test/function/samples/reassign-array-literal-elements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure reassignments of array elements are tracked' }); diff --git a/test/function/samples/reassign-computed-prototype/_config.js b/test/function/samples/reassign-computed-prototype/_config.js index ed47228fce6..768bd663e99 100644 --- a/test/function/samples/reassign-computed-prototype/_config.js +++ b/test/function/samples/reassign-computed-prototype/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reassign function prototype via computed property access', context: { proto: 'prototype' diff --git a/test/function/samples/reassign-constructor-parameter-property/_config.js b/test/function/samples/reassign-constructor-parameter-property/_config.js index 6aa7da35768..5dd1b893f6c 100644 --- a/test/function/samples/reassign-constructor-parameter-property/_config.js +++ b/test/function/samples/reassign-constructor-parameter-property/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track reassignments of properties of constructor parameters' }); diff --git a/test/function/samples/reassign-double-declarations/_config.js b/test/function/samples/reassign-double-declarations/_config.js index 23d91ecf1ae..8aa977c0079 100644 --- a/test/function/samples/reassign-double-declarations/_config.js +++ b/test/function/samples/reassign-double-declarations/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure reassignments of double declared variables and their initializers are tracked' }); diff --git a/test/function/samples/reassign-empty-objects/_config.js b/test/function/samples/reassign-empty-objects/_config.js index 1fc8585285e..230ac9fb891 100644 --- a/test/function/samples/reassign-empty-objects/_config.js +++ b/test/function/samples/reassign-empty-objects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track reassignments of empty objects (#2306)' }); diff --git a/test/function/samples/reassign-for-loop-declarations/_config.js b/test/function/samples/reassign-for-loop-declarations/_config.js index 99b1fbd1630..f5afcf4ee06 100644 --- a/test/function/samples/reassign-for-loop-declarations/_config.js +++ b/test/function/samples/reassign-for-loop-declarations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reassign for-loop declarations' }); diff --git a/test/function/samples/reassign-import-fails/_config.js b/test/function/samples/reassign-import-fails/_config.js index fa0d4ce3f3e..71ca9a3ee3f 100644 --- a/test/function/samples/reassign-import-fails/_config.js +++ b/test/function/samples/reassign-import-fails/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disallows assignments to imported bindings', error: { code: 'ILLEGAL_REASSIGNMENT', diff --git a/test/function/samples/reassign-import-not-at-top-level-fails/_config.js b/test/function/samples/reassign-import-not-at-top-level-fails/_config.js index 31202b2d93c..d26f7c87fc5 100644 --- a/test/function/samples/reassign-import-not-at-top-level-fails/_config.js +++ b/test/function/samples/reassign-import-not-at-top-level-fails/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disallows assignments to imported bindings not at the top level', error: { code: 'ILLEGAL_REASSIGNMENT', diff --git a/test/function/samples/reassign-namespace/_config.js b/test/function/samples/reassign-namespace/_config.js index 5e0ade5adcf..8466a6c756c 100644 --- a/test/function/samples/reassign-namespace/_config.js +++ b/test/function/samples/reassign-namespace/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'members of namespaces are reassigned when the namespace is passed to a function' }); diff --git a/test/function/samples/reassign-object-literal-1/_config.js b/test/function/samples/reassign-object-literal-1/_config.js index 5072e984dd3..49bf74fcc5c 100644 --- a/test/function/samples/reassign-object-literal-1/_config.js +++ b/test/function/samples/reassign-object-literal-1/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track reassignments through object literals' }); diff --git a/test/function/samples/reassign-object-literal-2/_config.js b/test/function/samples/reassign-object-literal-2/_config.js index 5072e984dd3..49bf74fcc5c 100644 --- a/test/function/samples/reassign-object-literal-2/_config.js +++ b/test/function/samples/reassign-object-literal-2/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track reassignments through object literals' }); diff --git a/test/function/samples/reassign-parameter-property/_config.js b/test/function/samples/reassign-parameter-property/_config.js index d1e908ba3a4..f78a29bf0cc 100644 --- a/test/function/samples/reassign-parameter-property/_config.js +++ b/test/function/samples/reassign-parameter-property/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track reassignments of properties of function parameters' }); diff --git a/test/function/samples/reassign-parameter/_config.js b/test/function/samples/reassign-parameter/_config.js index 54f38031079..2b73aa449ac 100644 --- a/test/function/samples/reassign-parameter/_config.js +++ b/test/function/samples/reassign-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'parameters can be reassigned/updated' }); diff --git a/test/function/samples/reassign-pattern-defaults/_config.js b/test/function/samples/reassign-pattern-defaults/_config.js index fd344882a78..46ee6049e09 100644 --- a/test/function/samples/reassign-pattern-defaults/_config.js +++ b/test/function/samples/reassign-pattern-defaults/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure reassignments of pattern defaults are tracked' }); diff --git a/test/function/samples/reassign-return-expression/_config.js b/test/function/samples/reassign-return-expression/_config.js index de31c267c50..14cf0f453fa 100644 --- a/test/function/samples/reassign-return-expression/_config.js +++ b/test/function/samples/reassign-return-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track reassignments of single function return expressions' }); diff --git a/test/function/samples/reassign-return-expressions/_config.js b/test/function/samples/reassign-return-expressions/_config.js index 0816464c302..401837c2056 100644 --- a/test/function/samples/reassign-return-expressions/_config.js +++ b/test/function/samples/reassign-return-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'track reassignments of multiple function return expressions' }); diff --git a/test/function/samples/reassigned-return-expression/_config.js b/test/function/samples/reassigned-return-expression/_config.js index f6278dda9bf..96e9bc7acbf 100644 --- a/test/function/samples/reassigned-return-expression/_config.js +++ b/test/function/samples/reassigned-return-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not bind return expressions before assignments are bound (#3382)' }); diff --git a/test/function/samples/recursive-parameter-assignments/_config.js b/test/function/samples/recursive-parameter-assignments/_config.js index 09d2d7c766c..152845f3dd7 100644 --- a/test/function/samples/recursive-parameter-assignments/_config.js +++ b/test/function/samples/recursive-parameter-assignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Avoid maximum call stack error with recursive parameter assignments (#1710).' }); diff --git a/test/function/samples/recursive-reexports/_config.js b/test/function/samples/recursive-reexports/_config.js index 665300697c5..1fbde929b5e 100644 --- a/test/function/samples/recursive-reexports/_config.js +++ b/test/function/samples/recursive-reexports/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_OTHER = path.join(__dirname, 'other.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles recursive namespace reexports', exports(exports) { assert.deepStrictEqual(exports, { main: 'main', other: 'other' }); diff --git a/test/function/samples/redeclare-parameter/_config.js b/test/function/samples/redeclare-parameter/_config.js index bda0919e1a0..7209c38dd9c 100644 --- a/test/function/samples/redeclare-parameter/_config.js +++ b/test/function/samples/redeclare-parameter/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'associates redeclared parameters (#2451)' }); diff --git a/test/function/samples/reexport-from-synthetic/_config.js b/test/function/samples/reexport-from-synthetic/_config.js index d6e24fef885..a3a2728975b 100644 --- a/test/function/samples/reexport-from-synthetic/_config.js +++ b/test/function/samples/reexport-from-synthetic/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles reexporting a synthetic namespace from a non-synthetic module', options: { plugins: [ diff --git a/test/function/samples/reexport-missing-error/_config.js b/test/function/samples/reexport-missing-error/_config.js index f39550fdf72..923cf1477ca 100644 --- a/test/function/samples/reexport-missing-error/_config.js +++ b/test/function/samples/reexport-missing-error/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_EMPTY = path.join(__dirname, 'empty.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'reexporting a missing identifier should print an error', error: { binding: 'foo', diff --git a/test/function/samples/reexport-ns/_config.js b/test/function/samples/reexport-ns/_config.js index 9d8ecf5708d..251ca56d875 100644 --- a/test/function/samples/reexport-ns/_config.js +++ b/test/function/samples/reexport-ns/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external namespace reexport', options: { external: ['external'], diff --git a/test/function/samples/reexports-from-external/_config.js b/test/function/samples/reexports-from-external/_config.js index d1224e3a156..a614d7550ff 100644 --- a/test/function/samples/reexports-from-external/_config.js +++ b/test/function/samples/reexports-from-external/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 're-exports * from external module (#791)', options: { external: ['external'] diff --git a/test/function/samples/relative-external-include-once-nested/_config.js b/test/function/samples/relative-external-include-once-nested/_config.js index fc861ba5203..7826d561b45 100644 --- a/test/function/samples/relative-external-include-once-nested/_config.js +++ b/test/function/samples/relative-external-include-once-nested/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes a relative external module only once (nested version)', options: { external: path.join(__dirname, './first/foo.js') diff --git a/test/function/samples/relative-external-include-once-two-external/_config.js b/test/function/samples/relative-external-include-once-two-external/_config.js index a74eacfac5f..357ee534cc4 100644 --- a/test/function/samples/relative-external-include-once-two-external/_config.js +++ b/test/function/samples/relative-external-include-once-two-external/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { join } = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes a relative external module only once (two external deps)', options: { external: [join(__dirname, './foo.js'), join(__dirname, './first/foo.js')] diff --git a/test/function/samples/relative-external-include-once-up/_config.js b/test/function/samples/relative-external-include-once-up/_config.js index 4aa6a77ddab..8c9b1adc025 100644 --- a/test/function/samples/relative-external-include-once-up/_config.js +++ b/test/function/samples/relative-external-include-once-up/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes a relative external module only once (from upper directory too)', options: { input: path.join(__dirname, 'first', 'main.js'), diff --git a/test/function/samples/relative-external-include-once/_config.js b/test/function/samples/relative-external-include-once/_config.js index ad97827c7c4..2650715af66 100644 --- a/test/function/samples/relative-external-include-once/_config.js +++ b/test/function/samples/relative-external-include-once/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes a relative external module only once', options: { external: path.join(__dirname, './foo.js') diff --git a/test/function/samples/relative-outside-external/_config.js b/test/function/samples/relative-outside-external/_config.js index 520b5cb5aeb..eb14033e0a2 100644 --- a/test/function/samples/relative-outside-external/_config.js +++ b/test/function/samples/relative-outside-external/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const cwd = process.cwd; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly resolves relative external imports from outside directories', options: { external() { diff --git a/test/function/samples/removes-empty-exported-vars/_config.js b/test/function/samples/removes-empty-exported-vars/_config.js index 012d1d58035..231e6509a45 100644 --- a/test/function/samples/removes-empty-exported-vars/_config.js +++ b/test/function/samples/removes-empty-exported-vars/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes empty exported var declarations', exports(exports) { assert.equal(exports.foo, 42); diff --git a/test/function/samples/rename-conditional-expression-children/_config.js b/test/function/samples/rename-conditional-expression-children/_config.js index 0ea4d895a29..81fe5e52797 100644 --- a/test/function/samples/rename-conditional-expression-children/_config.js +++ b/test/function/samples/rename-conditional-expression-children/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly renders children of ConditionalExpressions' }); diff --git a/test/function/samples/rename-default-export/_config.js b/test/function/samples/rename-default-export/_config.js index 2976d6496da..102b9875260 100644 --- a/test/function/samples/rename-default-export/_config.js +++ b/test/function/samples/rename-default-export/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'avoids SyntaxError with default token (#33)', exports(exports) { assert.equal(exports.foo, 42); diff --git a/test/function/samples/renamed-arguments/_config.js b/test/function/samples/renamed-arguments/_config.js index f3d9fe19ce8..dd3abbc8bf9 100644 --- a/test/function/samples/renamed-arguments/_config.js +++ b/test/function/samples/renamed-arguments/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'function arguments are renamed as appropriate (#32)', exports(exports) { const object = {}; diff --git a/test/function/samples/render-chunk-async/_config.js b/test/function/samples/render-chunk-async/_config.js index 0f07d73c192..a64a861caf3 100644 --- a/test/function/samples/render-chunk-async/_config.js +++ b/test/function/samples/render-chunk-async/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'bundle transformers can be asynchronous', options: { plugins: [ diff --git a/test/function/samples/resolve-id-object/_config.js b/test/function/samples/resolve-id-object/_config.js index 72be759f41d..0b7d1226105 100644 --- a/test/function/samples/resolve-id-object/_config.js +++ b/test/function/samples/resolve-id-object/_config.js @@ -1,6 +1,6 @@ const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows resolving an id with an object', options: { plugins: { diff --git a/test/function/samples/resolve-relative-external-id/_config.js b/test/function/samples/resolve-relative-external-id/_config.js index ac4eb53a4fb..c56c4053730 100644 --- a/test/function/samples/resolve-relative-external-id/_config.js +++ b/test/function/samples/resolve-relative-external-id/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'resolves relative external ids', options: { external: [path.join(__dirname, 'external.js'), path.join(__dirname, 'nested', 'external.js')], diff --git a/test/function/samples/resolve-unordered-assignments-2/_config.js b/test/function/samples/resolve-unordered-assignments-2/_config.js index 2d0a6967586..d429eda511b 100644 --- a/test/function/samples/resolve-unordered-assignments-2/_config.js +++ b/test/function/samples/resolve-unordered-assignments-2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Assignments should be correctly bound independent of their order', exports(exports) { assert.equal(exports.baz, 'present'); diff --git a/test/function/samples/resolve-unordered-assignments/_config.js b/test/function/samples/resolve-unordered-assignments/_config.js index 2d0a6967586..d429eda511b 100644 --- a/test/function/samples/resolve-unordered-assignments/_config.js +++ b/test/function/samples/resolve-unordered-assignments/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Assignments should be correctly bound independent of their order', exports(exports) { assert.equal(exports.baz, 'present'); diff --git a/test/function/samples/resolveid-is-entry/_config.js b/test/function/samples/resolveid-is-entry/_config.js index 245a8c9b9ff..ac7436ef12d 100644 --- a/test/function/samples/resolveid-is-entry/_config.js +++ b/test/function/samples/resolveid-is-entry/_config.js @@ -3,7 +3,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'sends correct isEntry information to resolveId hooks', options: { plugins: [ diff --git a/test/function/samples/resolves-namespace-default/_config.js b/test/function/samples/resolves-namespace-default/_config.js index e03d56dfb63..0303e9eb5a9 100644 --- a/test/function/samples/resolves-namespace-default/_config.js +++ b/test/function/samples/resolves-namespace-default/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: "namespace's 'default' properties should be available", exports(exports) { diff --git a/test/function/samples/respect-default-export-reexporter-side-effects/_config.js b/test/function/samples/respect-default-export-reexporter-side-effects/_config.js index e1617c00864..23ce63b913f 100644 --- a/test/function/samples/respect-default-export-reexporter-side-effects/_config.js +++ b/test/function/samples/respect-default-export-reexporter-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respect side-effects in reexporting modules even if moduleSideEffects are off', options: { treeshake: { diff --git a/test/function/samples/respect-reexporter-side-effects/_config.js b/test/function/samples/respect-reexporter-side-effects/_config.js index e1617c00864..23ce63b913f 100644 --- a/test/function/samples/respect-reexporter-side-effects/_config.js +++ b/test/function/samples/respect-reexporter-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respect side-effects in reexporting modules even if moduleSideEffects are off', options: { treeshake: { diff --git a/test/function/samples/respect-synthetic-export-reexporter-side-effects/_config.js b/test/function/samples/respect-synthetic-export-reexporter-side-effects/_config.js index 55b000453da..12962903ccf 100644 --- a/test/function/samples/respect-synthetic-export-reexporter-side-effects/_config.js +++ b/test/function/samples/respect-synthetic-export-reexporter-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'respect side-effects in reexporting modules even if moduleSideEffects are off', options: { treeshake: { diff --git a/test/function/samples/retain-unknown-prototype-access/_config.js b/test/function/samples/retain-unknown-prototype-access/_config.js index e9019a1fdbe..089cb025233 100644 --- a/test/function/samples/retain-unknown-prototype-access/_config.js +++ b/test/function/samples/retain-unknown-prototype-access/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treats unknown builtin prototype properties as unknown' }); diff --git a/test/function/samples/retains-sort-order-b/_config.js b/test/function/samples/retains-sort-order-b/_config.js index 78543944ae9..9a27285e3b8 100644 --- a/test/function/samples/retains-sort-order-b/_config.js +++ b/test/function/samples/retains-sort-order-b/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'sorts statements according to their original order within modules, part 2', exports(exports) { assert.equal(exports.answer, 42); diff --git a/test/function/samples/retains-sort-order/_config.js b/test/function/samples/retains-sort-order/_config.js index 54f71cc95fd..34c4d65e12c 100644 --- a/test/function/samples/retains-sort-order/_config.js +++ b/test/function/samples/retains-sort-order/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'sorts statements according to their original order within modules', exports(exports) { assert.equal(exports, 'GREAT SUCCESS'); diff --git a/test/function/samples/return-expression-depending-on-conditional/_config.js b/test/function/samples/return-expression-depending-on-conditional/_config.js index ebe8582796d..a09f7f1414a 100644 --- a/test/function/samples/return-expression-depending-on-conditional/_config.js +++ b/test/function/samples/return-expression-depending-on-conditional/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks return expressions that depend on conditional expressions that are deoptimized at some point' }); diff --git a/test/function/samples/returned-array-mutation/_config.js b/test/function/samples/returned-array-mutation/_config.js index 5136218a1d7..7aedc8b8dad 100644 --- a/test/function/samples/returned-array-mutation/_config.js +++ b/test/function/samples/returned-array-mutation/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks array mutations' }); diff --git a/test/function/samples/reuse-resolve-meta/_config.js b/test/function/samples/reuse-resolve-meta/_config.js index f403e7814d5..18abd3c77d6 100644 --- a/test/function/samples/reuse-resolve-meta/_config.js +++ b/test/function/samples/reuse-resolve-meta/_config.js @@ -4,7 +4,7 @@ const meta = { plugin: { initial: true } }; const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not modify meta objects passed in resolveId', options: { plugins: [ diff --git a/test/function/samples/rewrite-member-expressions/_config.js b/test/function/samples/rewrite-member-expressions/_config.js index f99a197486b..77b6b8b22e6 100644 --- a/test/function/samples/rewrite-member-expressions/_config.js +++ b/test/function/samples/rewrite-member-expressions/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'rewrites identifiers at the head of member expressions' }); diff --git a/test/function/samples/sequence-expression/_config.js b/test/function/samples/sequence-expression/_config.js index 6bccca5e520..e23f4ebf348 100644 --- a/test/function/samples/sequence-expression/_config.js +++ b/test/function/samples/sequence-expression/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not change context of callable in sequence expressions' }); diff --git a/test/function/samples/sequence-expressions-template-tag/_config.js b/test/function/samples/sequence-expressions-template-tag/_config.js index b234068e3e9..848adc8d6a6 100644 --- a/test/function/samples/sequence-expressions-template-tag/_config.js +++ b/test/function/samples/sequence-expressions-template-tag/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses corrrect "this" for tagged template expressions in simplified sequences' }); diff --git a/test/function/samples/shadowed-external-export/_config.js b/test/function/samples/shadowed-external-export/_config.js index f77f0b80216..8a33feb5e79 100644 --- a/test/function/samples/shadowed-external-export/_config.js +++ b/test/function/samples/shadowed-external-export/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external modules are not shadowed', options: { external: ['path'] diff --git a/test/function/samples/shadowed-namespace-b/_config.js b/test/function/samples/shadowed-namespace-b/_config.js index b2f601c3a6a..902a8a9f973 100644 --- a/test/function/samples/shadowed-namespace-b/_config.js +++ b/test/function/samples/shadowed-namespace-b/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'namespaces are not shadowed (b)' }); diff --git a/test/function/samples/shadowed-namespace/_config.js b/test/function/samples/shadowed-namespace/_config.js index 0183acad380..e8e90c5ee51 100644 --- a/test/function/samples/shadowed-namespace/_config.js +++ b/test/function/samples/shadowed-namespace/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'namespaces are not shadowed' }); diff --git a/test/function/samples/shadowed-variables/_config.js b/test/function/samples/shadowed-variables/_config.js index 0aeaf4eccd8..dffb5dd4307 100644 --- a/test/function/samples/shadowed-variables/_config.js +++ b/test/function/samples/shadowed-variables/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renames shadowed variables correctly' }); diff --git a/test/function/samples/shims-missing-exports/_config.js b/test/function/samples/shims-missing-exports/_config.js index 8d00b45a22d..e824bb64e9e 100644 --- a/test/function/samples/shims-missing-exports/_config.js +++ b/test/function/samples/shims-missing-exports/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_DEP1 = path.join(__dirname, 'dep1.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'shims missing exports', options: { shimMissingExports: true diff --git a/test/function/samples/side-effect-free-module-function/_config.js b/test/function/samples/side-effect-free-module-function/_config.js index 001bfc064ce..827d480db05 100644 --- a/test/function/samples/side-effect-free-module-function/_config.js +++ b/test/function/samples/side-effect-free-module-function/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly include functions with side effects from side-effect-free modules (#3942)', options: { diff --git a/test/function/samples/side-effects-only-default-exports/_config.js b/test/function/samples/side-effects-only-default-exports/_config.js index cbfa848efba..1aba737cc45 100644 --- a/test/function/samples/side-effects-only-default-exports/_config.js +++ b/test/function/samples/side-effects-only-default-exports/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const mutated = {}; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Wraps inlined default exports which are rendered for side-effects only', options: { external: ['external'] diff --git a/test/function/samples/simplified-nested-if/_config.js b/test/function/samples/simplified-nested-if/_config.js index 24ea5ba631b..0697a089652 100644 --- a/test/function/samples/simplified-nested-if/_config.js +++ b/test/function/samples/simplified-nested-if/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'do not catch else branches from parent if statements when simplifiying if-statements', context: { diff --git a/test/function/samples/simplify-arrow-expression-with-object/_config.js b/test/function/samples/simplify-arrow-expression-with-object/_config.js index 5b12440fb30..7f9cf90e15b 100644 --- a/test/function/samples/simplify-arrow-expression-with-object/_config.js +++ b/test/function/samples/simplify-arrow-expression-with-object/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly simplifies arrow expressions where the right hand side becomes an object', exports(exports) { assert.deepStrictEqual(exports.conditional(), { x: 42, y: 43 }); diff --git a/test/function/samples/simplify-class-expression-assignment/_config.js b/test/function/samples/simplify-class-expression-assignment/_config.js index ad81fdd37e7..49d2640eb71 100644 --- a/test/function/samples/simplify-class-expression-assignment/_config.js +++ b/test/function/samples/simplify-class-expression-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'wraps class expressions in call expressions in simplified assignments' }); diff --git a/test/function/samples/simplify-function-expression-assignment/_config.js b/test/function/samples/simplify-function-expression-assignment/_config.js index 5c1cc70fea6..6fd7a94a2d6 100644 --- a/test/function/samples/simplify-function-expression-assignment/_config.js +++ b/test/function/samples/simplify-function-expression-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'wraps function expressions in call expressions in simplified assignments' }); diff --git a/test/function/samples/simplify-object-expression-assignment/_config.js b/test/function/samples/simplify-object-expression-assignment/_config.js index f0ed50cd89f..b3b2c7db699 100644 --- a/test/function/samples/simplify-object-expression-assignment/_config.js +++ b/test/function/samples/simplify-object-expression-assignment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'wraps object expressions in call expressions in simplified assignments' }); diff --git a/test/function/samples/simplify-sequence-expressions/_config.js b/test/function/samples/simplify-sequence-expressions/_config.js index eff54bcea10..bf5617a0fc5 100644 --- a/test/function/samples/simplify-sequence-expressions/_config.js +++ b/test/function/samples/simplify-sequence-expressions/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly simplify sequence expressions if the new leading element would require parentheses' }); diff --git a/test/function/samples/simplify-with-destructuring/_config.js b/test/function/samples/simplify-with-destructuring/_config.js index c1065e9e521..0e2de5021cd 100644 --- a/test/function/samples/simplify-with-destructuring/_config.js +++ b/test/function/samples/simplify-with-destructuring/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handle destructuring assignments in simplified sequence expressions' }); diff --git a/test/function/samples/simplify-with-function-iife/_config.js b/test/function/samples/simplify-with-function-iife/_config.js index 53321b8ff20..74b67dced6b 100644 --- a/test/function/samples/simplify-with-function-iife/_config.js +++ b/test/function/samples/simplify-with-function-iife/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly uses parentheses when a simplification would put a function IIFE first' }); diff --git a/test/function/samples/sourcemap-base-url-invalid/_config.js b/test/function/samples/sourcemap-base-url-invalid/_config.js index 5ccf4b4f4bb..d39d3d8afcf 100644 --- a/test/function/samples/sourcemap-base-url-invalid/_config.js +++ b/test/function/samples/sourcemap-base-url-invalid/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for invalid sourcemapBaseUrl', options: { output: { diff --git a/test/function/samples/sourcemap-inline-generatebundle/_config.js b/test/function/samples/sourcemap-inline-generatebundle/_config.js index fb573fef5a0..53e9814887e 100644 --- a/test/function/samples/sourcemap-inline-generatebundle/_config.js +++ b/test/function/samples/sourcemap-inline-generatebundle/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'includes inline sourcemap comments in generateBundle hook', options: { plugins: [ diff --git a/test/function/samples/sourcemap-true-generatebundle/_config.js b/test/function/samples/sourcemap-true-generatebundle/_config.js index ebd6f77ec9d..f9abc1bfe4f 100644 --- a/test/function/samples/sourcemap-true-generatebundle/_config.js +++ b/test/function/samples/sourcemap-true-generatebundle/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'emits sourcemaps before generateBundle hook', options: { plugins: [ diff --git a/test/function/samples/sourcemapping-url-comment/_config.js b/test/function/samples/sourcemapping-url-comment/_config.js index 864be257203..c1b01a65196 100644 --- a/test/function/samples/sourcemapping-url-comment/_config.js +++ b/test/function/samples/sourcemapping-url-comment/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'only removes valid sourcemapping URL comments (#1132)' }); diff --git a/test/function/samples/sourcemapping-url-multiline/_config.js b/test/function/samples/sourcemapping-url-multiline/_config.js index 54104762f23..c258c88d9da 100644 --- a/test/function/samples/sourcemapping-url-multiline/_config.js +++ b/test/function/samples/sourcemapping-url-multiline/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not mistakenly recognise sourceMappingURL comment with newline' }); diff --git a/test/function/samples/spread-arguments-unused/_config.js b/test/function/samples/spread-arguments-unused/_config.js index 0ae9eecf40d..d67255bcda8 100644 --- a/test/function/samples/spread-arguments-unused/_config.js +++ b/test/function/samples/spread-arguments-unused/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles using the spread operator to add arguments when the first argument is unused (#3652)' }); diff --git a/test/function/samples/statement-order/_config.js b/test/function/samples/statement-order/_config.js index 47057614af4..c46b7824f67 100644 --- a/test/function/samples/statement-order/_config.js +++ b/test/function/samples/statement-order/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correct statement order is preserved even in weird edge cases', context: { getAnswer(object) { diff --git a/test/function/samples/switch-break/_config.js b/test/function/samples/switch-break/_config.js index 6d521d86e64..006e24586ff 100644 --- a/test/function/samples/switch-break/_config.js +++ b/test/function/samples/switch-break/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'if switch does not always throw an error, retain the following break' }); diff --git a/test/function/samples/switch-cases-are-deconflicted/_config.js b/test/function/samples/switch-cases-are-deconflicted/_config.js index 689d766c5e5..a1dc6f47510 100644 --- a/test/function/samples/switch-cases-are-deconflicted/_config.js +++ b/test/function/samples/switch-cases-are-deconflicted/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deconflicts variables in switch cases (#1970)', exports(exports) { assert.equal(exports.fn1('1'), 'correct'); diff --git a/test/function/samples/switch-statement-nested-continue/_config.js b/test/function/samples/switch-statement-nested-continue/_config.js index 136d6ecf53c..095bef32b8e 100644 --- a/test/function/samples/switch-statement-nested-continue/_config.js +++ b/test/function/samples/switch-statement-nested-continue/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treats continue different from break in switch statements' }); diff --git a/test/function/samples/switch-statement-out-of-order-default/_config.js b/test/function/samples/switch-statement-out-of-order-default/_config.js index 044cb3ec8c8..313d2d98f85 100644 --- a/test/function/samples/switch-statement-out-of-order-default/_config.js +++ b/test/function/samples/switch-statement-out-of-order-default/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles side-effects in non-ordered defaults of switch statements' }); diff --git a/test/function/samples/switch-statements-removed-default/_config.js b/test/function/samples/switch-statements-removed-default/_config.js index 73539c2ba35..221a57d8fc6 100644 --- a/test/function/samples/switch-statements-removed-default/_config.js +++ b/test/function/samples/switch-statements-removed-default/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not remove code after a switch statement that should be retained' }); diff --git a/test/function/samples/symlink/_config.js b/test/function/samples/symlink/_config.js index f631aa5854e..39859d6f152 100644 --- a/test/function/samples/symlink/_config.js +++ b/test/function/samples/symlink/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ skip: process.platform === 'win32', description: 'follows symlinks' }); diff --git a/test/function/samples/synthetic-named-exports-fallback-es2015/_config.js b/test/function/samples/synthetic-named-exports-fallback-es2015/_config.js index 3cd0b6b5f1c..87daf9e88b3 100644 --- a/test/function/samples/synthetic-named-exports-fallback-es2015/_config.js +++ b/test/function/samples/synthetic-named-exports-fallback-es2015/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds a fallback in case synthetic named exports are falsy', options: { output: { generatedCode: 'es2015' }, diff --git a/test/function/samples/synthetic-named-exports-fallback/_config.js b/test/function/samples/synthetic-named-exports-fallback/_config.js index 28f0f2b8a44..86d20347037 100644 --- a/test/function/samples/synthetic-named-exports-fallback/_config.js +++ b/test/function/samples/synthetic-named-exports-fallback/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds a fallback in case synthetic named exports are falsy', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/circular-synthetic-exports/_config.js b/test/function/samples/synthetic-named-exports/circular-synthetic-exports/_config.js index d9c8d47f23b..b56e4b7d7dd 100644 --- a/test/function/samples/synthetic-named-exports/circular-synthetic-exports/_config.js +++ b/test/function/samples/synthetic-named-exports/circular-synthetic-exports/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles circular synthetic exports', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/circular-synthetic-exports2/_config.js b/test/function/samples/synthetic-named-exports/circular-synthetic-exports2/_config.js index f335a79a6b5..bd2d738fb2c 100644 --- a/test/function/samples/synthetic-named-exports/circular-synthetic-exports2/_config.js +++ b/test/function/samples/synthetic-named-exports/circular-synthetic-exports2/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_DEP1 = path.join(__dirname, 'dep1.js'); const ID_DEP2 = path.join(__dirname, 'dep2.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles circular synthetic exports', warnings: [ { diff --git a/test/function/samples/synthetic-named-exports/dynamic-import/_config.js b/test/function/samples/synthetic-named-exports/dynamic-import/_config.js index f4444577669..f7be702ee4b 100644 --- a/test/function/samples/synthetic-named-exports/dynamic-import/_config.js +++ b/test/function/samples/synthetic-named-exports/dynamic-import/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports dynamically importing a module with synthetic named exports', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/entry/_config.js b/test/function/samples/synthetic-named-exports/entry/_config.js index bafb85c708c..0e31998a222 100644 --- a/test/function/samples/synthetic-named-exports/entry/_config.js +++ b/test/function/samples/synthetic-named-exports/entry/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not expose the synthetic namespace if an entry point uses a string value', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js b/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js index 2ef35128f68..d34e3b7822a 100644 --- a/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js +++ b/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'external modules can not have syntheticNamedExports', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/namespace-object/_config.js b/test/function/samples/synthetic-named-exports/namespace-object/_config.js index e4f47092918..ef46e67daf9 100644 --- a/test/function/samples/synthetic-named-exports/namespace-object/_config.js +++ b/test/function/samples/synthetic-named-exports/namespace-object/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not include named synthetic namespaces in namespace objects', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/namespace-overrides/_config.js b/test/function/samples/synthetic-named-exports/namespace-overrides/_config.js index 71390a0d293..7cdbc765e3b 100644 --- a/test/function/samples/synthetic-named-exports/namespace-overrides/_config.js +++ b/test/function/samples/synthetic-named-exports/namespace-overrides/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports re-exported synthetic exports in namespace objects with correct export precedence', options: { diff --git a/test/function/samples/synthetic-named-exports/non-default-export/_config.js b/test/function/samples/synthetic-named-exports/non-default-export/_config.js index 031171445cf..7a52385b327 100644 --- a/test/function/samples/synthetic-named-exports/non-default-export/_config.js +++ b/test/function/samples/synthetic-named-exports/non-default-export/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'supports providing a named export to generate synthetic exports', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/preserve-modules/_config.js b/test/function/samples/synthetic-named-exports/preserve-modules/_config.js index 6ffb06af872..c08c3094e3b 100644 --- a/test/function/samples/synthetic-named-exports/preserve-modules/_config.js +++ b/test/function/samples/synthetic-named-exports/preserve-modules/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles a dynamic import with synthetic named exports in preserveModules mode', options: { output: { diff --git a/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js b/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js index 9545f0b537b..c2e6b5445df 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'synthetic named exports modules need a default export', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js b/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js index 0fd7d93abcd..3bec69a61d1 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_DEP = path.join(__dirname, 'dep.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'synthetic named exports modules need their fallback export', options: { plugins: [ diff --git a/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js b/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js index 8dd2e1ca8ee..e5e1db5c4f8 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'makes sure default exports of synthetic named exports are snapshots', options: { plugins: { diff --git a/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js b/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js index 5291b9cc4f4..b9a9a17888c 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js @@ -5,7 +5,7 @@ const ID_OVERRIDE = path.join(__dirname, 'override.js'); const ID_NOOVERRIDE = path.join(__dirname, 'noOverride.js'); const ID_HIDDENNAMESPACE = path.join(__dirname, 'hiddenNamespace.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not expose synthetic named exports on entry points', options: { plugins: [ diff --git a/test/function/samples/tagged-template-deoptimize/_config.js b/test/function/samples/tagged-template-deoptimize/_config.js index 14a480ec40b..04d62a8910b 100644 --- a/test/function/samples/tagged-template-deoptimize/_config.js +++ b/test/function/samples/tagged-template-deoptimize/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly deoptimizes tagged template expressions' }); diff --git a/test/function/samples/this-not-namespace/_config.js b/test/function/samples/this-not-namespace/_config.js index 834b0b0bc7d..d1a051a5b12 100644 --- a/test/function/samples/this-not-namespace/_config.js +++ b/test/function/samples/this-not-namespace/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not treat this.foo as a possible namespace (#1258)', exports: exports => { assert.equal(typeof exports.Foo, 'function'); diff --git a/test/function/samples/this-side-effect/_config.js b/test/function/samples/this-side-effect/_config.js index aef87402e01..0d3de334024 100644 --- a/test/function/samples/this-side-effect/_config.js +++ b/test/function/samples/this-side-effect/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'detects side effects when mutating "this" in a constructor' }); diff --git a/test/function/samples/throws-not-found-module/_config.js b/test/function/samples/throws-not-found-module/_config.js index 16e5426c409..c442e34140c 100644 --- a/test/function/samples/throws-not-found-module/_config.js +++ b/test/function/samples/throws-not-found-module/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws error if module is not found', error: { code: 'UNRESOLVED_IMPORT', diff --git a/test/function/samples/top-level-arrow-function/_config.js b/test/function/samples/top-level-arrow-function/_config.js index f7d2ac74c70..6ed02c4dea0 100644 --- a/test/function/samples/top-level-arrow-function/_config.js +++ b/test/function/samples/top-level-arrow-function/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles naked return value from top-level arrow function expression (#403)' }); diff --git a/test/function/samples/top-level-block/_config.js b/test/function/samples/top-level-block/_config.js index 4943eeceb1c..913fa57bdf9 100644 --- a/test/function/samples/top-level-block/_config.js +++ b/test/function/samples/top-level-block/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows top-level block' }); diff --git a/test/function/samples/top-level-side-effect-on-imported/_config.js b/test/function/samples/top-level-side-effect-on-imported/_config.js index a7bfb6c8095..a9997046d93 100644 --- a/test/function/samples/top-level-side-effect-on-imported/_config.js +++ b/test/function/samples/top-level-side-effect-on-imported/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'top level function calls are preserved' }); diff --git a/test/function/samples/top-level-side-effects-are-preserved/_config.js b/test/function/samples/top-level-side-effects-are-preserved/_config.js index 51b9d3c41ab..63c7061ff20 100644 --- a/test/function/samples/top-level-side-effects-are-preserved/_config.js +++ b/test/function/samples/top-level-side-effects-are-preserved/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'top level side effects are preserved' }); diff --git a/test/function/samples/trace-inclusion-of-virtual-literals/_config.js b/test/function/samples/trace-inclusion-of-virtual-literals/_config.js index aefc966fd44..baa4d3807ee 100644 --- a/test/function/samples/trace-inclusion-of-virtual-literals/_config.js +++ b/test/function/samples/trace-inclusion-of-virtual-literals/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks the "included" state of virtual literals with regard to mutating oparations' }); diff --git a/test/function/samples/track-async-arrow-function-return-value/_config.js b/test/function/samples/track-async-arrow-function-return-value/_config.js index b607298c30e..303b80bbc43 100644 --- a/test/function/samples/track-async-arrow-function-return-value/_config.js +++ b/test/function/samples/track-async-arrow-function-return-value/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks object mutations of async arrow function return values', async exports(exports) { assert.strictEqual(exports.toggled, false); diff --git a/test/function/samples/track-async-function-return-value/_config.js b/test/function/samples/track-async-function-return-value/_config.js index fa7b58595fd..75aebf0c704 100644 --- a/test/function/samples/track-async-function-return-value/_config.js +++ b/test/function/samples/track-async-function-return-value/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks object mutations of async function return values', async exports(exports) { assert.strictEqual(exports.toggled, false); diff --git a/test/function/samples/track-awaited-object/_config.js b/test/function/samples/track-awaited-object/_config.js index 5e1de56846a..fc462923571 100644 --- a/test/function/samples/track-awaited-object/_config.js +++ b/test/function/samples/track-awaited-object/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks object mutations through await', async exports(exports) { assert.strictEqual(exports.toggled, false); diff --git a/test/function/samples/track-conditional-expression-return-reassignments/_config.js b/test/function/samples/track-conditional-expression-return-reassignments/_config.js index a8feb8107c2..036e8b6b772 100644 --- a/test/function/samples/track-conditional-expression-return-reassignments/_config.js +++ b/test/function/samples/track-conditional-expression-return-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks reassignments of return expressions of conditional expressions' }); diff --git a/test/function/samples/track-logical-expression-return-reassignments/_config.js b/test/function/samples/track-logical-expression-return-reassignments/_config.js index b7d741778a4..92f3e39b0f0 100644 --- a/test/function/samples/track-logical-expression-return-reassignments/_config.js +++ b/test/function/samples/track-logical-expression-return-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks reassignments of return expressions of logical expressions' }); diff --git a/test/function/samples/track-multiple-return-expression-reassignments/_config.js b/test/function/samples/track-multiple-return-expression-reassignments/_config.js index d449156e83f..70a05fb0674 100644 --- a/test/function/samples/track-multiple-return-expression-reassignments/_config.js +++ b/test/function/samples/track-multiple-return-expression-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks reassignments of return expressions of multiple return expressions' }); diff --git a/test/function/samples/track-parameter-return-reassignments/_config.js b/test/function/samples/track-parameter-return-reassignments/_config.js index 788c348966a..6fdccd79bd5 100644 --- a/test/function/samples/track-parameter-return-reassignments/_config.js +++ b/test/function/samples/track-parameter-return-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks reassignments of return expressions of parameters' }); diff --git a/test/function/samples/track-reassigned-object-expression-return-reassignments/_config.js b/test/function/samples/track-reassigned-object-expression-return-reassignments/_config.js index 9f302052bfd..9e763dd3baa 100644 --- a/test/function/samples/track-reassigned-object-expression-return-reassignments/_config.js +++ b/test/function/samples/track-reassigned-object-expression-return-reassignments/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks reassignments of return expressions of members of reassigned object expressions' }); diff --git a/test/function/samples/track-reassignments/_config.js b/test/function/samples/track-reassignments/_config.js index b18c8704fca..b850e4b941c 100644 --- a/test/function/samples/track-reassignments/_config.js +++ b/test/function/samples/track-reassignments/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'properly track reassignments (#4468)' }); diff --git a/test/function/samples/tracks-alias-mutations-b/_config.js b/test/function/samples/tracks-alias-mutations-b/_config.js index 379ccc88c8b..222a665c1ed 100644 --- a/test/function/samples/tracks-alias-mutations-b/_config.js +++ b/test/function/samples/tracks-alias-mutations-b/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const foo = {}; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of aliased objects', context: { foo diff --git a/test/function/samples/tracks-alias-mutations/_config.js b/test/function/samples/tracks-alias-mutations/_config.js index 1215da48bd9..e20a9461154 100644 --- a/test/function/samples/tracks-alias-mutations/_config.js +++ b/test/function/samples/tracks-alias-mutations/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'tracks mutations of aliased objects' }); diff --git a/test/function/samples/transform-empty-string/_config.js b/test/function/samples/transform-empty-string/_config.js index 29fed051b86..77af2600526 100644 --- a/test/function/samples/transform-empty-string/_config.js +++ b/test/function/samples/transform-empty-string/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const sideEffects = []; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows transformers to transform code to an empty string', context: { sideEffects }, exports() { diff --git a/test/function/samples/transform-without-code-warn-ast/_config.js b/test/function/samples/transform-without-code-warn-ast/_config.js index 503650acac6..891825a0ef8 100644 --- a/test/function/samples/transform-without-code-warn-ast/_config.js +++ b/test/function/samples/transform-without-code-warn-ast/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when returning a map but no code from a transform hook', options: { plugins: { diff --git a/test/function/samples/transform-without-code-warn-map/_config.js b/test/function/samples/transform-without-code-warn-map/_config.js index 1bc704090ea..26221ba80c9 100644 --- a/test/function/samples/transform-without-code-warn-map/_config.js +++ b/test/function/samples/transform-without-code-warn-map/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns when returning a map but no code from a transform hook', options: { plugins: { diff --git a/test/function/samples/transform-without-code/_config.js b/test/function/samples/transform-without-code/_config.js index 07871f0bdd0..7f145702a4e 100644 --- a/test/function/samples/transform-without-code/_config.js +++ b/test/function/samples/transform-without-code/_config.js @@ -3,7 +3,7 @@ const { readFileSync } = require('node:fs'); const path = require('node:path'); const { SourceMapConsumer } = require('source-map'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows using the transform hook for annotations only without returning a code property and breaking sourcemaps', options: { diff --git a/test/function/samples/transformer-async/_config.js b/test/function/samples/transformer-async/_config.js index b8744b6bfd1..79fe2dba9a5 100644 --- a/test/function/samples/transformer-async/_config.js +++ b/test/function/samples/transformer-async/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'transformers can be asynchronous', options: { plugins: [ diff --git a/test/function/samples/transformer-multiple/_config.js b/test/function/samples/transformer-multiple/_config.js index 03ce227edc9..86824951a32 100644 --- a/test/function/samples/transformer-multiple/_config.js +++ b/test/function/samples/transformer-multiple/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'accepts multiple transformer functions', options: { plugins: [ diff --git a/test/function/samples/transformer-single/_config.js b/test/function/samples/transformer-single/_config.js index 1f6d7e17972..77f1f555bcb 100644 --- a/test/function/samples/transformer-single/_config.js +++ b/test/function/samples/transformer-single/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'accepts a single transformer function', options: { plugins: [ diff --git a/test/function/samples/transparent-dynamic-inlining/_config.js b/test/function/samples/transparent-dynamic-inlining/_config.js index 8781c8bfe71..4eea7a9c499 100644 --- a/test/function/samples/transparent-dynamic-inlining/_config.js +++ b/test/function/samples/transparent-dynamic-inlining/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'Dynamic import inlining when resolution id is a module in the bundle', code(code) { assert.ok(!code.includes('import(')); diff --git a/test/function/samples/tree-shake-object-expression-assignment/_config.js b/test/function/samples/tree-shake-object-expression-assignment/_config.js index 868fee1a87c..de5da93825e 100644 --- a/test/function/samples/tree-shake-object-expression-assignment/_config.js +++ b/test/function/samples/tree-shake-object-expression-assignment/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'renders valid code when the target of an object expression with side-effects is tree-shaken' }); diff --git a/test/function/samples/tree-shake-variable-declarations-2/_config.js b/test/function/samples/tree-shake-variable-declarations-2/_config.js index ae2d2cdc637..7adfe470fd8 100644 --- a/test/function/samples/tree-shake-variable-declarations-2/_config.js +++ b/test/function/samples/tree-shake-variable-declarations-2/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'remove unused variables from declarations (#1831)', code(code) { assert.ok(code.search(/var a = 'test'/) >= 0); diff --git a/test/function/samples/tree-shake-variable-declarations/_config.js b/test/function/samples/tree-shake-variable-declarations/_config.js index 724f95a06db..8f4662e0a9e 100644 --- a/test/function/samples/tree-shake-variable-declarations/_config.js +++ b/test/function/samples/tree-shake-variable-declarations/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'remove unused variables from declarations (#1937)', exports(exports) { assert.deepEqual(exports(), [0.07]); diff --git a/test/function/samples/trim-conditional-branches-in-exports/_config.js b/test/function/samples/trim-conditional-branches-in-exports/_config.js index b5d0692c3b3..7926ff0237b 100644 --- a/test/function/samples/trim-conditional-branches-in-exports/_config.js +++ b/test/function/samples/trim-conditional-branches-in-exports/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'trims conditional branches with a renamed default export' }); diff --git a/test/function/samples/try-catch-scoping/_config.js b/test/function/samples/try-catch-scoping/_config.js index a4e7846dca2..99ef3b8beff 100644 --- a/test/function/samples/try-catch-scoping/_config.js +++ b/test/function/samples/try-catch-scoping/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'error parameter in catch clause is correctly scoped' }); diff --git a/test/function/samples/unknown-for-loop-variables/_config.js b/test/function/samples/unknown-for-loop-variables/_config.js index 8415f8ed27f..f4a546bfde1 100644 --- a/test/function/samples/unknown-for-loop-variables/_config.js +++ b/test/function/samples/unknown-for-loop-variables/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'treat for-in and for-of loop variables as unknown' }); diff --git a/test/function/samples/unknown-generated-code-preset/_config.js b/test/function/samples/unknown-generated-code-preset/_config.js index d2740e046a5..bd65e65c8ad 100644 --- a/test/function/samples/unknown-generated-code-preset/_config.js +++ b/test/function/samples/unknown-generated-code-preset/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for unknown presets for the generatedCode option', options: { output: { diff --git a/test/function/samples/unknown-generated-code-value/_config.js b/test/function/samples/unknown-generated-code-value/_config.js index faddcdf1462..14e2ef42e5b 100644 --- a/test/function/samples/unknown-generated-code-value/_config.js +++ b/test/function/samples/unknown-generated-code-value/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for unknown string values for the generatedCode option', options: { output: { diff --git a/test/function/samples/unknown-global-side-effects/_config.js b/test/function/samples/unknown-global-side-effects/_config.js index b4a1a19c85b..ca4a3c691d0 100644 --- a/test/function/samples/unknown-global-side-effects/_config.js +++ b/test/function/samples/unknown-global-side-effects/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not omit side-effects from unknown globals', exports(exports) { let error; diff --git a/test/function/samples/unknown-statement/_config.js b/test/function/samples/unknown-statement/_config.js index df12eb1c9cf..56e69822f70 100644 --- a/test/function/samples/unknown-statement/_config.js +++ b/test/function/samples/unknown-statement/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles unknown statements' }); diff --git a/test/function/samples/unknown-treeshake-preset/_config.js b/test/function/samples/unknown-treeshake-preset/_config.js index d5c7361b280..4d5a54e2009 100644 --- a/test/function/samples/unknown-treeshake-preset/_config.js +++ b/test/function/samples/unknown-treeshake-preset/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for unknown presets for the treeshake option', options: { treeshake: { preset: 'some-string' } diff --git a/test/function/samples/unknown-treeshake-value/_config.js b/test/function/samples/unknown-treeshake-value/_config.js index 420f5eed196..db2c1528bda 100644 --- a/test/function/samples/unknown-treeshake-value/_config.js +++ b/test/function/samples/unknown-treeshake-value/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'throws for unknown string values for the treeshake option', options: { treeshake: 'some-string' diff --git a/test/function/samples/unused-constructor-argument-fallback/_config.js b/test/function/samples/unused-constructor-argument-fallback/_config.js index ec7a335ffdc..77c5bf24832 100644 --- a/test/function/samples/unused-constructor-argument-fallback/_config.js +++ b/test/function/samples/unused-constructor-argument-fallback/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles unused logical expressions as constructor arguments (#4517)', exports({ create }) { assert.strictEqual(create().foo, 'foo'); diff --git a/test/function/samples/unused-do-while-loop-declaration/_config.js b/test/function/samples/unused-do-while-loop-declaration/_config.js index 628b959abbc..d221993e4e6 100644 --- a/test/function/samples/unused-do-while-loop-declaration/_config.js +++ b/test/function/samples/unused-do-while-loop-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not partially tree-shake unused declarations with side-effects in do-while loop bodies' }); diff --git a/test/function/samples/unused-for-in-loop-declaration/_config.js b/test/function/samples/unused-for-in-loop-declaration/_config.js index 771966afc3c..670ca9c8ced 100644 --- a/test/function/samples/unused-for-in-loop-declaration/_config.js +++ b/test/function/samples/unused-for-in-loop-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not partially tree-shake unused declarations with side-effects in for-in loop bodies' }); diff --git a/test/function/samples/unused-for-loop-body-declaration/_config.js b/test/function/samples/unused-for-loop-body-declaration/_config.js index 3994d7589cb..2ca4c8f6d26 100644 --- a/test/function/samples/unused-for-loop-body-declaration/_config.js +++ b/test/function/samples/unused-for-loop-body-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not partially tree-shake unused declarations with side-effects in for loop bodies' }); diff --git a/test/function/samples/unused-for-loop-init-declaration/_config.js b/test/function/samples/unused-for-loop-init-declaration/_config.js index 769f89243b2..665b538b93c 100644 --- a/test/function/samples/unused-for-loop-init-declaration/_config.js +++ b/test/function/samples/unused-for-loop-init-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not partially tree-shake unused declarations with side-effects in for loops' }); diff --git a/test/function/samples/unused-for-of-loop-declaration/_config.js b/test/function/samples/unused-for-of-loop-declaration/_config.js index f8c43ed3f37..5da899464d0 100644 --- a/test/function/samples/unused-for-of-loop-declaration/_config.js +++ b/test/function/samples/unused-for-of-loop-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not partially tree-shake unused declarations with side-effects in for-of loop bodies' }); diff --git a/test/function/samples/unused-if-statement-declaration/_config.js b/test/function/samples/unused-if-statement-declaration/_config.js index 769f89243b2..665b538b93c 100644 --- a/test/function/samples/unused-if-statement-declaration/_config.js +++ b/test/function/samples/unused-if-statement-declaration/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not partially tree-shake unused declarations with side-effects in for loops' }); diff --git a/test/function/samples/unused-import/_config.js b/test/function/samples/unused-import/_config.js index 8df4ffef2d8..50cae83e3b7 100644 --- a/test/function/samples/unused-import/_config.js +++ b/test/function/samples/unused-import/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns on unused imports ([#595])', options: { external: ['external'] diff --git a/test/function/samples/unused-parameter-side-effects/_config.js b/test/function/samples/unused-parameter-side-effects/_config.js index 0ea30e69778..672bc09c157 100644 --- a/test/function/samples/unused-parameter-side-effects/_config.js +++ b/test/function/samples/unused-parameter-side-effects/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not tree-shake arguments where the corresponding parameters have side-effects' }); diff --git a/test/function/samples/unused-parenthesed-assignment/_config.js b/test/function/samples/unused-parenthesed-assignment/_config.js index edceb4dc544..5e091f91b57 100644 --- a/test/function/samples/unused-parenthesed-assignment/_config.js +++ b/test/function/samples/unused-parenthesed-assignment/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly simplifies assignments with right-hand-sides in parentheses (#3924)', context: { someObject: { isTrue: true } diff --git a/test/function/samples/unused-var-a/_config.js b/test/function/samples/unused-var-a/_config.js index fd1b85b9ee3..b97c8ce85d5 100644 --- a/test/function/samples/unused-var-a/_config.js +++ b/test/function/samples/unused-var-a/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'omits unused var declaration (a)' }); diff --git a/test/function/samples/unused-var-b/_config.js b/test/function/samples/unused-var-b/_config.js index 25cd8171eb2..73c5dbd5334 100644 --- a/test/function/samples/unused-var-b/_config.js +++ b/test/function/samples/unused-var-b/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'omits unused var declaration (b)' }); diff --git a/test/function/samples/unused-var-c/_config.js b/test/function/samples/unused-var-c/_config.js index eda3b59d436..9f013bf0c66 100644 --- a/test/function/samples/unused-var-c/_config.js +++ b/test/function/samples/unused-var-c/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'omits unused var declaration (c)' }); diff --git a/test/function/samples/unused-var-d/_config.js b/test/function/samples/unused-var-d/_config.js index e5884001d2f..0595b4968ce 100644 --- a/test/function/samples/unused-var-d/_config.js +++ b/test/function/samples/unused-var-d/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'omits unused var declaration (d)' }); diff --git a/test/function/samples/unused-while-loop-declaration/_config.js b/test/function/samples/unused-while-loop-declaration/_config.js index 987e44d89d5..430de1bbcd0 100644 --- a/test/function/samples/unused-while-loop-declaration/_config.js +++ b/test/function/samples/unused-while-loop-declaration/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not partially tree-shake unused declarations with side-effects in while loop bodies' }); diff --git a/test/function/samples/update-expression-accessors/_config.js b/test/function/samples/update-expression-accessors/_config.js index 99d720575dc..2532457a2c9 100644 --- a/test/function/samples/update-expression-accessors/_config.js +++ b/test/function/samples/update-expression-accessors/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'deoptimizes "this" for accessors triggered by update expressions' }); diff --git a/test/function/samples/update-expression-of-import-fails/_config.js b/test/function/samples/update-expression-of-import-fails/_config.js index 23e069568cd..c4a525ab4b6 100644 --- a/test/function/samples/update-expression-of-import-fails/_config.js +++ b/test/function/samples/update-expression-of-import-fails/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'disallows updates to imported bindings', error: { code: 'ILLEGAL_REASSIGNMENT', diff --git a/test/function/samples/use-class-name-in-static-block/_config.js b/test/function/samples/use-class-name-in-static-block/_config.js index 053001db5de..e68adda2729 100644 --- a/test/function/samples/use-class-name-in-static-block/_config.js +++ b/test/function/samples/use-class-name-in-static-block/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'use the original class name instead of renderName in class body', minNodeVersion: 16 }); diff --git a/test/function/samples/use-var-before-decl/_config.js b/test/function/samples/use-var-before-decl/_config.js index 1920a03d43d..554a6aa1bf7 100644 --- a/test/function/samples/use-var-before-decl/_config.js +++ b/test/function/samples/use-var-before-decl/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'exercise `var` variables before their declarations' }); diff --git a/test/function/samples/uses-supplied-ast/_config.js b/test/function/samples/uses-supplied-ast/_config.js index 195582af893..367086d7362 100644 --- a/test/function/samples/uses-supplied-ast/_config.js +++ b/test/function/samples/uses-supplied-ast/_config.js @@ -20,7 +20,7 @@ const modules = { }; modules.foo.ast._ignoredProp = {}; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'uses supplied AST', options: { plugins: [ diff --git a/test/function/samples/validate-output/_config.js b/test/function/samples/validate-output/_config.js index 14d3c3da8c7..2f98812e438 100644 --- a/test/function/samples/validate-output/_config.js +++ b/test/function/samples/validate-output/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles validate failure', options: { onwarn(warning) { diff --git a/test/function/samples/validate-resolved-by-logic/_config.js b/test/function/samples/validate-resolved-by-logic/_config.js index 31887dbce9e..aadce4f4b54 100644 --- a/test/function/samples/validate-resolved-by-logic/_config.js +++ b/test/function/samples/validate-resolved-by-logic/_config.js @@ -6,7 +6,7 @@ const BAR_IMPORTED_PATH = './bar.js'; const OTHER_IMPORTED_PATH = './other.js'; const MAIN_PATH = resolve(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'validate resolvedBy logic', options: { plugins: [ diff --git a/test/function/samples/vars-in-for-loop-head/_config.js b/test/function/samples/vars-in-for-loop-head/_config.js index 0702e836c6d..6bad2bceb75 100644 --- a/test/function/samples/vars-in-for-loop-head/_config.js +++ b/test/function/samples/vars-in-for-loop-head/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not break apart vars in for loop head' }); diff --git a/test/function/samples/vars-not-removed-in-if-block/_config.js b/test/function/samples/vars-not-removed-in-if-block/_config.js index df6d46a3cf8..8b718ec0d37 100644 --- a/test/function/samples/vars-not-removed-in-if-block/_config.js +++ b/test/function/samples/vars-not-removed-in-if-block/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves var declarations in if blocks (#1113)' }); diff --git a/test/function/samples/vars-not-removed/_config.js b/test/function/samples/vars-not-removed/_config.js index 47a079e4bad..b590402b3d9 100644 --- a/test/function/samples/vars-not-removed/_config.js +++ b/test/function/samples/vars-not-removed/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not erroneously remove var/let/const keywords (#390)' }); diff --git a/test/function/samples/vars-with-init-in-dead-branch/_config.js b/test/function/samples/vars-with-init-in-dead-branch/_config.js index dd7451c7346..7e50dc219d2 100644 --- a/test/function/samples/vars-with-init-in-dead-branch/_config.js +++ b/test/function/samples/vars-with-init-in-dead-branch/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles vars with init in dead branch (#1198)', warnings: [ { diff --git a/test/function/samples/warn-missing-iife-name/_config.js b/test/function/samples/warn-missing-iife-name/_config.js index d77444d97e5..c7b0d38ab8b 100644 --- a/test/function/samples/warn-missing-iife-name/_config.js +++ b/test/function/samples/warn-missing-iife-name/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns if no name is provided for an IIFE bundle', options: { output: { format: 'iife' } }, warnings: [ diff --git a/test/function/samples/warn-on-auto-named-default-exports/_config.js b/test/function/samples/warn-on-auto-named-default-exports/_config.js index 35159e970c7..5858663b822 100644 --- a/test/function/samples/warn-on-auto-named-default-exports/_config.js +++ b/test/function/samples/warn-on-auto-named-default-exports/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns if default and named exports are used in auto mode', warnings: [ { diff --git a/test/function/samples/warn-on-empty-bundle/_config.js b/test/function/samples/warn-on-empty-bundle/_config.js index 237811e4722..1edccde24ed 100644 --- a/test/function/samples/warn-on-empty-bundle/_config.js +++ b/test/function/samples/warn-on-empty-bundle/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns if empty bundle is generated (#444)', warnings: [ { diff --git a/test/function/samples/warn-on-eval/_config.js b/test/function/samples/warn-on-eval/_config.js index 95e845ee673..e6b40ffb9f8 100644 --- a/test/function/samples/warn-on-eval/_config.js +++ b/test/function/samples/warn-on-eval/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns about use of eval', warnings: [ { diff --git a/test/function/samples/warn-on-namespace-conflict/_config.js b/test/function/samples/warn-on-namespace-conflict/_config.js index 443c9cc67f0..c45d904e5aa 100644 --- a/test/function/samples/warn-on-namespace-conflict/_config.js +++ b/test/function/samples/warn-on-namespace-conflict/_config.js @@ -3,7 +3,7 @@ const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); const ID_BAR = path.join(__dirname, 'bar.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns on duplicate export * from', warnings: [ { diff --git a/test/function/samples/warn-on-top-level-this/_config.js b/test/function/samples/warn-on-top-level-this/_config.js index cb1dcf1fc58..96c0ac20b27 100644 --- a/test/function/samples/warn-on-top-level-this/_config.js +++ b/test/function/samples/warn-on-top-level-this/_config.js @@ -1,7 +1,7 @@ const path = require('node:path'); const { assertIncludes } = require('../../../utils.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns on top-level this (#770)', warnings: [ { diff --git a/test/function/samples/warn-on-unused-missing-imports/_config.js b/test/function/samples/warn-on-unused-missing-imports/_config.js index 7bad486701f..89e459c4860 100644 --- a/test/function/samples/warn-on-unused-missing-imports/_config.js +++ b/test/function/samples/warn-on-unused-missing-imports/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const ID_MAIN = path.join(__dirname, 'main.js'); const ID_FOO = path.join(__dirname, 'foo.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns on missing (but unused) imports', warnings: [ { diff --git a/test/function/samples/warning-incorrect-sourcemap-location/_config.js b/test/function/samples/warning-incorrect-sourcemap-location/_config.js index a463c26b0eb..fde30b21181 100644 --- a/test/function/samples/warning-incorrect-sourcemap-location/_config.js +++ b/test/function/samples/warning-incorrect-sourcemap-location/_config.js @@ -2,7 +2,7 @@ const { join } = require('node:path'); const ID_MAIN = join(__dirname, 'main.js'); const ID_CONSTANTS = join(__dirname, 'constants.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'does not fail if a warning has an incorrect location due to missing sourcemaps', options: { plugins: [ diff --git a/test/function/samples/warning-low-resolution-location/_config.js b/test/function/samples/warning-low-resolution-location/_config.js index 008baece3d3..3c6fc0f4c2a 100644 --- a/test/function/samples/warning-low-resolution-location/_config.js +++ b/test/function/samples/warning-low-resolution-location/_config.js @@ -2,7 +2,7 @@ const path = require('node:path'); const { encode } = require('@jridgewell/sourcemap-codec'); const ID_MAIN = path.join(__dirname, 'main.js'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles when a low resolution sourcemap is used to report an error', options: { plugins: { diff --git a/test/function/samples/warnings-to-string/_config.js b/test/function/samples/warnings-to-string/_config.js index 54b44aed6ff..afc8c0dd9bd 100644 --- a/test/function/samples/warnings-to-string/_config.js +++ b/test/function/samples/warnings-to-string/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides a string conversion for warnings', options: { plugins: { diff --git a/test/function/samples/warns-for-invalid-options/_config.js b/test/function/samples/warns-for-invalid-options/_config.js index 52750c5d00b..79c69c0ff31 100644 --- a/test/function/samples/warns-for-invalid-options/_config.js +++ b/test/function/samples/warns-for-invalid-options/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'warns for invalid options', options: { myInvalidInputOption: true, diff --git a/test/function/samples/watch-option/_config.js b/test/function/samples/watch-option/_config.js index b1f849834b2..6b76a77ff71 100644 --- a/test/function/samples/watch-option/_config.js +++ b/test/function/samples/watch-option/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'expects watch option', options: { watch: {} diff --git a/test/function/samples/wraps-object-expressions-as-statements/_config.js b/test/function/samples/wraps-object-expressions-as-statements/_config.js index 501cc73c432..f3d5c6d7626 100644 --- a/test/function/samples/wraps-object-expressions-as-statements/_config.js +++ b/test/function/samples/wraps-object-expressions-as-statements/_config.js @@ -1,3 +1,3 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'wraps object expressions that have become statements' }); diff --git a/test/function/samples/wraps-simplified-expressions/_config.js b/test/function/samples/wraps-simplified-expressions/_config.js index ab8c55707ff..481ea4f3841 100644 --- a/test/function/samples/wraps-simplified-expressions/_config.js +++ b/test/function/samples/wraps-simplified-expressions/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'wraps simplified expressions that have become callees if necessary', warnings: warnings => { for (const warning of warnings) assert.equal(warning.code, 'EVAL'); diff --git a/test/function/tsconfig.json b/test/function/tsconfig.json new file mode 100644 index 00000000000..4a26f3ee84c --- /dev/null +++ b/test/function/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "include": [ + "**/_config.js", + "./index.js", + "./define.d.ts" + ] +} diff --git a/test/sourcemaps/define.d.ts b/test/sourcemaps/define.d.ts new file mode 100644 index 00000000000..70a9f24e7b0 --- /dev/null +++ b/test/sourcemaps/define.d.ts @@ -0,0 +1,5 @@ +import type { TestConfigForm } from '../types'; + +declare global { + function defineTest(config: TestConfigForm): TestConfigForm; +} diff --git a/test/sourcemaps/samples/basic-support/_config.js b/test/sourcemaps/samples/basic-support/_config.js index e6725e48696..5ef590e13d4 100644 --- a/test/sourcemaps/samples/basic-support/_config.js +++ b/test/sourcemaps/samples/basic-support/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'basic sourcemap support', async test(code, map) { assert.equal(map.version, 3); diff --git a/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js b/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js index a0a20cd4f60..6c7d9515efa 100644 --- a/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js +++ b/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js @@ -5,7 +5,7 @@ const MagicString = require('magic-string'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'get combined sourcemap in transforming with loader', options: { plugins: [ diff --git a/test/sourcemaps/samples/combined-sourcemap/_config.js b/test/sourcemaps/samples/combined-sourcemap/_config.js index ee817b75cc7..f1a71a6432a 100644 --- a/test/sourcemaps/samples/combined-sourcemap/_config.js +++ b/test/sourcemaps/samples/combined-sourcemap/_config.js @@ -3,7 +3,7 @@ const MagicString = require('magic-string'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'get combined sourcemap in transforming', options: { plugins: [ diff --git a/test/sourcemaps/samples/excludes-plugin-helpers/_config.js b/test/sourcemaps/samples/excludes-plugin-helpers/_config.js index 9b064f2d40b..822dfa47b9c 100644 --- a/test/sourcemaps/samples/excludes-plugin-helpers/_config.js +++ b/test/sourcemaps/samples/excludes-plugin-helpers/_config.js @@ -4,7 +4,7 @@ const path = require('node:path'); const HELPER = '\0helper'; -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'excludes plugin helpers from sources', options: { output: { @@ -12,6 +12,8 @@ module.exports = defineRollupTest({ }, plugins: [ { + name: 'test-plugin', + resolveId(id) { if (id === HELPER) return id; }, diff --git a/test/sourcemaps/samples/existing-external-sourcemaps-combined/_config.js b/test/sourcemaps/samples/existing-external-sourcemaps-combined/_config.js index f1283d2dbb1..41b38bedd31 100644 --- a/test/sourcemaps/samples/existing-external-sourcemaps-combined/_config.js +++ b/test/sourcemaps/samples/existing-external-sourcemaps-combined/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes sourcemap comments', async test(code) { assert.ok(!code.includes('sourceMappingURL=main.js.map')); diff --git a/test/sourcemaps/samples/existing-inline-sourcemaps-combined/_config.js b/test/sourcemaps/samples/existing-inline-sourcemaps-combined/_config.js index d6120344a22..c2cdc0ad9a9 100644 --- a/test/sourcemaps/samples/existing-inline-sourcemaps-combined/_config.js +++ b/test/sourcemaps/samples/existing-inline-sourcemaps-combined/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'removes existing inline sourcemaps', async test(code) { assert.ok(!code.includes('sourceMappingURL=data')); diff --git a/test/sourcemaps/samples/ignore-list-default/_config.js b/test/sourcemaps/samples/ignore-list-default/_config.js index aeea3abedec..2df5184401a 100644 --- a/test/sourcemaps/samples/ignore-list-default/_config.js +++ b/test/sourcemaps/samples/ignore-list-default/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'defaults to adding files within node_modules to the ignore list', options: { output: { diff --git a/test/sourcemaps/samples/ignore-list-false/_config.js b/test/sourcemaps/samples/ignore-list-false/_config.js index c5b73f103ba..ed87dc8b580 100644 --- a/test/sourcemaps/samples/ignore-list-false/_config.js +++ b/test/sourcemaps/samples/ignore-list-false/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'accepts false for `sourcemapIgnoreList` to disable the default ignore-listing of node_modules', options: { diff --git a/test/sourcemaps/samples/ignore-list-source-files/_config.js b/test/sourcemaps/samples/ignore-list-source-files/_config.js index 07737703756..b2382971176 100644 --- a/test/sourcemaps/samples/ignore-list-source-files/_config.js +++ b/test/sourcemaps/samples/ignore-list-source-files/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'populates ignore list', options: { output: { diff --git a/test/sourcemaps/samples/ignore-list-sourcemap-path/_config.js b/test/sourcemaps/samples/ignore-list-sourcemap-path/_config.js index 1a054f574c7..d30ad74cdce 100644 --- a/test/sourcemaps/samples/ignore-list-sourcemap-path/_config.js +++ b/test/sourcemaps/samples/ignore-list-sourcemap-path/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'correctly passes source map path', options: { output: { diff --git a/test/sourcemaps/samples/loaders/_config.js b/test/sourcemaps/samples/loaders/_config.js index 6d51a94ea78..d8ed77c4b57 100644 --- a/test/sourcemaps/samples/loaders/_config.js +++ b/test/sourcemaps/samples/loaders/_config.js @@ -4,7 +4,7 @@ const buble = require('buble'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves sourcemap chains when transforming', options: { plugins: [ diff --git a/test/sourcemaps/samples/names-transformed-render-chunk/_config.js b/test/sourcemaps/samples/names-transformed-render-chunk/_config.js index def0c76452f..01583823ee7 100644 --- a/test/sourcemaps/samples/names-transformed-render-chunk/_config.js +++ b/test/sourcemaps/samples/names-transformed-render-chunk/_config.js @@ -4,7 +4,7 @@ const { SourceMapConsumer } = require('source-map'); const terser = require('terser'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'names are recovered if transforms are used', options: { plugins: [ diff --git a/test/sourcemaps/samples/names/_config.js b/test/sourcemaps/samples/names/_config.js index 90183b04284..977a30de9bc 100644 --- a/test/sourcemaps/samples/names/_config.js +++ b/test/sourcemaps/samples/names/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'names are recovered (https://github.com/rollup/rollup/issues/101)', options: { output: { diff --git a/test/sourcemaps/samples/reified-namespace/_config.js b/test/sourcemaps/samples/reified-namespace/_config.js index 5cc6056c24d..8f6349898b4 100644 --- a/test/sourcemaps/samples/reified-namespace/_config.js +++ b/test/sourcemaps/samples/reified-namespace/_config.js @@ -4,7 +4,7 @@ const path = require('node:path'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generates correct sourcemap with reified namespace (#668)', async test(code, map) { const smc = await new SourceMapConsumer(map); diff --git a/test/sourcemaps/samples/relative-paths/_config.js b/test/sourcemaps/samples/relative-paths/_config.js index a280e1057da..b8113a8eaf8 100644 --- a/test/sourcemaps/samples/relative-paths/_config.js +++ b/test/sourcemaps/samples/relative-paths/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'source paths are relative with relative dest (#344)', options: { output: { diff --git a/test/sourcemaps/samples/render-chunk-babili/_config.js b/test/sourcemaps/samples/render-chunk-babili/_config.js index 00560058e2d..4f2385e3f3e 100644 --- a/test/sourcemaps/samples/render-chunk-babili/_config.js +++ b/test/sourcemaps/samples/render-chunk-babili/_config.js @@ -3,7 +3,7 @@ const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); const babiliResults = require('./babili-results'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'generates valid sourcemap when source could not be determined', options: { plugins: [ diff --git a/test/sourcemaps/samples/render-chunk/_config.js b/test/sourcemaps/samples/render-chunk/_config.js index f6d2f20fa3a..ce41a76c1c5 100644 --- a/test/sourcemaps/samples/render-chunk/_config.js +++ b/test/sourcemaps/samples/render-chunk/_config.js @@ -3,11 +3,12 @@ const { SourceMapConsumer } = require('source-map'); const terser = require('terser'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves sourcemap chains when transforming', options: { plugins: [ { + name: 'test-plugin', renderChunk(code) { const options = { sourceMap: { diff --git a/test/sourcemaps/samples/single-length-segments/_config.js b/test/sourcemaps/samples/single-length-segments/_config.js index d94ad851c80..b3340ebbc86 100644 --- a/test/sourcemaps/samples/single-length-segments/_config.js +++ b/test/sourcemaps/samples/single-length-segments/_config.js @@ -6,7 +6,7 @@ const getLocation = require('../../getLocation'); const original = readFileSync(path.resolve(__dirname, 'main.js'), 'utf8'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles single-length sourcemap segments', options: { plugins: [ diff --git a/test/sourcemaps/samples/sourcemap-base-url/_config.js b/test/sourcemaps/samples/sourcemap-base-url/_config.js index c3c9bc0a63c..eee1b9e94a0 100644 --- a/test/sourcemaps/samples/sourcemap-base-url/_config.js +++ b/test/sourcemaps/samples/sourcemap-base-url/_config.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); const fs = require('node:fs'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'adds a sourcemap base url', options: { output: { diff --git a/test/sourcemaps/samples/sourcemap-file-hashed/_config.js b/test/sourcemaps/samples/sourcemap-file-hashed/_config.js index 374ae3878e0..82e9387a8f5 100644 --- a/test/sourcemaps/samples/sourcemap-file-hashed/_config.js +++ b/test/sourcemaps/samples/sourcemap-file-hashed/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'populates file property of sourcemap with final name when using hashes', options: { output: { diff --git a/test/sourcemaps/samples/sourcemap-file/_config.js b/test/sourcemaps/samples/sourcemap-file/_config.js index 4a28f8a4c78..91d80c8f56e 100644 --- a/test/sourcemaps/samples/sourcemap-file/_config.js +++ b/test/sourcemaps/samples/sourcemap-file/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'populates file property of sourcemap when plugins are used (#986)', options: { plugins: [ diff --git a/test/sourcemaps/samples/transform-full-source-paths/_config.js b/test/sourcemaps/samples/transform-full-source-paths/_config.js index 0230cb1a901..5bb70548512 100644 --- a/test/sourcemaps/samples/transform-full-source-paths/_config.js +++ b/test/sourcemaps/samples/transform-full-source-paths/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'provides the full source map path when transforming source maps', options: { output: { diff --git a/test/sourcemaps/samples/transform-low-resolution/_config.js b/test/sourcemaps/samples/transform-low-resolution/_config.js index 378cb86bbf2..af1a19431ab 100644 --- a/test/sourcemaps/samples/transform-low-resolution/_config.js +++ b/test/sourcemaps/samples/transform-low-resolution/_config.js @@ -4,12 +4,13 @@ const MagicString = require('magic-string'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'handles combining low-resolution and high-resolution source-maps when transforming', options: { output: { name: 'bundle' }, plugins: [ { + name: 'test-plugin1', transform(code) { // each entry of each line consist of // [generatedColumn, sourceIndex, sourceLine, sourceColumn]; @@ -23,6 +24,7 @@ module.exports = defineRollupTest({ } }, { + name: 'test-plugin2', transform(code) { const s = new MagicString(code); s.prepend("console.log('second');\n"); diff --git a/test/sourcemaps/samples/transform-source-paths/_config.js b/test/sourcemaps/samples/transform-source-paths/_config.js index 5bf186be00f..439c29f240c 100644 --- a/test/sourcemaps/samples/transform-source-paths/_config.js +++ b/test/sourcemaps/samples/transform-source-paths/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const path = require('node:path'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'transform sourcemap paths (#2168)', options: { output: { diff --git a/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js b/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js index 4be44239227..11336d4d5cf 100644 --- a/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js +++ b/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js @@ -1,4 +1,4 @@ -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves sourcemap chains when transforming', options: { plugins: [ diff --git a/test/sourcemaps/samples/transforms/_config.js b/test/sourcemaps/samples/transforms/_config.js index 107a184aeeb..9edae95a3b1 100644 --- a/test/sourcemaps/samples/transforms/_config.js +++ b/test/sourcemaps/samples/transforms/_config.js @@ -4,11 +4,12 @@ const MagicString = require('magic-string'); const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'preserves sourcemap chains when transforming', options: { plugins: [ { + name: 'test-plugin1', transform(source) { return buble.transform(source, { transforms: { modules: false } @@ -17,6 +18,7 @@ module.exports = defineRollupTest({ }, { + name: 'test-plugin2', transform(source) { const s = new MagicString(source); s.append('\nassert.equal( 1 + 1, 2 );\nassert.equal( 2 + 2, 4 );'); diff --git a/test/sourcemaps/samples/untransformed-modules/_config.js b/test/sourcemaps/samples/untransformed-modules/_config.js index 1d41170d296..a2cb8040caa 100644 --- a/test/sourcemaps/samples/untransformed-modules/_config.js +++ b/test/sourcemaps/samples/untransformed-modules/_config.js @@ -1,11 +1,12 @@ const assert = require('node:assert'); const MagicString = require('magic-string'); -module.exports = defineRollupTest({ +module.exports = defineTest({ description: 'allows sourcemap chains with some untransformed modules (#404)', options: { plugins: [ { + name: 'test-plugin', transform(code, id) { if (/untransformed-modules\/foo/.test(id)) { const s = new MagicString(code); diff --git a/test/sourcemaps/tsconfig.json b/test/sourcemaps/tsconfig.json new file mode 100644 index 00000000000..4a26f3ee84c --- /dev/null +++ b/test/sourcemaps/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "include": [ + "**/_config.js", + "./index.js", + "./define.d.ts" + ] +} diff --git a/test/tsconfig.utils.json b/test/tsconfig.base.json similarity index 55% rename from test/tsconfig.utils.json rename to test/tsconfig.base.json index c6aed82bd10..8ceaca840cc 100644 --- a/test/tsconfig.utils.json +++ b/test/tsconfig.base.json @@ -1,19 +1,16 @@ { "compilerOptions": { "allowJs": true, - // "checkJs": true, // enable once all files are converted to TS + "checkJs": true, "target": "esnext", "lib": ["ES2021"], + "esModuleInterop": true, "moduleResolution": "node", "types": [ "node", "mocha", "./types.d.ts" - ], - "strict": true - }, - "include": [ - "./utils.js", - "*/index.js" - ] + ] + // "strict": true // maybe later + } } diff --git a/test/tsconfig.json b/test/tsconfig.json index a5a6f2ccb8b..47e79866619 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,21 +1,17 @@ { + "extends": "./tsconfig.base.json", "compilerOptions": { - "allowJs": true, - "checkJs": true, - "target": "esnext", - "lib": ["ES2021"], - "moduleResolution": "node", - "types": [ - "node", - "mocha", - "./types.d.ts" - ] - // "strict": true // maybe later + "checkJs": true }, "include": [ - "**/_config.js" + "./utils.js" ], "references": [ - "./tsconfig.utils.json" + "./browser/tsconfig.json", + "./chunking-form/tsconfig.json", + "./file-hash/tsconfig.json", + "./form/tsconfig.json", + "./function/tsconfig.json", + "./sourcemaps/tsconfig.json" ] } diff --git a/test/types.d.ts b/test/types.d.ts index 27e7c7371bf..e9bdfd88c46 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -2,7 +2,7 @@ import type { SourceMap } from 'magic-string'; import type { RollupError, RollupOptions } from '../src/rollup/types'; -export interface RollupTestConfig { +export interface TestConfigBase { /** * Only run this test. Should never be committed. */ @@ -20,10 +20,6 @@ export interface RollupTestConfig { * Description of the test. */ description: string; - /** - * The command to run for the test. - */ - command?: string; /** * Rollup options */ @@ -53,28 +49,12 @@ export interface RollupTestConfig { * Called after the test is run. */ after?: () => void | Promise; - /** - * Assert the stderr of the build. - */ - stderr?: (stderr: string) => void | Promise; - /** - * Assert the stderr stream, return true to abort the test. - */ - abortOnStderr?: (data: string) => boolean | void | Promise; - - /** - * Execute the AMD module. - */ - runAmd?: - | boolean - | { - exports?: (exportObject: any) => void | Promise; - }; /** * Test the expected error. */ error?: RollupError | ((error: RollupError) => boolean | void); + generateError?: RollupError; /** * Test the expected warnings. */ @@ -95,15 +75,43 @@ export interface RollupTestConfig { skipIfWindows?: boolean; onlyWindows?: boolean; minNodeVersion?: string; +} +export type TestConfigForm = TestConfigBase; + +export interface TestConfigFileHash extends TestConfigBase { options1?: RollupOptions; options2?: RollupOptions; + show?: boolean; } -declare global { +export interface TestConfigCli extends TestConfigBase { + command?: string; + cwd: string; + retry: number; /** - * Define configuration for a test. - * This function is available globally in the test files. + * Assert the stderr of the build. */ - function defineRollupTest(config: RollupTestConfig): RollupTestConfig; + stderr?: (stderr: string) => void | Promise; + /** + * Assert the stderr stream, return true to abort the test. + */ + abortOnStderr?: (data: string) => boolean | void | Promise; } + +export interface TestConfigChunkingForm extends TestConfigBase { + /** + * Execute the AMD module. + */ + runAmd?: + | boolean + | { + exports?: (exportObject: any) => void | Promise; + }; +} + +export interface TestConfigFunction extends TestConfigBase { + runtimeError?(error: Error): void; +} + +export type RunTestFunction = (directory: string, config: C) => void; diff --git a/test/utils.js b/test/utils.js index 11315103aeb..322a780af23 100644 --- a/test/utils.js +++ b/test/utils.js @@ -1,8 +1,8 @@ /** * @typedef {import('../src/rollup/types').RollupError} RollupError * @typedef {import('../src/rollup/types').RollupWarning} RollupWarning - * @typedef {import('./types').RollupTestConfig} RollupTestConfig - * @typedef {(directory: string, config: RollupTestConfig) => void} RunTestFunction + * @typedef {import('../src/rollup/types').Plugin} Plugin + * @typedef {import('./types').TestConfigBase} TestConfigBase */ const assert = require('node:assert'); @@ -21,8 +21,8 @@ const { basename, join } = require('node:path'); const { platform, version } = require('node:process'); const fixturify = require('fixturify'); -if (!globalThis.defineRollupTest) { - globalThis.defineRollupTest = config => config; +if (!globalThis.defineTest) { + globalThis.defineTest = config => config; } /** @@ -112,7 +112,8 @@ exports.executeBundle = async function executeBundle(bundle, require) { }; /** - * @type {(entries: Iterable<[string, any]>) => Record} entries + * @returns {Record} */ exports.getObject = function getObject(entries) { const object = {}; @@ -122,13 +123,17 @@ exports.getObject = function getObject(entries) { return object; }; +/** + * @param {Record} modules + * @returns {Plugin} + */ exports.loader = function loader(modules) { modules = Object.assign(Object.create(null), modules); return { + name: 'test-plugin-loader', resolveId(id) { return id in modules ? id : null; }, - load(id) { return modules[id]; } @@ -140,9 +145,11 @@ exports.normaliseOutput = function normaliseOutput(code) { }; /** + * @template {TestConfigBase} C * @param {string} suiteName * @param {string} samplesDirectory - * @param {RunTestFunction} runTest + * @param {(directory: string, config: C) => void} runTest + * @param {() => void | Promise} [onTeardown] */ function runTestSuiteWithSamples(suiteName, samplesDirectory, runTest, onTeardown) { describe(suiteName, () => runSamples(samplesDirectory, runTest, onTeardown)); @@ -150,9 +157,10 @@ function runTestSuiteWithSamples(suiteName, samplesDirectory, runTest, onTeardow // You can run only or skip certain kinds of tests by appending .only or .skip /** + * @template {TestConfigBase} C * @param {string} suiteName * @param {string} samplesDirectory - * @param {RunTestFunction} runTest + * @param {(directory: string, config: C) => void} runTest * @param {() => void | Promise} onTeardown */ runTestSuiteWithSamples.only = function (suiteName, samplesDirectory, runTest, onTeardown) { @@ -169,8 +177,9 @@ runTestSuiteWithSamples.skip = function (suiteName) { exports.runTestSuiteWithSamples = runTestSuiteWithSamples; /** + * @template {TestConfigBase} C * @param {string} samplesDirectory - * @param {RunTestFunction} runTest + * @param {(directory: string, config: C) => void} runTest * @param {Mocha.Func} onTeardown */ function runSamples(samplesDirectory, runTest, onTeardown) { @@ -186,8 +195,9 @@ function runSamples(samplesDirectory, runTest, onTeardown) { } /** + * @template {TestConfigBase} C * @param {string} directory - * @param {RunTestFunction} runTest + * @param {(directory: string, config: C) => void} runTest */ function runTestsInDirectory(directory, runTest) { const fileNames = getFileNamesAndRemoveOutput(directory); @@ -240,8 +250,9 @@ function getFileNamesAndRemoveOutput(directory) { exports.getFileNamesAndRemoveOutput = getFileNamesAndRemoveOutput; /** + * @template {TestConfigBase} C * @param {string} directory - * @param {RunTestFunction} runTest + * @param {(directory: string, config: C) => void} runTest */ function loadConfigAndRunTest(directory, runTest) { const configFile = join(directory, '_config.js'); diff --git a/test/watch/index.js b/test/watch/index.js index d7994a5e667..5600ac937f6 100644 --- a/test/watch/index.js +++ b/test/watch/index.js @@ -35,6 +35,7 @@ describe('rollup.watch', () => { watcher = rollup.watch({ input: 'test/_tmp/input/main.js', plugins: { + name: 'test-plugin', options() { assert.strictEqual(this.meta.watchMode, true, 'watchMode in options'); }, From c4e64a087c31922f4d506be7890474f5af381d35 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 23 Apr 2023 23:02:13 +0200 Subject: [PATCH 07/15] chore: update --- test/sourcemaps/define.d.ts | 4 ++-- test/types.d.ts | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/test/sourcemaps/define.d.ts b/test/sourcemaps/define.d.ts index 70a9f24e7b0..6de80b661ef 100644 --- a/test/sourcemaps/define.d.ts +++ b/test/sourcemaps/define.d.ts @@ -1,5 +1,5 @@ -import type { TestConfigForm } from '../types'; +import type { TestConfigSourcemap } from '../types'; declare global { - function defineTest(config: TestConfigForm): TestConfigForm; + function defineTest(config: TestConfigSourcemap): TestConfigSourcemap; } diff --git a/test/types.d.ts b/test/types.d.ts index e9bdfd88c46..eee72a86d6a 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -77,7 +77,10 @@ export interface TestConfigBase { minNodeVersion?: string; } -export type TestConfigForm = TestConfigBase; +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface TestConfigForm extends TestConfigBase {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface TestConfigSourcemap extends TestConfigBase {} export interface TestConfigFileHash extends TestConfigBase { options1?: RollupOptions; @@ -87,8 +90,8 @@ export interface TestConfigFileHash extends TestConfigBase { export interface TestConfigCli extends TestConfigBase { command?: string; - cwd: string; - retry: number; + cwd?: string; + retry?: number; /** * Assert the stderr of the build. */ @@ -97,6 +100,8 @@ export interface TestConfigCli extends TestConfigBase { * Assert the stderr stream, return true to abort the test. */ abortOnStderr?: (data: string) => boolean | void | Promise; + + result?: (code: string) => void; } export interface TestConfigChunkingForm extends TestConfigBase { From 1d9cd9823959d4e5f5812aecafc62933998e5867 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 23 Apr 2023 23:16:02 +0200 Subject: [PATCH 08/15] chore: update --- .../preset-with-override/_config.js | 1 + .../treeshake-presets/recommended/_config.js | 1 + .../samples/render-chunk-babili/_config.js | 1 + .../samples/single-length-segments/_config.js | 1 + .../samples/sourcemap-file/_config.js | 1 + .../transform-low-resolution/_config.js | 4 +++- test/sourcemaps/samples/transforms/_config.js | 2 +- .../samples/untransformed-modules/_config.js | 2 +- test/tsconfig.base.json | 4 ++-- test/tsconfig.json | 24 ++++++++++++++----- test/types.d.ts | 8 +++---- 11 files changed, 34 insertions(+), 15 deletions(-) diff --git a/test/form/samples/treeshake-presets/preset-with-override/_config.js b/test/form/samples/treeshake-presets/preset-with-override/_config.js index 72e344d2bb6..6f4d613ee31 100644 --- a/test/form/samples/treeshake-presets/preset-with-override/_config.js +++ b/test/form/samples/treeshake-presets/preset-with-override/_config.js @@ -10,6 +10,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test-plugin', buildStart(options) { assert.strictEqual(options.treeshake.correctVarValueBeforeDeclaration, false); assert.strictEqual(options.treeshake.propertyReadSideEffects, false); diff --git a/test/form/samples/treeshake-presets/recommended/_config.js b/test/form/samples/treeshake-presets/recommended/_config.js index 2aaba3549ad..60187f4b51c 100644 --- a/test/form/samples/treeshake-presets/recommended/_config.js +++ b/test/form/samples/treeshake-presets/recommended/_config.js @@ -7,6 +7,7 @@ module.exports = defineTest({ treeshake: 'recommended', plugins: [ { + name: 'test-plugin', buildStart(options) { assert.strictEqual(options.treeshake.correctVarValueBeforeDeclaration, false); assert.strictEqual(options.treeshake.propertyReadSideEffects, true); diff --git a/test/sourcemaps/samples/render-chunk-babili/_config.js b/test/sourcemaps/samples/render-chunk-babili/_config.js index 4f2385e3f3e..85202f9d179 100644 --- a/test/sourcemaps/samples/render-chunk-babili/_config.js +++ b/test/sourcemaps/samples/render-chunk-babili/_config.js @@ -8,6 +8,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', renderChunk(code, chunk, options) { const format = options.format; diff --git a/test/sourcemaps/samples/single-length-segments/_config.js b/test/sourcemaps/samples/single-length-segments/_config.js index b3340ebbc86..a7fe1044e4d 100644 --- a/test/sourcemaps/samples/single-length-segments/_config.js +++ b/test/sourcemaps/samples/single-length-segments/_config.js @@ -11,6 +11,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', transform() { return { code: readFileSync(path.resolve(__dirname, 'output.js'), 'utf8'), diff --git a/test/sourcemaps/samples/sourcemap-file/_config.js b/test/sourcemaps/samples/sourcemap-file/_config.js index 91d80c8f56e..6c34ba18e39 100644 --- a/test/sourcemaps/samples/sourcemap-file/_config.js +++ b/test/sourcemaps/samples/sourcemap-file/_config.js @@ -5,6 +5,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', transform() { return null; } diff --git a/test/sourcemaps/samples/transform-low-resolution/_config.js b/test/sourcemaps/samples/transform-low-resolution/_config.js index af1a19431ab..1510874e9d5 100644 --- a/test/sourcemaps/samples/transform-low-resolution/_config.js +++ b/test/sourcemaps/samples/transform-low-resolution/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); const { encode } = require('@jridgewell/sourcemap-codec'); -const MagicString = require('magic-string'); +const MagicString = require('magic-string').default; const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); @@ -16,9 +16,11 @@ module.exports = defineTest({ // [generatedColumn, sourceIndex, sourceLine, sourceColumn]; // this mapping only maps the second line to the first with no column // details + /** @type {import('@jridgewell/sourcemap-codec').SourceMapMappings} */ const decodedMap = [[], [[0, 0, 0, 0]]]; return { code: `console.log('added');\n${code}`, + /** @type {any} */ map: { mappings: encode(decodedMap) } }; } diff --git a/test/sourcemaps/samples/transforms/_config.js b/test/sourcemaps/samples/transforms/_config.js index 9edae95a3b1..f0d005fc354 100644 --- a/test/sourcemaps/samples/transforms/_config.js +++ b/test/sourcemaps/samples/transforms/_config.js @@ -1,6 +1,6 @@ const assert = require('node:assert'); const buble = require('buble'); -const MagicString = require('magic-string'); +const MagicString = require('magic-string').default; const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); diff --git a/test/sourcemaps/samples/untransformed-modules/_config.js b/test/sourcemaps/samples/untransformed-modules/_config.js index a2cb8040caa..e4d925debe1 100644 --- a/test/sourcemaps/samples/untransformed-modules/_config.js +++ b/test/sourcemaps/samples/untransformed-modules/_config.js @@ -1,5 +1,5 @@ const assert = require('node:assert'); -const MagicString = require('magic-string'); +const MagicString = require('magic-string').default; module.exports = defineTest({ description: 'allows sourcemap chains with some untransformed modules (#404)', diff --git a/test/tsconfig.base.json b/test/tsconfig.base.json index 8ceaca840cc..4770d9c4bb4 100644 --- a/test/tsconfig.base.json +++ b/test/tsconfig.base.json @@ -2,14 +2,14 @@ "compilerOptions": { "allowJs": true, "checkJs": true, + "composite": true, "target": "esnext", "lib": ["ES2021"], "esModuleInterop": true, "moduleResolution": "node", "types": [ "node", - "mocha", - "./types.d.ts" + "mocha" ] // "strict": true // maybe later } diff --git a/test/tsconfig.json b/test/tsconfig.json index 47e79866619..c71d3305dd7 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -7,11 +7,23 @@ "./utils.js" ], "references": [ - "./browser/tsconfig.json", - "./chunking-form/tsconfig.json", - "./file-hash/tsconfig.json", - "./form/tsconfig.json", - "./function/tsconfig.json", - "./sourcemaps/tsconfig.json" + { + "path": "./browser" + }, + { + "path": "./chunking-form" + }, + { + "path": "./file-hashes" + }, + { + "path": "./form" + }, + { + "path": "./function" + }, + { + "path": "./sourcemaps" + } ] } diff --git a/test/types.d.ts b/test/types.d.ts index eee72a86d6a..2faf83d7c8f 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -28,10 +28,6 @@ export interface TestConfigBase { * Bundle formats to test. */ formats?: string[]; - /** - * Environment variables to set for the test. - */ - env?: Record; /** * The global context executed the bundled code. */ @@ -92,6 +88,10 @@ export interface TestConfigCli extends TestConfigBase { command?: string; cwd?: string; retry?: number; + /** + * Environment variables to set for the test. + */ + env?: Record; /** * Assert the stderr of the build. */ From a9fcba1235de5b512f304380ab6fb090107c6381 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 24 Apr 2023 12:43:11 +0200 Subject: [PATCH 09/15] fix: fix some type error --- .gitignore | 1 + test/function/index.js | 247 +++++++++--------- .../dynamic-import/_config.js | 1 + .../synthetic-named-exports/entry/_config.js | 1 + .../external-synthetic-exports/_config.js | 1 + .../non-default-export/_config.js | 1 + .../synthetic-exports-need-default/_config.js | 1 + .../_config.js | 1 + .../_config.js | 1 + .../synthetic-named-export-entry/_config.js | 1 + .../unknown-generated-code-preset/_config.js | 5 +- .../unknown-generated-code-value/_config.js | 1 + .../unknown-treeshake-preset/_config.js | 5 +- .../unknown-treeshake-value/_config.js | 1 + test/sourcemaps/getLocation.js | 5 + .../combined-sourcemap-with-loader/_config.js | 5 +- .../samples/combined-sourcemap/_config.js | 4 +- test/sourcemaps/tsconfig.json | 2 +- test/tsconfig.base.json | 3 +- test/types.d.ts | 11 +- 20 files changed, 169 insertions(+), 129 deletions(-) diff --git a/.gitignore b/.gitignore index 9f36b14f659..1c4b59f55d7 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ perf/ .github_token .temp docs/.vitepress/graphs +*.tsbuildinfo diff --git a/test/function/index.js b/test/function/index.js index 233fd053aa1..56c8e81269d 100644 --- a/test/function/index.js +++ b/test/function/index.js @@ -49,136 +49,143 @@ function runCodeSplitTest(codeMap, entryId, configContext) { return { exports }; } -runTestSuiteWithSamples('function', path.join(__dirname, 'samples'), (directory, config) => { - (config.skip ? it.skip : config.solo ? it.only : it)( - path.basename(directory) + ': ' + config.description, - () => { - if (config.show) console.group(path.basename(directory)); - if (config.before) config.before(); - process.chdir(directory); - const warnings = []; +runTestSuiteWithSamples( + 'function', + path.join(__dirname, 'samples'), + /** + * @param {import('../types').TestConfigFunction} config + */ + (directory, config) => { + (config.skip ? it.skip : config.solo ? it.only : it)( + path.basename(directory) + ': ' + config.description, + () => { + if (config.show) console.group(path.basename(directory)); + if (config.before) config.before(); + process.chdir(directory); + const warnings = []; - return rollup - .rollup({ - input: path.join(directory, 'main.js'), - onwarn: warning => warnings.push(warning), - strictDeprecations: true, - ...config.options - }) - .then(bundle => { - let unintendedError; + return rollup + .rollup({ + input: path.join(directory, 'main.js'), + onwarn: warning => warnings.push(warning), + strictDeprecations: true, + ...config.options + }) + .then(bundle => { + let unintendedError; - if (config.error) { - throw new Error('Expected an error while rolling up'); - } + if (config.error) { + throw new Error('Expected an error while rolling up'); + } - let result; + let result; - return bundle - .generate({ - exports: 'auto', - format: 'cjs', - ...(config.options || {}).output - }) - .then(({ output }) => { - if (config.generateError) { - unintendedError = new Error('Expected an error while generating output'); - } + return bundle + .generate({ + exports: 'auto', + format: 'cjs', + ...(config.options || {}).output + }) + .then(({ output }) => { + if (config.generateError) { + unintendedError = new Error('Expected an error while generating output'); + } - result = output; - }) - .catch(error => { - if (config.generateError) { - compareError(error, config.generateError); - } else { - throw error; - } - }) - .then(() => { - if (unintendedError) throw unintendedError; - if (config.error || config.generateError) return; + result = output; + }) + .catch(error => { + if (config.generateError) { + compareError(error, config.generateError); + } else { + throw error; + } + }) + .then(() => { + if (unintendedError) throw unintendedError; + if (config.error || config.generateError) return; - const codeMap = result.reduce((codeMap, chunk) => { - codeMap[chunk.fileName] = chunk.code; - return codeMap; - }, {}); - if (config.code) { - config.code(result.length === 1 ? result[0].code : codeMap); - } + const codeMap = result.reduce((codeMap, chunk) => { + codeMap[chunk.fileName] = chunk.code; + return codeMap; + }, {}); + if (config.code) { + config.code(result.length === 1 ? result[0].code : codeMap); + } - const entryId = result.length === 1 ? result[0].fileName : 'main.js'; - if (!codeMap.hasOwnProperty(entryId)) { - throw new Error( - `Could not find entry "${entryId}" in generated output.\nChunks:\n${Object.keys( - codeMap - ).join('\n')}` - ); - } - const { exports, error } = runCodeSplitTest(codeMap, entryId, config.context); - if (config.runtimeError) { - if (error) { - config.runtimeError(error); - } else { - unintendedError = new Error('Expected an error while executing output'); + const entryId = result.length === 1 ? result[0].fileName : 'main.js'; + if (!codeMap.hasOwnProperty(entryId)) { + throw new Error( + `Could not find entry "${entryId}" in generated output.\nChunks:\n${Object.keys( + codeMap + ).join('\n')}` + ); } - } else if (error) { - unintendedError = error; - } - return Promise.resolve() - .then(() => { - if (config.exports && !unintendedError) { - return config.exports(exports); - } - }) - .then(() => { - if (config.bundle && !unintendedError) { - return config.bundle(bundle); - } - }) - .catch(error_ => { - if (config.runtimeError) { - config.runtimeError(error_); + const { exports, error } = runCodeSplitTest(codeMap, entryId, config.context); + if (config.runtimeError) { + if (error) { + config.runtimeError(error); } else { - unintendedError = error_; + unintendedError = new Error('Expected an error while executing output'); } - }) - .then(() => { - if (config.show || unintendedError) { - for (const chunk of result) { - console.group(chunk.fileName); - console.log(chunk.code); - console.groupEnd(); - console.log(); + } else if (error) { + unintendedError = error; + } + return Promise.resolve() + .then(() => { + if (config.exports && !unintendedError) { + return config.exports(exports); } - } - - if (config.warnings) { - if (Array.isArray(config.warnings)) { - compareWarnings(warnings, config.warnings); + }) + .then(() => { + if (config.bundle && !unintendedError) { + return config.bundle(bundle); + } + }) + .catch(error_ => { + if (config.runtimeError) { + config.runtimeError(error_); } else { - config.warnings(warnings); + unintendedError = error_; } - } else if (warnings.length > 0) { - throw new Error( - `Got unexpected warnings:\n${warnings - .map(warning => warning.message) - .join('\n')}` - ); - } - if (config.show) console.groupEnd(); - if (unintendedError) throw unintendedError; - if (config.after) config.after(); - }); - }); - }) - .catch(error => { - if (config.error) { - compareError(error, config.error); - } else { - throw error; - } - if (config.after) config.after(); - }); - } - ); -}); + }) + .then(() => { + if (config.show || unintendedError) { + for (const chunk of result) { + console.group(chunk.fileName); + console.log(chunk.code); + console.groupEnd(); + console.log(); + } + } + + if (config.warnings) { + if (Array.isArray(config.warnings)) { + compareWarnings(warnings, config.warnings); + } else { + config.warnings(warnings); + } + } else if (warnings.length > 0) { + throw new Error( + `Got unexpected warnings:\n${warnings + .map(warning => warning.message) + .join('\n')}` + ); + } + if (config.show) console.groupEnd(); + if (unintendedError) throw unintendedError; + if (config.after) config.after(); + }); + }); + }) + .catch(error => { + if (config.error) { + compareError(error, config.error); + } else { + throw error; + } + if (config.after) config.after(); + }); + } + ); + } +); diff --git a/test/function/samples/synthetic-named-exports/dynamic-import/_config.js b/test/function/samples/synthetic-named-exports/dynamic-import/_config.js index f7be702ee4b..aa0d92e4f08 100644 --- a/test/function/samples/synthetic-named-exports/dynamic-import/_config.js +++ b/test/function/samples/synthetic-named-exports/dynamic-import/_config.js @@ -5,6 +5,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', transform(code, id) { if (id.endsWith('dep.js')) { return { code, syntheticNamedExports: true }; diff --git a/test/function/samples/synthetic-named-exports/entry/_config.js b/test/function/samples/synthetic-named-exports/entry/_config.js index 0e31998a222..ec3c1902b84 100644 --- a/test/function/samples/synthetic-named-exports/entry/_config.js +++ b/test/function/samples/synthetic-named-exports/entry/_config.js @@ -5,6 +5,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', transform(code) { return { code, syntheticNamedExports: '__synthetic' }; } diff --git a/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js b/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js index d34e3b7822a..45cb93b3b32 100644 --- a/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js +++ b/test/function/samples/synthetic-named-exports/external-synthetic-exports/_config.js @@ -3,6 +3,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', resolveId(id) { if (id === 'dep') { return { diff --git a/test/function/samples/synthetic-named-exports/non-default-export/_config.js b/test/function/samples/synthetic-named-exports/non-default-export/_config.js index 7a52385b327..2221ec3c63b 100644 --- a/test/function/samples/synthetic-named-exports/non-default-export/_config.js +++ b/test/function/samples/synthetic-named-exports/non-default-export/_config.js @@ -5,6 +5,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', transform(code, id) { if (id.endsWith('dep.js')) { return { code, syntheticNamedExports: '__synthetic' }; diff --git a/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js b/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js index c2e6b5445df..53cea010ae5 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-exports-need-default/_config.js @@ -7,6 +7,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', transform() { return { syntheticNamedExports: true }; } diff --git a/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js b/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js index 3bec69a61d1..f1ee50d90cf 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-exports-need-fallback-export/_config.js @@ -7,6 +7,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin', transform(code, id) { if (id.endsWith('dep.js')) { return { code, syntheticNamedExports: '__synthetic' }; diff --git a/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js b/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js index e5e1db5c4f8..3bbcc0207d3 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-named-export-as-default/_config.js @@ -2,6 +2,7 @@ module.exports = defineTest({ description: 'makes sure default exports of synthetic named exports are snapshots', options: { plugins: { + name: 'test-plugin', transform() { return { syntheticNamedExports: '__synthetic' }; } diff --git a/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js b/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js index b9a9a17888c..be9caf628e0 100644 --- a/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js +++ b/test/function/samples/synthetic-named-exports/synthetic-named-export-entry/_config.js @@ -10,6 +10,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin1', transform(code, id) { switch (id) { case ID_MAIN: { diff --git a/test/function/samples/unknown-generated-code-preset/_config.js b/test/function/samples/unknown-generated-code-preset/_config.js index bd65e65c8ad..b98cd3519b7 100644 --- a/test/function/samples/unknown-generated-code-preset/_config.js +++ b/test/function/samples/unknown-generated-code-preset/_config.js @@ -2,7 +2,10 @@ module.exports = defineTest({ description: 'throws for unknown presets for the generatedCode option', options: { output: { - generatedCode: { preset: 'some-string' } + generatedCode: { + // @ts-expect-error expected error + preset: 'some-string' + } } }, generateError: { diff --git a/test/function/samples/unknown-generated-code-value/_config.js b/test/function/samples/unknown-generated-code-value/_config.js index 14e2ef42e5b..c010eb4ce3f 100644 --- a/test/function/samples/unknown-generated-code-value/_config.js +++ b/test/function/samples/unknown-generated-code-value/_config.js @@ -2,6 +2,7 @@ module.exports = defineTest({ description: 'throws for unknown string values for the generatedCode option', options: { output: { + // @ts-expect-error expected error generatedCode: 'some-string' } }, diff --git a/test/function/samples/unknown-treeshake-preset/_config.js b/test/function/samples/unknown-treeshake-preset/_config.js index 4d5a54e2009..09a96076a26 100644 --- a/test/function/samples/unknown-treeshake-preset/_config.js +++ b/test/function/samples/unknown-treeshake-preset/_config.js @@ -1,7 +1,10 @@ module.exports = defineTest({ description: 'throws for unknown presets for the treeshake option', options: { - treeshake: { preset: 'some-string' } + treeshake: { + // @ts-expect-error expected error + preset: 'some-string' + } }, error: { code: 'INVALID_OPTION', diff --git a/test/function/samples/unknown-treeshake-value/_config.js b/test/function/samples/unknown-treeshake-value/_config.js index db2c1528bda..9d640033169 100644 --- a/test/function/samples/unknown-treeshake-value/_config.js +++ b/test/function/samples/unknown-treeshake-value/_config.js @@ -1,6 +1,7 @@ module.exports = defineTest({ description: 'throws for unknown string values for the treeshake option', options: { + // @ts-expect-error expected error treeshake: 'some-string' }, error: { diff --git a/test/sourcemaps/getLocation.js b/test/sourcemaps/getLocation.js index fdd10f98c14..496d14d43ea 100644 --- a/test/sourcemaps/getLocation.js +++ b/test/sourcemaps/getLocation.js @@ -1,3 +1,8 @@ +/** + * @param {string} source + * @param {string | number} search + * @returns {{ line: number, column: number } | undefined} + */ module.exports = function getLocation(source, search) { var lines = source.split('\n'); var length_ = lines.length; diff --git a/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js b/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js index 6c7d9515efa..3c3d641a8e0 100644 --- a/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js +++ b/test/sourcemaps/samples/combined-sourcemap-with-loader/_config.js @@ -1,7 +1,7 @@ const assert = require('node:assert'); const { readFileSync } = require('node:fs'); const buble = require('buble'); -const MagicString = require('magic-string'); +const MagicString = require('magic-string').default; const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); @@ -10,6 +10,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin1', load(id) { const code = readFileSync(id, 'utf8'); const out = buble.transform(code, { @@ -22,6 +23,7 @@ module.exports = defineTest({ } }, { + name: 'test-plugin2', async transform(code, id) { const sourcemap = this.getCombinedSourcemap(); const smc = await new SourceMapConsumer(sourcemap); @@ -46,6 +48,7 @@ module.exports = defineTest({ } }, { + name: 'test-plugin3', async transform(code, id) { const sourcemap = this.getCombinedSourcemap(); const smc = await new SourceMapConsumer(sourcemap); diff --git a/test/sourcemaps/samples/combined-sourcemap/_config.js b/test/sourcemaps/samples/combined-sourcemap/_config.js index f1a71a6432a..63ee2ec85b8 100644 --- a/test/sourcemaps/samples/combined-sourcemap/_config.js +++ b/test/sourcemaps/samples/combined-sourcemap/_config.js @@ -1,5 +1,5 @@ const assert = require('node:assert'); -const MagicString = require('magic-string'); +const MagicString = require('magic-string').default; const { SourceMapConsumer } = require('source-map'); const getLocation = require('../../getLocation'); @@ -8,6 +8,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test-plugin1', async transform(code, id) { const sourcemap = this.getCombinedSourcemap(); const smc = await new SourceMapConsumer(sourcemap); @@ -32,6 +33,7 @@ module.exports = defineTest({ } }, { + name: 'test-plugin2', async transform(code, id) { const sourcemap = this.getCombinedSourcemap(); const smc = await new SourceMapConsumer(sourcemap); diff --git a/test/sourcemaps/tsconfig.json b/test/sourcemaps/tsconfig.json index 4a26f3ee84c..22ef5710b77 100644 --- a/test/sourcemaps/tsconfig.json +++ b/test/sourcemaps/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../tsconfig.base.json", "include": [ "**/_config.js", - "./index.js", + "./*.js", "./define.d.ts" ] } diff --git a/test/tsconfig.base.json b/test/tsconfig.base.json index 4770d9c4bb4..dd84d2ae90c 100644 --- a/test/tsconfig.base.json +++ b/test/tsconfig.base.json @@ -4,7 +4,8 @@ "checkJs": true, "composite": true, "target": "esnext", - "lib": ["ES2021"], + "module": "node16", + "lib": ["esnext"], "esModuleInterop": true, "moduleResolution": "node", "types": [ diff --git a/test/types.d.ts b/test/types.d.ts index 2faf83d7c8f..8ef821bf35a 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/member-ordering */ import type { SourceMap } from 'magic-string'; -import type { RollupError, RollupOptions } from '../src/rollup/types'; +import type { RollupBuild, RollupError, RollupOptions } from '../src/rollup/types'; export interface TestConfigBase { /** @@ -11,6 +11,10 @@ export interface TestConfigBase { * Skip this test. */ skip?: boolean; + /** + * Display in the test output. + */ + show?: boolean; /** * Execute the bundled code. */ @@ -49,7 +53,7 @@ export interface TestConfigBase { /** * Test the expected error. */ - error?: RollupError | ((error: RollupError) => boolean | void); + error?: RollupError; generateError?: RollupError; /** * Test the expected warnings. @@ -81,7 +85,6 @@ export interface TestConfigSourcemap extends TestConfigBase {} export interface TestConfigFileHash extends TestConfigBase { options1?: RollupOptions; options2?: RollupOptions; - show?: boolean; } export interface TestConfigCli extends TestConfigBase { @@ -117,6 +120,8 @@ export interface TestConfigChunkingForm extends TestConfigBase { export interface TestConfigFunction extends TestConfigBase { runtimeError?(error: Error): void; + bundle?(bundle: RollupBuild): void; + code?(code: string): void; } export type RunTestFunction = (directory: string, config: C) => void; From a6cb6b9c91f3143020f61aa9543dc53df3151f11 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 24 Apr 2023 12:44:46 +0200 Subject: [PATCH 10/15] chore: disable check js for now --- test/tsconfig.base.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tsconfig.base.json b/test/tsconfig.base.json index dd84d2ae90c..6b7407cd4c4 100644 --- a/test/tsconfig.base.json +++ b/test/tsconfig.base.json @@ -1,7 +1,8 @@ { "compilerOptions": { + // enable this to capture type errors, or add @ts-check to the top of the file + // "checkJs": true, "allowJs": true, - "checkJs": true, "composite": true, "target": "esnext", "module": "node16", @@ -12,6 +13,5 @@ "node", "mocha" ] - // "strict": true // maybe later } } From 3fa7d438b0325d7a204347caa241f8f6c570227f Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 24 Apr 2023 12:51:06 +0200 Subject: [PATCH 11/15] chore: update --- test/function/samples/amd-auto-id-id/_config.js | 11 ++++++++++- test/function/samples/amd-base-path-id/_config.js | 11 ++++++++++- test/function/samples/amd-base-path/_config.js | 8 +++++++- .../samples/avoid-variable-be-empty/_config.js | 1 + test/function/samples/aync-options/_config.js | 2 ++ test/function/samples/banner-and-footer/_config.js | 3 +++ test/function/samples/bundle-facade-order/_config.js | 1 + .../_config.js | 1 + .../samples/configure-external-module-b/_config.js | 1 + 9 files changed, 36 insertions(+), 3 deletions(-) diff --git a/test/function/samples/amd-auto-id-id/_config.js b/test/function/samples/amd-auto-id-id/_config.js index 24028e12223..856db562577 100644 --- a/test/function/samples/amd-auto-id-id/_config.js +++ b/test/function/samples/amd-auto-id-id/_config.js @@ -1,7 +1,16 @@ +// @ts-check + module.exports = defineTest({ description: 'throws when using both the amd.autoId and the amd.id option', options: { - output: { dir: 'dist', amd: { autoId: 'a', id: 'a' } } + output: { + dir: 'dist', + amd: { + // @ts-expect-error expected error + autoId: 'a', + id: 'a' + } + } }, generateError: { code: 'INVALID_OPTION', diff --git a/test/function/samples/amd-base-path-id/_config.js b/test/function/samples/amd-base-path-id/_config.js index c5253093a86..6fd36255965 100644 --- a/test/function/samples/amd-base-path-id/_config.js +++ b/test/function/samples/amd-base-path-id/_config.js @@ -1,7 +1,16 @@ +// @ts-check + module.exports = defineTest({ description: 'throws when using both the amd.basePath and the amd.id option', options: { - output: { dir: 'dist', amd: { basePath: 'a', id: 'a' } } + output: { + dir: 'dist', + amd: { + // @ts-expect-error expected error + basePath: 'a', + id: 'a' + } + } }, generateError: { code: 'INVALID_OPTION', diff --git a/test/function/samples/amd-base-path/_config.js b/test/function/samples/amd-base-path/_config.js index 3403eff43fe..12d674d59a7 100644 --- a/test/function/samples/amd-base-path/_config.js +++ b/test/function/samples/amd-base-path/_config.js @@ -1,7 +1,13 @@ module.exports = defineTest({ description: 'throws when using only amd.basePath option', options: { - output: { dir: 'dist', amd: { basePath: 'a' } } + output: { + dir: 'dist', + amd: { + // @ts-expect-error expected error + basePath: 'a' + } + } }, generateError: { code: 'INVALID_OPTION', diff --git a/test/function/samples/avoid-variable-be-empty/_config.js b/test/function/samples/avoid-variable-be-empty/_config.js index bc96942f808..c1458c2e12d 100644 --- a/test/function/samples/avoid-variable-be-empty/_config.js +++ b/test/function/samples/avoid-variable-be-empty/_config.js @@ -4,6 +4,7 @@ module.exports = defineTest({ input: '', plugins: [ { + name: 'test-plugin', resolveId() { return ''; }, diff --git a/test/function/samples/aync-options/_config.js b/test/function/samples/aync-options/_config.js index 5c68bf5bf7e..837b483be0f 100644 --- a/test/function/samples/aync-options/_config.js +++ b/test/function/samples/aync-options/_config.js @@ -6,12 +6,14 @@ module.exports = defineTest({ preserveEntrySignatures: false, plugins: [ { + name: 'test-plugin1', options(options) { assert.strictEqual(options.preserveEntrySignatures, false); return Promise.resolve({ ...options, preserveEntrySignatures: 'strict' }); } }, { + name: 'test-plugin2', options(options) { assert.strictEqual(options.preserveEntrySignatures, 'strict'); return Promise.resolve(null); diff --git a/test/function/samples/banner-and-footer/_config.js b/test/function/samples/banner-and-footer/_config.js index b38566891ea..d1330983317 100644 --- a/test/function/samples/banner-and-footer/_config.js +++ b/test/function/samples/banner-and-footer/_config.js @@ -7,18 +7,21 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test-plugin1', banner: '/* first banner */', footer() { return '/* first footer */'; } }, { + name: 'test-plugin2', banner() { return '/* second banner */'; }, footer: '/* second footer */' }, { + name: 'test-plugin3', banner() { return Promise.reject(new Error('Could not generate banner.')); }, diff --git a/test/function/samples/bundle-facade-order/_config.js b/test/function/samples/bundle-facade-order/_config.js index a860679c1c7..9dd3332ec3c 100644 --- a/test/function/samples/bundle-facade-order/_config.js +++ b/test/function/samples/bundle-facade-order/_config.js @@ -9,6 +9,7 @@ module.exports = defineTest({ other: 'other' }, plugins: { + name: 'test-plugin', generateBundle(options, bundle) { assert.deepStrictEqual( Object.keys(bundle).map(id => [id, bundle[id].code]), diff --git a/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js b/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js index 62928ee4991..c2b0ddb5af9 100644 --- a/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js +++ b/test/function/samples/check-exports-exportedBindings-as-a-supplementary-test/_config.js @@ -24,6 +24,7 @@ module.exports = defineTest({ description: 'check exports and exportedBindings in moduleParsed as a supplementary test', options: { plugins: { + name: 'test-plugin', moduleParsed(moduleInfo) { const { exports, exportedBindings, id } = moduleInfo; assert.deepStrictEqual({ exports, exportedBindings }, expectedResult[id]); diff --git a/test/function/samples/configure-external-module-b/_config.js b/test/function/samples/configure-external-module-b/_config.js index dbf6cde9fcd..74bb65a6bec 100644 --- a/test/function/samples/configure-external-module-b/_config.js +++ b/test/function/samples/configure-external-module-b/_config.js @@ -6,6 +6,7 @@ module.exports = defineTest({ external: ['path'] }, exports() { + // @ts-expect-error missing types assert.equal(require('node:path').resolve.configured, 'yes'); } }); From c0da814c3ae0744f428889e84d98676cd9500c49 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 24 Apr 2023 13:04:27 +0200 Subject: [PATCH 12/15] chore: update --- test/function/samples/banner-and-footer/_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/function/samples/banner-and-footer/_config.js b/test/function/samples/banner-and-footer/_config.js index d1330983317..69ad8b91fa1 100644 --- a/test/function/samples/banner-and-footer/_config.js +++ b/test/function/samples/banner-and-footer/_config.js @@ -32,7 +32,7 @@ module.exports = defineTest({ generateError: { code: 'ADDON_ERROR', message: - 'Could not retrieve "banner". Check configuration of plugin "at position 3".\n' + + 'Could not retrieve "banner". Check configuration of plugin "test-plugin3".\n' + '\tError Message: Could not generate banner.' } }); From fda79bc57f0b40a49d9bc768371b1cb9867ca546 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Tue, 25 Apr 2023 07:12:21 +0200 Subject: [PATCH 13/15] chore: fix emission issue in WebStorm --- test/form/samples/addon-functions/_config.js | 1 + test/tsconfig.base.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/form/samples/addon-functions/_config.js b/test/form/samples/addon-functions/_config.js index b7c5b899b3b..f11a5ddac3c 100644 --- a/test/form/samples/addon-functions/_config.js +++ b/test/form/samples/addon-functions/_config.js @@ -1,4 +1,5 @@ const assert = require('node:assert'); +// @ts-expect-error export outside root const { replaceDirectoryInStringifiedObject } = require('../../../utils'); const assertChunkData = chunk => assert.strictEqual( diff --git a/test/tsconfig.base.json b/test/tsconfig.base.json index 6b7407cd4c4..0990bc018d8 100644 --- a/test/tsconfig.base.json +++ b/test/tsconfig.base.json @@ -1,17 +1,18 @@ { "compilerOptions": { // enable this to capture type errors, or add @ts-check to the top of the file - // "checkJs": true, + // "checkJs": true, "allowJs": true, "composite": true, "target": "esnext", "module": "node16", + "noEmit": true, "lib": ["esnext"], "esModuleInterop": true, "moduleResolution": "node", "types": [ "node", "mocha" - ] + ], } } From 6edc9ebea5bd55d486723924c24336cd99435504 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Tue, 25 Apr 2023 21:50:29 +0200 Subject: [PATCH 14/15] Fix some type issues --- src/rollup/types.d.ts | 2 +- test/browser/index.js | 2 +- test/browser/samples/missing-load/_config.js | 1 + .../samples/absolute-path-resolver/_config.js | 1 + test/form/samples/addon-functions/_config.js | 1 - .../form/samples/banner-and-footer/_config.js | 3 ++ .../samples/configure-file-url/_config.js | 2 ++ .../_config.js | 1 + .../dynamic-import-unresolvable/_config.js | 5 +++- test/form/samples/emit-asset-file/_config.js | 9 ++++-- .../emit-file-tree-shaken-access/_config.js | 1 + .../emit-uint8array-no-buffer/_config.js | 1 + .../const-bindings-false/_config.js | 1 + .../const-bindings-true/_config.js | 1 + .../reserved-names-as-props-false/_config.js | 1 + .../reserved-names-as-props-true/_config.js | 1 + .../generated-code-presets/es2015/_config.js | 1 + .../generated-code-presets/es5/_config.js | 1 + .../preset-with-override/_config.js | 1 + .../const-bindings-false/_config.js | 1 + .../const-bindings-true/_config.js | 1 + .../reserved-names-as-props-false/_config.js | 1 + .../reserved-names-as-props-true/_config.js | 1 + .../assertion-shapes/_config.js | 1 - .../keep-dynamic-assertions/_config.js | 1 + .../_config.js | 1 + .../plugin-assertions-resolveid/_config.js | 1 + .../removes-dynamic-assertions/_config.js | 1 + .../_config.js | 1 + .../_config.js | 1 + .../samples/interop-per-dependency/_config.js | 1 + .../_config.js | 1 + test/form/samples/intro-and-outro/_config.js | 4 +++ .../make-relative-false/_config.js | 1 + .../make-relative-relative/_config.js | 1 + .../make-relative-true/_config.js | 1 + test/form/samples/merge-namespaces/_config.js | 1 + .../form/samples/supports-es6-shim/_config.js | 2 +- .../synthetic-named-exports/_config.js | 1 + test/form/samples/system-reexports/_config.js | 2 +- test/form/samples/treeshake-json/_config.js | 2 +- .../preset-with-override/_config.js | 5 +++- .../treeshake-presets/recommended/_config.js | 5 +++- .../treeshake-presets/safest/_config.js | 6 +++- .../treeshake-presets/smallest/_config.js | 6 +++- .../samples/treeshake-presets/true/_config.js | 6 +++- test/tsconfig.base.json | 29 +++++++++---------- test/types.d.ts | 2 +- 48 files changed, 91 insertions(+), 32 deletions(-) diff --git a/src/rollup/types.d.ts b/src/rollup/types.d.ts index 94759af04ca..9d38f027e17 100644 --- a/src/rollup/types.d.ts +++ b/src/rollup/types.d.ts @@ -519,7 +519,7 @@ export type InputPluginOption = MaybePromise; - acornInjectPlugins?: (() => unknown)[] | (() => unknown); + acornInjectPlugins?: ((...arguments_: any[]) => unknown)[] | ((...arguments_: any[]) => unknown); cache?: boolean | RollupCache; context?: string; experimentalCacheExpiry?: number; diff --git a/test/browser/index.js b/test/browser/index.js index 2baa6304f17..f018571a648 100644 --- a/test/browser/index.js +++ b/test/browser/index.js @@ -10,7 +10,6 @@ const fixturify = require('fixturify'); /** * @type {import('../../src/rollup/types')} Rollup */ -// @ts-expect-error cast to Rollup const { rollup } = require('../../browser/dist/rollup.browser.js'); const { assertFilesAreEqual, runTestSuiteWithSamples, compareError } = require('../utils.js'); @@ -68,6 +67,7 @@ runTestSuiteWithSamples('browser', resolve(__dirname, 'samples'), (directory, co }); function assertOutputMatches(output, directory) { + /** @type any */ const actual = {}; for (const file of output) { const filePath = file.fileName.split('/'); diff --git a/test/browser/samples/missing-load/_config.js b/test/browser/samples/missing-load/_config.js index b61c4fef40d..6cffb4e5c40 100644 --- a/test/browser/samples/missing-load/_config.js +++ b/test/browser/samples/missing-load/_config.js @@ -2,6 +2,7 @@ module.exports = defineTest({ description: 'fails if a file cannot be loaded', options: { plugins: { + name: 'test', resolveId(source) { return source; } diff --git a/test/form/samples/absolute-path-resolver/_config.js b/test/form/samples/absolute-path-resolver/_config.js index a55c2a374b0..3463f2ed7cb 100644 --- a/test/form/samples/absolute-path-resolver/_config.js +++ b/test/form/samples/absolute-path-resolver/_config.js @@ -5,6 +5,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test', transform(code, id) { if (/main/.test(id)) { return code.replace('"./a.js"', JSON.stringify(path.resolve(__dirname, 'a.js'))); diff --git a/test/form/samples/addon-functions/_config.js b/test/form/samples/addon-functions/_config.js index f11a5ddac3c..b7c5b899b3b 100644 --- a/test/form/samples/addon-functions/_config.js +++ b/test/form/samples/addon-functions/_config.js @@ -1,5 +1,4 @@ const assert = require('node:assert'); -// @ts-expect-error export outside root const { replaceDirectoryInStringifiedObject } = require('../../../utils'); const assertChunkData = chunk => assert.strictEqual( diff --git a/test/form/samples/banner-and-footer/_config.js b/test/form/samples/banner-and-footer/_config.js index 81e6d956c01..157cf9fdf55 100644 --- a/test/form/samples/banner-and-footer/_config.js +++ b/test/form/samples/banner-and-footer/_config.js @@ -7,18 +7,21 @@ module.exports = defineTest({ }, plugins: [ { + name: 'first', banner: '/* first banner */', footer() { return '/* first footer */'; } }, { + name: 'second', banner() { return '/* second banner */'; }, footer: '/* second footer */' }, { + name: 'third', banner() { return Promise.resolve('/* 3rd banner */'); }, diff --git a/test/form/samples/configure-file-url/_config.js b/test/form/samples/configure-file-url/_config.js index 00694969f61..9be0556b22e 100644 --- a/test/form/samples/configure-file-url/_config.js +++ b/test/form/samples/configure-file-url/_config.js @@ -3,6 +3,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'first', resolveId(id) { if (id.endsWith('solved')) { return id; @@ -32,6 +33,7 @@ module.exports = defineTest({ } }, { + name: 'second', resolveFileUrl({ moduleId }) { if (moduleId === 'resolved') { return `'resolved'`; diff --git a/test/form/samples/custom-dynamic-import-no-interop/_config.js b/test/form/samples/custom-dynamic-import-no-interop/_config.js index 9abc9668ea0..910798c4de3 100644 --- a/test/form/samples/custom-dynamic-import-no-interop/_config.js +++ b/test/form/samples/custom-dynamic-import-no-interop/_config.js @@ -6,6 +6,7 @@ module.exports = defineTest({ interop: 'auto' }, plugins: { + name: 'test', renderDynamicImport() { return { left: 'getIt(', right: ')' }; } diff --git a/test/form/samples/dynamic-import-unresolvable/_config.js b/test/form/samples/dynamic-import-unresolvable/_config.js index 75dc777f95c..ed910b7c271 100644 --- a/test/form/samples/dynamic-import-unresolvable/_config.js +++ b/test/form/samples/dynamic-import-unresolvable/_config.js @@ -5,12 +5,15 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test', resolveDynamicImport(specifier) { if (specifier === './seven.js') { return false; } assert.ok(specifier); - assert.strictEqual(typeof specifier, 'object'); + if (typeof specifier !== 'object') { + throw new TypeError(`Unexpected specifier type ${typeof specifier}.`); + } if (specifier.type === 'Literal') { return "'./seven.js'"; } diff --git a/test/form/samples/emit-asset-file/_config.js b/test/form/samples/emit-asset-file/_config.js index d205f5d4ab7..8086990f79a 100644 --- a/test/form/samples/emit-asset-file/_config.js +++ b/test/form/samples/emit-asset-file/_config.js @@ -6,6 +6,7 @@ module.exports = defineTest({ description: 'supports emitting assets from plugin hooks', options: { plugins: { + name: 'test', resolveId(id, importee) { if (id.endsWith('.svg')) { return path.resolve(path.dirname(importee), id); @@ -26,9 +27,13 @@ module.exports = defineTest({ assert.strictEqual(keys[0], 'assets/logo-a2a2cdc4.svg'); const asset = outputBundle[keys[0]]; assert.strictEqual(asset.fileName, 'assets/logo-a2a2cdc4.svg'); - assert.strictEqual(asset.type, 'asset'); + if (asset.type !== 'asset') { + throw new Error(`Unexpected asset type ${asset.type}.`); + } + /** @type {any} */ + const source = asset.source; assert.ok( - asset.source.equals(readFileSync(path.resolve(__dirname, 'logo.svg'))), + source.equals(readFileSync(path.resolve(__dirname, 'logo.svg'))), 'asset has correct source' ); assert.ok(keys[1].endsWith('.js'), `${keys[1]} ends with ".js"`); diff --git a/test/form/samples/emit-file-tree-shaken-access/_config.js b/test/form/samples/emit-file-tree-shaken-access/_config.js index d93b3e81e1c..124940e7891 100644 --- a/test/form/samples/emit-file-tree-shaken-access/_config.js +++ b/test/form/samples/emit-file-tree-shaken-access/_config.js @@ -5,6 +5,7 @@ module.exports = defineTest({ description: 'does not include format globals when tree-shaking an asset access', options: { plugins: { + name: 'test', resolveId(id, importee) { if (id.endsWith('.svg')) { return path.resolve(path.dirname(importee), id); diff --git a/test/form/samples/emit-uint8array-no-buffer/_config.js b/test/form/samples/emit-uint8array-no-buffer/_config.js index e6eb855182c..bdce9965b94 100644 --- a/test/form/samples/emit-uint8array-no-buffer/_config.js +++ b/test/form/samples/emit-uint8array-no-buffer/_config.js @@ -10,6 +10,7 @@ module.exports = defineTest({ }, options: { plugins: { + name: 'test', resolveId(id) { if (id.startsWith('asset')) { return id; diff --git a/test/form/samples/generated-code-compact/const-bindings-false/_config.js b/test/form/samples/generated-code-compact/const-bindings-false/_config.js index 9691c14972d..0c8faf3abfe 100644 --- a/test/form/samples/generated-code-compact/const-bindings-false/_config.js +++ b/test/form/samples/generated-code-compact/const-bindings-false/_config.js @@ -14,6 +14,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', transform(code, id) { if (id.endsWith('synthetic.js')) { return { syntheticNamedExports: true }; diff --git a/test/form/samples/generated-code-compact/const-bindings-true/_config.js b/test/form/samples/generated-code-compact/const-bindings-true/_config.js index 6ca26806987..045df6feda1 100644 --- a/test/form/samples/generated-code-compact/const-bindings-true/_config.js +++ b/test/form/samples/generated-code-compact/const-bindings-true/_config.js @@ -14,6 +14,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', transform(code, id) { if (id.endsWith('synthetic.js')) { return { syntheticNamedExports: true }; diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js index f3e0a40386f..a232201d2e1 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-false/_config.js @@ -14,6 +14,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', transform() { return { syntheticNamedExports: true }; } diff --git a/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js b/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js index c887d33f211..84daa38a929 100644 --- a/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js +++ b/test/form/samples/generated-code-compact/reserved-names-as-props-true/_config.js @@ -14,6 +14,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', transform() { return { syntheticNamedExports: true }; } diff --git a/test/form/samples/generated-code-presets/es2015/_config.js b/test/form/samples/generated-code-presets/es2015/_config.js index 8e72689d33e..02b793a8e58 100644 --- a/test/form/samples/generated-code-presets/es2015/_config.js +++ b/test/form/samples/generated-code-presets/es2015/_config.js @@ -11,6 +11,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', renderStart(options) { assert.strictEqual(options.generatedCode.arrowFunctions, true); assert.strictEqual(options.generatedCode.objectShorthand, true); diff --git a/test/form/samples/generated-code-presets/es5/_config.js b/test/form/samples/generated-code-presets/es5/_config.js index 192e07d1975..c7dd1d166d6 100644 --- a/test/form/samples/generated-code-presets/es5/_config.js +++ b/test/form/samples/generated-code-presets/es5/_config.js @@ -11,6 +11,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', renderStart(options) { assert.strictEqual(options.generatedCode.arrowFunctions, false); assert.strictEqual(options.generatedCode.objectShorthand, false); diff --git a/test/form/samples/generated-code-presets/preset-with-override/_config.js b/test/form/samples/generated-code-presets/preset-with-override/_config.js index 6eb7cdd1d42..11ebdbd10fb 100644 --- a/test/form/samples/generated-code-presets/preset-with-override/_config.js +++ b/test/form/samples/generated-code-presets/preset-with-override/_config.js @@ -14,6 +14,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', renderStart(options) { assert.strictEqual(options.generatedCode.arrowFunctions, false); assert.strictEqual(options.generatedCode.objectShorthand, true); diff --git a/test/form/samples/generated-code/const-bindings-false/_config.js b/test/form/samples/generated-code/const-bindings-false/_config.js index 15ec08c7f33..edb1fc0b694 100644 --- a/test/form/samples/generated-code/const-bindings-false/_config.js +++ b/test/form/samples/generated-code/const-bindings-false/_config.js @@ -13,6 +13,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', transform(code, id) { if (id.endsWith('synthetic.js')) { return { syntheticNamedExports: true }; diff --git a/test/form/samples/generated-code/const-bindings-true/_config.js b/test/form/samples/generated-code/const-bindings-true/_config.js index 1047af6ecb8..80d9f779946 100644 --- a/test/form/samples/generated-code/const-bindings-true/_config.js +++ b/test/form/samples/generated-code/const-bindings-true/_config.js @@ -13,6 +13,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', transform(code, id) { if (id.endsWith('synthetic.js')) { return { syntheticNamedExports: true }; diff --git a/test/form/samples/generated-code/reserved-names-as-props-false/_config.js b/test/form/samples/generated-code/reserved-names-as-props-false/_config.js index aa0c9a40e22..f46f0daf878 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-false/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-false/_config.js @@ -13,6 +13,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', transform() { return { syntheticNamedExports: true }; } diff --git a/test/form/samples/generated-code/reserved-names-as-props-true/_config.js b/test/form/samples/generated-code/reserved-names-as-props-true/_config.js index a57f3100eaa..0738546f1c1 100644 --- a/test/form/samples/generated-code/reserved-names-as-props-true/_config.js +++ b/test/form/samples/generated-code/reserved-names-as-props-true/_config.js @@ -13,6 +13,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', transform() { return { syntheticNamedExports: true }; } diff --git a/test/form/samples/import-assertions/assertion-shapes/_config.js b/test/form/samples/import-assertions/assertion-shapes/_config.js index f9cabf114a2..4629f875429 100644 --- a/test/form/samples/import-assertions/assertion-shapes/_config.js +++ b/test/form/samples/import-assertions/assertion-shapes/_config.js @@ -1,6 +1,5 @@ module.exports = defineTest({ description: 'handles special shapes of assertions', - expectedWarnings: 'UNRESOLVED_IMPORT', options: { external: () => true } diff --git a/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js b/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js index 73738f45247..0d2f5af3c66 100644 --- a/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js +++ b/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js @@ -8,6 +8,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', resolveDynamicImport(specifier) { if (typeof specifier === 'object') { if (specifier.type === 'TemplateLiteral') { diff --git a/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js b/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js index 4c84b75cd60..a0ec44b6b95 100644 --- a/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js +++ b/test/form/samples/import-assertions/plugin-assertions-resolvedynamicimport/_config.js @@ -3,6 +3,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test', resolveDynamicImport(specifier, importer, { assertions }) { const resolutionOptions = { external: true, diff --git a/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js b/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js index 888ed7debaa..53b921dda4e 100644 --- a/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js +++ b/test/form/samples/import-assertions/plugin-assertions-resolveid/_config.js @@ -4,6 +4,7 @@ module.exports = defineTest({ output: { name: 'bundle' }, plugins: [ { + name: 'test', resolveId(source, importer, { assertions, isEntry }) { return { id: source, diff --git a/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js b/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js index 16f84153d22..e16ab4730a8 100644 --- a/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js +++ b/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js @@ -8,6 +8,7 @@ module.exports = defineTest({ }, plugins: [ { + name: 'test', resolveDynamicImport(specifier) { if (typeof specifier === 'object') { if (specifier.type === 'TemplateLiteral') { diff --git a/test/form/samples/interop-per-dependency-no-freeze/_config.js b/test/form/samples/interop-per-dependency-no-freeze/_config.js index 643107e326b..f020ef7820c 100644 --- a/test/form/samples/interop-per-dependency-no-freeze/_config.js +++ b/test/form/samples/interop-per-dependency-no-freeze/_config.js @@ -4,6 +4,7 @@ module.exports = defineTest({ external: id => id.startsWith('external'), output: { freeze: false, + /** @type any */ interop(id) { return id.split('-')[1]; }, diff --git a/test/form/samples/interop-per-dependency-no-live-binding/_config.js b/test/form/samples/interop-per-dependency-no-live-binding/_config.js index 902bb6f7ad2..f536266093c 100644 --- a/test/form/samples/interop-per-dependency-no-live-binding/_config.js +++ b/test/form/samples/interop-per-dependency-no-live-binding/_config.js @@ -6,6 +6,7 @@ module.exports = defineTest({ external: id => id.startsWith('external'), output: { externalLiveBindings: false, + /** @type any */ interop(id) { if (checkedIds.has(id)) { throw new Error(`Interop for id ${id} has been requested twice.`); diff --git a/test/form/samples/interop-per-dependency/_config.js b/test/form/samples/interop-per-dependency/_config.js index 5580001d100..00be3c6e95a 100644 --- a/test/form/samples/interop-per-dependency/_config.js +++ b/test/form/samples/interop-per-dependency/_config.js @@ -3,6 +3,7 @@ module.exports = defineTest({ options: { external: id => id.startsWith('external'), output: { + /** @type any*/ interop(id) { if (id === null) { return 'auto'; diff --git a/test/form/samples/interop-per-reexported-dependency/_config.js b/test/form/samples/interop-per-reexported-dependency/_config.js index 4ae0e74a974..125ced57302 100644 --- a/test/form/samples/interop-per-reexported-dependency/_config.js +++ b/test/form/samples/interop-per-reexported-dependency/_config.js @@ -3,6 +3,7 @@ module.exports = defineTest({ options: { external: id => id.startsWith('external'), output: { + /** @type any */ interop(id) { return id.split('-')[1]; }, diff --git a/test/form/samples/intro-and-outro/_config.js b/test/form/samples/intro-and-outro/_config.js index f617693382b..467a7697513 100644 --- a/test/form/samples/intro-and-outro/_config.js +++ b/test/form/samples/intro-and-outro/_config.js @@ -10,6 +10,7 @@ module.exports = defineTest({ external: ['external'], plugins: [ { + name: 'first', intro() { return '// intro 1'; }, @@ -18,6 +19,7 @@ module.exports = defineTest({ } }, { + name: 'second', intro() { return '// intro 2'; }, @@ -26,6 +28,7 @@ module.exports = defineTest({ } }, { + name: 'third', intro() { return Promise.resolve('// intro 3'); }, @@ -34,6 +37,7 @@ module.exports = defineTest({ } }, { + name: 'fourth', intro: '// intro 4', outro: '// outro 4' } diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js index d199f6d5e55..a2498b029a7 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-false/_config.js @@ -19,6 +19,7 @@ module.exports = defineTest({ return true; }, plugins: { + name: 'test', async buildStart() { // eslint-disable-next-line unicorn/consistent-function-scoping const testExternal = async (source, expected) => diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js index 0271b599d0a..5d7df6077a3 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-relative/_config.js @@ -22,6 +22,7 @@ module.exports = defineTest({ return true; }, plugins: { + name: 'test', async buildStart() { // eslint-disable-next-line unicorn/consistent-function-scoping const testExternal = async (source, expected) => diff --git a/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js b/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js index 9330d558d34..29807ce3c2d 100644 --- a/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js +++ b/test/form/samples/make-absolute-externals-relative/make-relative-true/_config.js @@ -21,6 +21,7 @@ module.exports = defineTest({ return true; }, plugins: { + name: 'test', async buildStart() { // eslint-disable-next-line unicorn/consistent-function-scoping const testExternal = async (source, expected) => diff --git a/test/form/samples/merge-namespaces/_config.js b/test/form/samples/merge-namespaces/_config.js index 10ae05024a4..be3a1da6d64 100644 --- a/test/form/samples/merge-namespaces/_config.js +++ b/test/form/samples/merge-namespaces/_config.js @@ -4,6 +4,7 @@ module.exports = defineTest({ external: ['external1', 'external2'], plugins: [ { + name: 'test', transform() { return { syntheticNamedExports: '__synthetic' }; } diff --git a/test/form/samples/supports-es6-shim/_config.js b/test/form/samples/supports-es6-shim/_config.js index e73f67d6336..442c76aefa0 100644 --- a/test/form/samples/supports-es6-shim/_config.js +++ b/test/form/samples/supports-es6-shim/_config.js @@ -10,7 +10,7 @@ module.exports = defineTest({ treeshake: true, plugins: [ require('@rollup/plugin-node-resolve').default(), - require('@rollup/plugin-commonjs')() + require('@rollup/plugin-commonjs').default() ] } }); diff --git a/test/form/samples/synthetic-named-exports/_config.js b/test/form/samples/synthetic-named-exports/_config.js index 33c5d5f4372..4d1cd1073d4 100644 --- a/test/form/samples/synthetic-named-exports/_config.js +++ b/test/form/samples/synthetic-named-exports/_config.js @@ -3,6 +3,7 @@ module.exports = defineTest({ options: { plugins: [ { + name: 'test', resolveId(id) { if (id.endsWith('dep1.js')) { return id; diff --git a/test/form/samples/system-reexports/_config.js b/test/form/samples/system-reexports/_config.js index 5e583550e02..589a68d7d3e 100644 --- a/test/form/samples/system-reexports/_config.js +++ b/test/form/samples/system-reexports/_config.js @@ -1,7 +1,7 @@ module.exports = defineTest({ description: 'merges reexports in systemjs', options: { - external: true, + external: () => true, output: { format: 'system' } } }); diff --git a/test/form/samples/treeshake-json/_config.js b/test/form/samples/treeshake-json/_config.js index 13cfc1b2f16..5adc22a8df2 100644 --- a/test/form/samples/treeshake-json/_config.js +++ b/test/form/samples/treeshake-json/_config.js @@ -1,4 +1,4 @@ -const json = require('@rollup/plugin-json'); +const json = require('@rollup/plugin-json').default; module.exports = defineTest({ description: 'removes unusued json keys', diff --git a/test/form/samples/treeshake-presets/preset-with-override/_config.js b/test/form/samples/treeshake-presets/preset-with-override/_config.js index 6f4d613ee31..b1741c8afba 100644 --- a/test/form/samples/treeshake-presets/preset-with-override/_config.js +++ b/test/form/samples/treeshake-presets/preset-with-override/_config.js @@ -12,12 +12,15 @@ module.exports = defineTest({ { name: 'test-plugin', buildStart(options) { + if (!options.treeshake) { + throw new Error('Treeshaking options not found'); + } assert.strictEqual(options.treeshake.correctVarValueBeforeDeclaration, false); assert.strictEqual(options.treeshake.propertyReadSideEffects, false); assert.strictEqual(options.treeshake.tryCatchDeoptimization, false); assert.strictEqual(options.treeshake.unknownGlobalSideEffects, true); assert.strictEqual( - options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js')), + options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js'), false), false ); } diff --git a/test/form/samples/treeshake-presets/recommended/_config.js b/test/form/samples/treeshake-presets/recommended/_config.js index 60187f4b51c..c55983ad497 100644 --- a/test/form/samples/treeshake-presets/recommended/_config.js +++ b/test/form/samples/treeshake-presets/recommended/_config.js @@ -9,12 +9,15 @@ module.exports = defineTest({ { name: 'test-plugin', buildStart(options) { + if (!options.treeshake) { + throw new Error('Treeshaking options not found'); + } assert.strictEqual(options.treeshake.correctVarValueBeforeDeclaration, false); assert.strictEqual(options.treeshake.propertyReadSideEffects, true); assert.strictEqual(options.treeshake.tryCatchDeoptimization, true); assert.strictEqual(options.treeshake.unknownGlobalSideEffects, false); assert.strictEqual( - options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js')), + options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js'), false), true ); } diff --git a/test/form/samples/treeshake-presets/safest/_config.js b/test/form/samples/treeshake-presets/safest/_config.js index ed4947c81dc..050200d282a 100644 --- a/test/form/samples/treeshake-presets/safest/_config.js +++ b/test/form/samples/treeshake-presets/safest/_config.js @@ -7,13 +7,17 @@ module.exports = defineTest({ treeshake: 'safest', plugins: [ { + name: 'test', buildStart(options) { + if (!options.treeshake) { + throw new Error('Treeshaking options not found'); + } assert.strictEqual(options.treeshake.correctVarValueBeforeDeclaration, true); assert.strictEqual(options.treeshake.propertyReadSideEffects, true); assert.strictEqual(options.treeshake.tryCatchDeoptimization, true); assert.strictEqual(options.treeshake.unknownGlobalSideEffects, true); assert.strictEqual( - options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js')), + options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js'), false), true ); } diff --git a/test/form/samples/treeshake-presets/smallest/_config.js b/test/form/samples/treeshake-presets/smallest/_config.js index 37dbfe9a84e..67519625a65 100644 --- a/test/form/samples/treeshake-presets/smallest/_config.js +++ b/test/form/samples/treeshake-presets/smallest/_config.js @@ -7,13 +7,17 @@ module.exports = defineTest({ treeshake: 'smallest', plugins: [ { + name: 'test', buildStart(options) { + if (!options.treeshake) { + throw new Error('Treeshaking options not found'); + } assert.strictEqual(options.treeshake.correctVarValueBeforeDeclaration, false); assert.strictEqual(options.treeshake.propertyReadSideEffects, false); assert.strictEqual(options.treeshake.tryCatchDeoptimization, false); assert.strictEqual(options.treeshake.unknownGlobalSideEffects, false); assert.strictEqual( - options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js')), + options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js'), false), false ); } diff --git a/test/form/samples/treeshake-presets/true/_config.js b/test/form/samples/treeshake-presets/true/_config.js index 70d94cb5057..dbdb5fd849a 100644 --- a/test/form/samples/treeshake-presets/true/_config.js +++ b/test/form/samples/treeshake-presets/true/_config.js @@ -7,13 +7,17 @@ module.exports = defineTest({ treeshake: true, plugins: [ { + name: 'test', buildStart(options) { + if (!options.treeshake) { + throw new Error('Treeshaking is not enabled'); + } assert.strictEqual(options.treeshake.correctVarValueBeforeDeclaration, false); assert.strictEqual(options.treeshake.propertyReadSideEffects, true); assert.strictEqual(options.treeshake.tryCatchDeoptimization, true); assert.strictEqual(options.treeshake.unknownGlobalSideEffects, true); assert.strictEqual( - options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js')), + options.treeshake.moduleSideEffects(path.join(__dirname, 'dep.js'), false), true ); } diff --git a/test/tsconfig.base.json b/test/tsconfig.base.json index 0990bc018d8..cc0447936af 100644 --- a/test/tsconfig.base.json +++ b/test/tsconfig.base.json @@ -1,18 +1,15 @@ { - "compilerOptions": { - // enable this to capture type errors, or add @ts-check to the top of the file - // "checkJs": true, - "allowJs": true, - "composite": true, - "target": "esnext", - "module": "node16", - "noEmit": true, - "lib": ["esnext"], - "esModuleInterop": true, - "moduleResolution": "node", - "types": [ - "node", - "mocha" - ], - } + "compilerOptions": { + // enable this to capture type errors, or add @ts-check to the top of the file + // "checkJs": true, + "allowJs": true, + "composite": true, + "target": "esnext", + "module": "node16", + "noEmit": true, + "lib": ["esnext"], + "esModuleInterop": true, + "moduleResolution": "node", + "types": ["node", "mocha"] + } } diff --git a/test/types.d.ts b/test/types.d.ts index 8ef821bf35a..1a8a28cbdb6 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -62,7 +62,7 @@ export interface TestConfigBase { /** * Expected warning codes */ - expectedWarnings?: string[]; + expectedWarnings?: string | string[]; /** * Test the output of the build. */ From 9db29e0d02ed94d199429d9276f64be04dcfc2eb Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Sun, 30 Apr 2023 19:23:35 +0200 Subject: [PATCH 15/15] Use correct properties per test type --- test/browser/define.d.ts | 4 +- test/browser/index.js | 101 ++++---- test/chunking-form/index.js | 99 ++++---- .../empty-module-no-treeshake/_config.js | 1 + test/cli/index.js | 8 +- .../cli/samples/config-type-module/_config.js | 1 + test/file-hashes/index.js | 2 + test/form/index.js | 138 +++++----- test/form/samples/addon-functions/_config.js | 1 + .../keep-dynamic-assertions/_config.js | 2 +- .../keeps-static-assertions/_config.js | 2 +- .../removes-dynamic-assertions/_config.js | 2 +- .../removes-static-assertions/_config.js | 2 +- test/function/index.js | 15 +- .../_config.js | 3 +- .../main.js | 1 + test/sourcemaps/index.js | 40 +-- .../main.js | 1 - test/types.d.ts | 236 +++++++++++++----- 19 files changed, 406 insertions(+), 253 deletions(-) rename test/{sourcemaps => function}/samples/transform-without-sourcemap-render-chunk/_config.js (95%) create mode 100644 test/function/samples/transform-without-sourcemap-render-chunk/main.js delete mode 100644 test/sourcemaps/samples/transform-without-sourcemap-render-chunk/main.js diff --git a/test/browser/define.d.ts b/test/browser/define.d.ts index 1e9efb55b8a..1fde8f77e5e 100644 --- a/test/browser/define.d.ts +++ b/test/browser/define.d.ts @@ -1,5 +1,5 @@ -import type { TestConfigBase } from '../types'; +import type { TestConfigBrowser } from '../types'; declare global { - function defineTest(config: TestConfigBase): TestConfigBase; + function defineTest(config: TestConfigBrowser): TestConfigBrowser; } diff --git a/test/browser/index.js b/test/browser/index.js index f018571a648..2167a4210a9 100644 --- a/test/browser/index.js +++ b/test/browser/index.js @@ -13,58 +13,65 @@ const fixturify = require('fixturify'); const { rollup } = require('../../browser/dist/rollup.browser.js'); const { assertFilesAreEqual, runTestSuiteWithSamples, compareError } = require('../utils.js'); -runTestSuiteWithSamples('browser', resolve(__dirname, 'samples'), (directory, config) => { - (config.skip ? it.skip : config.solo ? it.only : it)( - basename(directory) + ': ' + config.description, - async () => { - let bundle; - try { - bundle = await rollup({ - input: 'main', - onwarn: warning => { - if (!(config.expectedWarnings && config.expectedWarnings.includes(warning.code))) { - throw new Error( - `Unexpected warnings (${warning.code}): ${warning.message}\n` + - 'If you expect warnings, list their codes in config.expectedWarnings' - ); - } - }, - strictDeprecations: true, - ...config.options - }); - } catch (error) { +runTestSuiteWithSamples( + 'browser', + resolve(__dirname, 'samples'), + /** + * @param {import('../types').TestConfigBrowser} config + */ + (directory, config) => { + (config.skip ? it.skip : config.solo ? it.only : it)( + basename(directory) + ': ' + config.description, + async () => { + let bundle; + try { + bundle = await rollup({ + input: 'main', + onwarn: warning => { + if (!(config.expectedWarnings && config.expectedWarnings.includes(warning.code))) { + throw new Error( + `Unexpected warnings (${warning.code}): ${warning.message}\n` + + 'If you expect warnings, list their codes in config.expectedWarnings' + ); + } + }, + strictDeprecations: true, + ...config.options + }); + } catch (error) { + if (config.error) { + compareError(error, config.error); + return; + } else { + throw error; + } + } if (config.error) { - compareError(error, config.error); - return; - } else { - throw error; + throw new Error('Expected an error while rolling up'); + } + let output; + try { + ({ output } = await bundle.generate({ + exports: 'auto', + format: 'es', + ...(config.options || {}).output + })); + } catch (error) { + if (config.generateError) { + compareError(error, config.generateError); + return; + } else { + throw error; + } } - } - if (config.error) { - throw new Error('Expected an error while rolling up'); - } - let output; - try { - ({ output } = await bundle.generate({ - exports: 'auto', - format: 'es', - ...(config.options || {}).output - })); - } catch (error) { if (config.generateError) { - compareError(error, config.generateError); - return; - } else { - throw error; + throw new Error('Expected an error while generating output'); } + assertOutputMatches(output, directory); } - if (config.generateError) { - throw new Error('Expected an error while generating output'); - } - assertOutputMatches(output, directory); - } - ); -}); + ); + } +); function assertOutputMatches(output, directory) { /** @type any */ diff --git a/test/chunking-form/index.js b/test/chunking-form/index.js index f0dd86fcd40..d26628eef97 100644 --- a/test/chunking-form/index.js +++ b/test/chunking-form/index.js @@ -8,55 +8,64 @@ const { runTestSuiteWithSamples, assertDirectoriesAreEqual } = require('../utils const FORMATS = ['es', 'cjs', 'amd', 'system']; -runTestSuiteWithSamples('chunking form', resolve(__dirname, 'samples'), (directory, config) => { - (config.skip ? describe.skip : config.solo ? describe.only : describe)( - basename(directory) + ': ' + config.description, - () => { - let bundle; +runTestSuiteWithSamples( + 'chunking form', + resolve(__dirname, 'samples'), + /** + * @param {import('../types').TestConfigChunkingForm} config + */ + (directory, config) => { + (config.skip ? describe.skip : config.solo ? describe.only : describe)( + basename(directory) + ': ' + config.description, + async () => { + let bundle; - if (config.before) { - before(config.before); - } - if (config.after) { - after(config.after); - } + if (config.before) { + await before(config.before); + } + if (config.after) { + await after(config.after); + } - for (const format of FORMATS) { - it('generates ' + format, async () => { - chdir(directory); - bundle = - bundle || - (await rollup({ - input: [directory + '/main.js'], - onwarn: warning => { - if (!(config.expectedWarnings && config.expectedWarnings.includes(warning.code))) { - throw new Error( - `Unexpected warnings (${warning.code}): ${warning.message}\n` + - 'If you expect warnings, list their codes in config.expectedWarnings' - ); - } + for (const format of FORMATS) { + it('generates ' + format, async () => { + chdir(directory); + bundle = + bundle || + (await rollup({ + input: [directory + '/main.js'], + onwarn: warning => { + if ( + !(config.expectedWarnings && config.expectedWarnings.includes(warning.code)) + ) { + throw new Error( + `Unexpected warnings (${warning.code}): ${warning.message}\n` + + 'If you expect warnings, list their codes in config.expectedWarnings' + ); + } + }, + strictDeprecations: true, + ...config.options + })); + await generateAndTestBundle( + bundle, + { + dir: `${directory}/_actual/${format}`, + exports: 'auto', + format, + chunkFileNames: 'generated-[name].js', + validate: true, + ...(config.options || {}).output }, - strictDeprecations: true, - ...config.options - })); - await generateAndTestBundle( - bundle, - { - dir: `${directory}/_actual/${format}`, - exports: 'auto', - format, - chunkFileNames: 'generated-[name].js', - validate: true, - ...(config.options || {}).output - }, - `${directory}/_expected/${format}`, - config - ); - }); + `${directory}/_expected/${format}`, + config + ); + }); + } } - } - ); -}); + ); + } +); async function generateAndTestBundle(bundle, outputOptions, expectedDirectory, config) { await bundle.write({ diff --git a/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js b/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js index 3fa8b308782..bd12a97ad57 100644 --- a/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js +++ b/test/chunking-form/samples/deprecated/empty-module-no-treeshake/_config.js @@ -1,5 +1,6 @@ const assert = require('node:assert'); const path = require('node:path'); +// @ts-expect-error not included in types const { getObject } = require('../../../../utils'); module.exports = defineTest({ diff --git a/test/cli/index.js b/test/cli/index.js index 02f667cabde..d287bfd3684 100644 --- a/test/cli/index.js +++ b/test/cli/index.js @@ -57,8 +57,10 @@ async function runTest(config, command) { env: { ...process.env, FORCE_COLOR: '0', ...config.env }, killSignal: 'SIGKILL' }, - (error, code, stderr) => { - if (config.after) config.after(error, code, stderr); + async (error, code, stderr) => { + if (config.after) { + await config.after(error, code, stderr); + } if (error && !error.killed) { if (config.error) { if (!config.error(error)) { @@ -94,7 +96,7 @@ async function runTest(config, command) { } if (config.exports) { - config.exports(module.exports); + await config.exports(module.exports); } } catch (error) { if (config.error) { diff --git a/test/cli/samples/config-type-module/_config.js b/test/cli/samples/config-type-module/_config.js index f586b2ac67f..772593d9d2a 100644 --- a/test/cli/samples/config-type-module/_config.js +++ b/test/cli/samples/config-type-module/_config.js @@ -1,3 +1,4 @@ +// @ts-expect-error not included in types const { assertIncludes } = require('../../../utils.js'); module.exports = defineTest({ diff --git a/test/file-hashes/index.js b/test/file-hashes/index.js index 74e5ed61446..360b6396cfb 100644 --- a/test/file-hashes/index.js +++ b/test/file-hashes/index.js @@ -2,7 +2,9 @@ const path = require('node:path'); /** * @type {import('../../src/rollup/types')} Rollup */ +// @ts-expect-error not included in types const rollup = require('../../dist/rollup'); +// @ts-expect-error not included in types const { runTestSuiteWithSamples } = require('../utils.js'); runTestSuiteWithSamples( diff --git a/test/form/index.js b/test/form/index.js index 1761eb74b56..e45c7e1aa90 100644 --- a/test/form/index.js +++ b/test/form/index.js @@ -4,78 +4,92 @@ const { basename, resolve } = require('node:path'); /** * @type {import('../../src/rollup/types')} Rollup */ +// @ts-expect-error not included in types const { rollup } = require('../../dist/rollup'); const { normaliseOutput, runTestSuiteWithSamples } = require('../utils.js'); const FORMATS = ['amd', 'cjs', 'system', 'es', 'iife', 'umd']; -runTestSuiteWithSamples('form', resolve(__dirname, 'samples'), (directory, config) => { - const isSingleFormatTest = existsSync(directory + '/_expected.js'); - const itOrDescribe = isSingleFormatTest ? it : describe; - (config.skip ? itOrDescribe.skip : config.solo ? itOrDescribe.only : itOrDescribe)( - basename(directory) + ': ' + config.description, - () => { - let bundle; - const runRollupTest = async (inputFile, bundleFile, defaultFormat) => { - const warnings = []; - if (config.before) config.before(); - try { - process.chdir(directory); - bundle = - bundle || - (await rollup({ - input: directory + '/main.js', - onwarn: warning => { - if (!(config.expectedWarnings && config.expectedWarnings.includes(warning.code))) { - warnings.push(warning); - } +runTestSuiteWithSamples( + 'form', + resolve(__dirname, 'samples'), + /** + * @param {import('../types').TestConfigForm} config + */ + (directory, config) => { + const isSingleFormatTest = existsSync(directory + '/_expected.js'); + const itOrDescribe = isSingleFormatTest ? it : describe; + (config.skip ? itOrDescribe.skip : config.solo ? itOrDescribe.only : itOrDescribe)( + basename(directory) + ': ' + config.description, + () => { + let bundle; + const runRollupTest = async (inputFile, bundleFile, defaultFormat) => { + const warnings = []; + if (config.before) { + await config.before(); + } + try { + process.chdir(directory); + bundle = + bundle || + (await rollup({ + input: directory + '/main.js', + onwarn: warning => { + if ( + !(config.expectedWarnings && config.expectedWarnings.includes(warning.code)) + ) { + warnings.push(warning); + } + }, + strictDeprecations: true, + ...config.options + })); + await generateAndTestBundle( + bundle, + { + exports: 'auto', + file: inputFile, + format: defaultFormat, + validate: true, + ...(config.options || {}).output }, - strictDeprecations: true, - ...config.options - })); - await generateAndTestBundle( - bundle, - { - exports: 'auto', - file: inputFile, - format: defaultFormat, - validate: true, - ...(config.options || {}).output - }, - bundleFile, - config - ); - } finally { - if (config.after) config.after(); - } - if (warnings.length > 0) { - const codes = new Set(); - for (const { code } of warnings) { - codes.add(code); + bundleFile, + config + ); + } finally { + if (config.after) { + await config.after(); + } } - throw new Error( - `Unexpected warnings (${[...codes].join(', ')}): \n${warnings - .map(({ message }) => `${message}\n\n`) - .join('')}` + 'If you expect warnings, list their codes in config.expectedWarnings' - ); + if (warnings.length > 0) { + const codes = new Set(); + for (const { code } of warnings) { + codes.add(code); + } + throw new Error( + `Unexpected warnings (${[...codes].join(', ')}): \n${warnings + .map(({ message }) => `${message}\n\n`) + .join('')}` + 'If you expect warnings, list their codes in config.expectedWarnings' + ); + } + }; + + if (isSingleFormatTest) { + return runRollupTest(directory + '/_actual.js', directory + '/_expected.js', 'es'); } - }; - if (isSingleFormatTest) { - return runRollupTest(directory + '/_actual.js', directory + '/_expected.js', 'es'); + for (const format of config.formats || FORMATS) + it('generates ' + format, () => + runRollupTest( + directory + '/_actual/' + format + '.js', + directory + '/_expected/' + format + '.js', + format + ) + ); } - - for (const format of config.formats || FORMATS) - it('generates ' + format, () => - runRollupTest( - directory + '/_actual/' + format + '.js', - directory + '/_expected/' + format + '.js', - format - ) - ); - } - ); -}); + ); + } +); async function generateAndTestBundle(bundle, outputOptions, expectedFile, { show }) { await bundle.write(outputOptions); diff --git a/test/form/samples/addon-functions/_config.js b/test/form/samples/addon-functions/_config.js index b7c5b899b3b..3379a2debf8 100644 --- a/test/form/samples/addon-functions/_config.js +++ b/test/form/samples/addon-functions/_config.js @@ -1,4 +1,5 @@ const assert = require('node:assert'); +// @ts-expect-error not included in types const { replaceDirectoryInStringifiedObject } = require('../../../utils'); const assertChunkData = chunk => assert.strictEqual( diff --git a/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js b/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js index 0d2f5af3c66..6cd9a15555a 100644 --- a/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js +++ b/test/form/samples/import-assertions/keep-dynamic-assertions/_config.js @@ -1,6 +1,6 @@ module.exports = defineTest({ description: 'keep import assertions for dynamic imports', - expectedWarnings: 'UNRESOLVED_IMPORT', + expectedWarnings: ['UNRESOLVED_IMPORT'], options: { external: id => { if (id === 'unresolved') return null; diff --git a/test/form/samples/import-assertions/keeps-static-assertions/_config.js b/test/form/samples/import-assertions/keeps-static-assertions/_config.js index 8780ad60a25..5dfbc1b2c0e 100644 --- a/test/form/samples/import-assertions/keeps-static-assertions/_config.js +++ b/test/form/samples/import-assertions/keeps-static-assertions/_config.js @@ -1,6 +1,6 @@ module.exports = defineTest({ description: 'keeps any import assertions on input', - expectedWarnings: 'UNRESOLVED_IMPORT', + expectedWarnings: ['UNRESOLVED_IMPORT'], options: { external: id => { if (id === 'unresolved') return null; diff --git a/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js b/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js index e16ab4730a8..5330ee734d0 100644 --- a/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js +++ b/test/form/samples/import-assertions/removes-dynamic-assertions/_config.js @@ -1,6 +1,6 @@ module.exports = defineTest({ description: 'keep import assertions for dynamic imports', - expectedWarnings: 'UNRESOLVED_IMPORT', + expectedWarnings: ['UNRESOLVED_IMPORT'], options: { external: id => { if (id === 'unresolved') return null; diff --git a/test/form/samples/import-assertions/removes-static-assertions/_config.js b/test/form/samples/import-assertions/removes-static-assertions/_config.js index e48102f7749..8f8d7c07fd6 100644 --- a/test/form/samples/import-assertions/removes-static-assertions/_config.js +++ b/test/form/samples/import-assertions/removes-static-assertions/_config.js @@ -1,6 +1,6 @@ module.exports = defineTest({ description: 'keeps any import assertions on input', - expectedWarnings: 'UNRESOLVED_IMPORT', + expectedWarnings: ['UNRESOLVED_IMPORT'], options: { external: id => { if (id === 'unresolved') return null; diff --git a/test/function/index.js b/test/function/index.js index 56c8e81269d..80995398251 100644 --- a/test/function/index.js +++ b/test/function/index.js @@ -3,6 +3,7 @@ const path = require('node:path'); /** * @type {import('../../src/rollup/types')} Rollup */ +// @ts-expect-error not included in types const rollup = require('../../dist/rollup'); const { compareError, compareWarnings, runTestSuiteWithSamples } = require('../utils.js'); @@ -58,9 +59,11 @@ runTestSuiteWithSamples( (directory, config) => { (config.skip ? it.skip : config.solo ? it.only : it)( path.basename(directory) + ': ' + config.description, - () => { + async () => { if (config.show) console.group(path.basename(directory)); - if (config.before) config.before(); + if (config.before) { + await config.before(); + } process.chdir(directory); const warnings = []; @@ -173,7 +176,9 @@ runTestSuiteWithSamples( } if (config.show) console.groupEnd(); if (unintendedError) throw unintendedError; - if (config.after) config.after(); + if (config.after) { + return config.after(); + } }); }); }) @@ -183,7 +188,9 @@ runTestSuiteWithSamples( } else { throw error; } - if (config.after) config.after(); + if (config.after) { + return config.after(); + } }); } ); diff --git a/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js b/test/function/samples/transform-without-sourcemap-render-chunk/_config.js similarity index 95% rename from test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js rename to test/function/samples/transform-without-sourcemap-render-chunk/_config.js index 11336d4d5cf..46076d52430 100644 --- a/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/_config.js +++ b/test/function/samples/transform-without-sourcemap-render-chunk/_config.js @@ -17,7 +17,8 @@ module.exports = defineTest({ return { code, map: null }; } } - ] + ], + output: { sourcemap: true } }, warnings: [ { diff --git a/test/function/samples/transform-without-sourcemap-render-chunk/main.js b/test/function/samples/transform-without-sourcemap-render-chunk/main.js new file mode 100644 index 00000000000..69305ae375a --- /dev/null +++ b/test/function/samples/transform-without-sourcemap-render-chunk/main.js @@ -0,0 +1 @@ +assert.strictEqual(42, 42); diff --git a/test/sourcemaps/index.js b/test/sourcemaps/index.js index ece3af688f2..8e49fea4797 100644 --- a/test/sourcemaps/index.js +++ b/test/sourcemaps/index.js @@ -2,7 +2,9 @@ const path = require('node:path'); /** * @type {import('../../src/rollup/types')} Rollup */ +// @ts-expect-error not included in types const rollup = require('../../dist/rollup'); +// @ts-expect-error not included in types const { compareWarnings, runTestSuiteWithSamples } = require('../utils.js'); const FORMATS = ['amd', 'cjs', 'system', 'es', 'iife', 'umd']; @@ -10,11 +12,14 @@ const FORMATS = ['amd', 'cjs', 'system', 'es', 'iife', 'umd']; runTestSuiteWithSamples( 'sourcemaps', path.resolve(__dirname, 'samples'), - (directory, configuration) => { - (configuration.skip ? describe.skip : configuration.solo ? describe.only : describe)( - path.basename(directory) + ': ' + configuration.description, + /** + * @param {import('../types').TestConfigSourcemap} config + */ + (directory, config) => { + (config.skip ? describe.skip : config.solo ? describe.only : describe)( + path.basename(directory) + ': ' + config.description, () => { - for (const format of configuration.formats || FORMATS) { + for (const format of config.formats || FORMATS) { it('generates ' + format, async () => { process.chdir(directory); const warnings = []; @@ -22,25 +27,25 @@ runTestSuiteWithSamples( input: directory + '/main.js', onwarn: warning => warnings.push(warning), strictDeprecations: true, - ...configuration.options + ...config.options }; const outputOptions = { exports: 'auto', file: directory + '/_actual/bundle.' + format + '.js', format, sourcemap: true, - ...(configuration.options || {}).output + ...(config.options || {}).output }; let bundle = await rollup.rollup(inputOptions); - await generateAndTestBundle(bundle, outputOptions, configuration, format, warnings); + await generateAndTestBundle(bundle, outputOptions, config, format, warnings); // cache rebuild does not reemit warnings. - if (configuration.warnings) { + if (config.warnings) { return; } // test cache noop rebuild bundle = await rollup.rollup({ cache: bundle, ...inputOptions }); - await generateAndTestBundle(bundle, outputOptions, configuration, format, warnings); + await generateAndTestBundle(bundle, outputOptions, config, format, warnings); }); } } @@ -48,17 +53,14 @@ runTestSuiteWithSamples( } ); -async function generateAndTestBundle(bundle, outputOptions, configuration, format, warnings) { - await bundle.write(outputOptions); - if (configuration.warnings) { - compareWarnings(warnings, configuration.warnings); +async function generateAndTestBundle(bundle, outputOptions, config, format, warnings) { + if (config.warnings) { + compareWarnings(warnings, config.warnings); } else if (warnings.length > 0) { throw new Error(`Unexpected warnings`); } - if (configuration.test) { - const { - output: [{ code, map, fileName }] - } = await bundle.generate(outputOptions); - await configuration.test(code, map, { fileName, format }); - } + const { + output: [{ code, map, fileName }] + } = await bundle.generate(outputOptions); + await config.test(code, map, { fileName, format }); } diff --git a/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/main.js b/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/main.js deleted file mode 100644 index 5c72ff35124..00000000000 --- a/test/sourcemaps/samples/transform-without-sourcemap-render-chunk/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log( 42 ); diff --git a/test/types.d.ts b/test/types.d.ts index 1a8a28cbdb6..d9d31b6f4dd 100644 --- a/test/types.d.ts +++ b/test/types.d.ts @@ -1,127 +1,233 @@ -/* eslint-disable @typescript-eslint/member-ordering */ import type { SourceMap } from 'magic-string'; import type { RollupBuild, RollupError, RollupOptions } from '../src/rollup/types'; export interface TestConfigBase { /** - * Only run this test. Should never be committed. + * Description of the test. Determines the name of the test in the test + * runner. */ - solo?: boolean; + description: string; + /** + * Only run this test if the major Node version is high enough. + */ + minNodeVersion?: number; + /** + * Only run this test on Windows. + */ + onlyWindows?: boolean; /** * Skip this test. */ skip?: boolean; /** - * Display in the test output. + * Do not run this test on Windows. */ - show?: boolean; + skipIfWindows?: boolean; /** - * Execute the bundled code. + * Only run this test. Should never be committed. */ - execute?: boolean; + solo?: boolean; +} +export interface TestConfigBrowser extends TestConfigBase { /** - * Description of the test. + * Expected error when running rollup.rollup() */ - description: string; + error?: RollupError; /** - * Rollup options + * Expected warning codes. Any of these warnings will not cause the test to + * fail. + */ + expectedWarnings?: string[]; + /** + * Expected error when running bundle.generate(). + */ + generateError?: RollupError; + /** + * Rollup options for bundling. */ options?: RollupOptions; +} + +export interface TestConfigChunkingForm extends TestConfigBase { /** - * Bundle formats to test. + * Called after the test is run. */ - formats?: string[]; + after?: () => void | Promise; /** - * The global context executed the bundled code. + * Called before the test is run. */ - context?: Record; + before?: () => void | Promise; /** - * The directory to run the test in. + * Expected warning codes. Any of these warnings will not cause the test to + * fail. + */ + expectedWarnings?: string[]; + /** + * The directory to bundle the code in. */ nestedDir?: string; + /** + * Rollup options for bundling. + */ + options?: RollupOptions; + /** + * Execute the AMD module. + */ + runAmd?: + | boolean + | { + exports?: (exportObject: any) => void | Promise; + }; +} +export interface TestConfigCli extends TestConfigBase { /** - * Called before the test is run. + * Assert the stderr stream, return true to abort the test. */ - before?: () => void | Promise; + abortOnStderr?: (data: string) => boolean | void | Promise; /** * Called after the test is run. */ - after?: () => void | Promise; - + after?: (error: Error | null, stdout: string, stderr: string) => void | Promise; /** - * Test the expected error. + * Called before the test is run. */ - error?: RollupError; - generateError?: RollupError; + before?: () => void | Promise; + command?: string; + cwd?: string; /** - * Test the expected warnings. + * Environment variables to set for the test. */ - warnings?: RollupError[] | ((warnings: RollupError[]) => boolean | void); + env?: Record; /** - * Expected warning codes + * Test the expected error. Assertions about the test output will only + * be performed afterward if you return "true" or do not supply this option. */ - expectedWarnings?: string | string[]; + error?: (error: RollupError) => boolean | void; /** - * Test the output of the build. + * Execute the bundled code. */ - test?: (code: string, map: SourceMap) => void | Promise; + execute?: boolean; /** - * Assetions for the exports of the bundle. + * Run assertions against the exports of the bundle after executing it. */ exports?: (exportObject: any) => void | Promise; - - skipIfWindows?: boolean; - onlyWindows?: boolean; - minNodeVersion?: string; + /** + * Run assertions against the generated code when bundling to stdout. + */ + result?: (code: string) => void; + retry?: number; + /** + * Display generated output in console. + */ + show?: boolean; + /** + * Assert the stderr of the build. Assertions about the test output will only + * be performed afterward if you return "true" or do not supply this option. + */ + stderr?: (stderr: string) => boolean | undefined; + /** + * Run assertions after the command has finished. + */ + test?: () => void; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface TestConfigForm extends TestConfigBase {} -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface TestConfigSourcemap extends TestConfigBase {} - export interface TestConfigFileHash extends TestConfigBase { - options1?: RollupOptions; - options2?: RollupOptions; + options1: RollupOptions; + options2: RollupOptions; } -export interface TestConfigCli extends TestConfigBase { - command?: string; - cwd?: string; - retry?: number; +export interface TestConfigForm extends TestConfigBase { /** - * Environment variables to set for the test. + * Called after the test is run. */ - env?: Record; + after?: () => void | Promise; /** - * Assert the stderr of the build. + * Called before the test is run. */ - stderr?: (stderr: string) => void | Promise; + before?: () => void | Promise; /** - * Assert the stderr stream, return true to abort the test. + * Expected warning codes. Any of these warnings will not cause the test to + * fail. */ - abortOnStderr?: (data: string) => boolean | void | Promise; - - result?: (code: string) => void; -} - -export interface TestConfigChunkingForm extends TestConfigBase { + expectedWarnings?: string[]; /** - * Execute the AMD module. + * Output formats to test. */ - runAmd?: - | boolean - | { - exports?: (exportObject: any) => void | Promise; - }; + formats?: string[]; + /** + * Rollup options for bundling. + */ + options?: RollupOptions; } export interface TestConfigFunction extends TestConfigBase { - runtimeError?(error: Error): void; - bundle?(bundle: RollupBuild): void; - code?(code: string): void; + /** + * Called after the test is run. + */ + after?: () => void | Promise; + /** + * Called before the test is run. + */ + before?: () => void | Promise; + /** + * Make assertions against the generated Rollup output object. + */ + bundle?: (bundle: RollupBuild) => void | Promise; + /** + * Make assertions against the generated code. + */ + code?: (code: string | Record) => void; + /** + * The global context executed the bundled code. + */ + context?: Record; + /** + * Expected error when running rollup.rollup() + */ + error?: RollupError; + /** + * Assetions for the exports of the bundle. + */ + exports?: (exportObject: any) => void | Promise; + /** + * Expected error when running bundle.generate(). + */ + generateError?: RollupError; + /** + * Make assertions against an expected runtime error. + */ + runtimeError?: (error: Error) => void; + /** + * Display generated output in console. + */ + show?: boolean; + /** + * Test the expected warnings. + */ + warnings?: RollupError[] | ((warnings: RollupError[]) => boolean | void); } -export type RunTestFunction = (directory: string, config: C) => void; +export interface TestConfigSourcemap extends TestConfigBase { + /** + * Output formats to test. + */ + formats?: string[]; + /** + * Rollup options for bundling. + */ + options?: RollupOptions; + /** + * Generate the bundle and run assertions. + */ + test: ( + code: string, + map: SourceMap, + options: { fileName: string; format: string } + ) => void | Promise; + /** + * List expected warnings. + */ + warnings?: RollupError[]; +}