diff --git a/packages/rspack-test-tools/jest.config.compat.js b/packages/rspack-test-tools/jest.config.compat.js index 04bc56953ddf..e67f33b1780e 100644 --- a/packages/rspack-test-tools/jest.config.compat.js +++ b/packages/rspack-test-tools/jest.config.compat.js @@ -9,6 +9,7 @@ module.exports = { "/tests/Defaults.unittest.js", "/tests/Stats.unittest.js", "/tests/TreeShaking.test.js", - "/tests/ConfigTestCases.basictest.js" + "/tests/ConfigTestCases.basictest.js", + "/tests/TestCasesNormal.basictest.js" ] }; diff --git a/packages/rspack-test-tools/jest.config.legacy.js b/packages/rspack-test-tools/jest.config.legacy.js index 9de604533deb..c0ef5085998d 100644 --- a/packages/rspack-test-tools/jest.config.legacy.js +++ b/packages/rspack-test-tools/jest.config.legacy.js @@ -12,6 +12,7 @@ module.exports = { "Builtin.test.js", "HotTestStepWeb.test.js", "ConfigTestCases.basictest.js", + "TestCasesNormal.basictest.js", ".difftest.js" ] }; diff --git a/packages/rspack-test-tools/src/case/normal.ts b/packages/rspack-test-tools/src/case/normal.ts index ffa66b8b94a1..2aeb4719676d 100644 --- a/packages/rspack-test-tools/src/case/normal.ts +++ b/packages/rspack-test-tools/src/case/normal.ts @@ -9,7 +9,7 @@ const creator = new BasicCaseCreator({ steps: ({ name }) => [ new RspackNormalProcessor({ name, - root: path.resolve(__dirname, "../../../rspack/tests/cases"), + root: path.resolve(__dirname, "../../tests/cases"), compilerOptions: {}, // do not used in rspack runable: true }) diff --git a/packages/rspack-test-tools/src/processor/normal.ts b/packages/rspack-test-tools/src/processor/normal.ts index 32b70e738e9f..541176f2d735 100644 --- a/packages/rspack-test-tools/src/processor/normal.ts +++ b/packages/rspack-test-tools/src/processor/normal.ts @@ -10,8 +10,6 @@ import { BasicTaskProcessor } from "./basic"; import path from "path"; import fs from "fs"; -const CWD = process.cwd(); - export interface IRspackNormalProcessorOptions { name: string; root: string; @@ -33,15 +31,6 @@ export class RspackNormalProcessor extends BasicTaskProcessor { - createNormalCase(name, src, dist, path.resolve(__dirname, "../../rspack")); + createNormalCase(name, src, dist); }); diff --git a/packages/rspack/tests/cases/chunks/_import/index.js b/packages/rspack-test-tools/tests/cases/chunks/_import/index.js similarity index 100% rename from packages/rspack/tests/cases/chunks/_import/index.js rename to packages/rspack-test-tools/tests/cases/chunks/_import/index.js diff --git a/packages/rspack/tests/cases/chunks/_import/two.js b/packages/rspack-test-tools/tests/cases/chunks/_import/two.js similarity index 100% rename from packages/rspack/tests/cases/chunks/_import/two.js rename to packages/rspack-test-tools/tests/cases/chunks/_import/two.js diff --git a/packages/rspack/tests/cases/chunks/_import/webpack.config.js b/packages/rspack-test-tools/tests/cases/chunks/_import/webpack.config.js similarity index 100% rename from packages/rspack/tests/cases/chunks/_import/webpack.config.js rename to packages/rspack-test-tools/tests/cases/chunks/_import/webpack.config.js diff --git a/packages/rspack/tests/cases/chunks/context/index.js b/packages/rspack-test-tools/tests/cases/chunks/context/index.js similarity index 100% rename from packages/rspack/tests/cases/chunks/context/index.js rename to packages/rspack-test-tools/tests/cases/chunks/context/index.js diff --git a/packages/rspack/tests/cases/chunks/context/two.js b/packages/rspack-test-tools/tests/cases/chunks/context/two.js similarity index 100% rename from packages/rspack/tests/cases/chunks/context/two.js rename to packages/rspack-test-tools/tests/cases/chunks/context/two.js diff --git a/packages/rspack/tests/cases/chunks/weak-dependencies/a.js b/packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/a.js similarity index 100% rename from packages/rspack/tests/cases/chunks/weak-dependencies/a.js rename to packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/a.js diff --git a/packages/rspack/tests/cases/chunks/weak-dependencies/b.js b/packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/b.js similarity index 100% rename from packages/rspack/tests/cases/chunks/weak-dependencies/b.js rename to packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/b.js diff --git a/packages/rspack/tests/cases/chunks/weak-dependencies/c.js b/packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/c.js similarity index 100% rename from packages/rspack/tests/cases/chunks/weak-dependencies/c.js rename to packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/c.js diff --git a/packages/rspack/tests/cases/chunks/weak-dependencies/d.js b/packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/d.js similarity index 100% rename from packages/rspack/tests/cases/chunks/weak-dependencies/d.js rename to packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/d.js diff --git a/packages/rspack/tests/cases/chunks/weak-dependencies/index.js b/packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/index.js similarity index 100% rename from packages/rspack/tests/cases/chunks/weak-dependencies/index.js rename to packages/rspack-test-tools/tests/cases/chunks/weak-dependencies/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/a.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/a.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/a.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/a.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/b.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/b.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/b.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/b.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/package.json b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/package.json similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/package.json rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/package.json diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/webpack.config.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/webpack.config.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/cjs-interop/webpack.config.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/cjs-interop/webpack.config.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/complex-member/assign-exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/assign-exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/complex-member/assign-exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/assign-exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/complex-member/assign-module-exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/assign-module-exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/complex-member/assign-module-exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/assign-module-exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/complex-member/assign-this.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/assign-this.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/complex-member/assign-this.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/assign-this.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/complex-member/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/complex-member/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/complex-member/self-exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/self-exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/complex-member/self-exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/self-exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/complex-member/self-module-exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/self-module-exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/complex-member/self-module-exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/self-module-exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/complex-member/self-this.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/self-this.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/complex-member/self-this.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/complex-member/self-this.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/package.json b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/package.json similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/package.json rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/package.json diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/reexport.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/reexport.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/reexport.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/reexport.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/value.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/value.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/value.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/value.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/webpack.config.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/webpack.config.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require-bailout/webpack.config.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require-bailout/webpack.config.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require/exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require/exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require/foo.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/foo.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require/foo.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/foo.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require/module-exports-whole.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/module-exports-whole.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require/module-exports-whole.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/module-exports-whole.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require/module-exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/module-exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require/module-exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/module-exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/export-require/this.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/this.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/export-require/this.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/export-require/this.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/full-require/exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/full-require/exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/full-require/exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/full-require/exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/full-require/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/full-require/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/full-require/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/full-require/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/full-require/warnings.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/full-require/warnings.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/full-require/warnings.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/full-require/warnings.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/non-root-this/arrow.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/non-root-this/arrow.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/non-root-this/arrow.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/non-root-this/arrow.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/non-root-this/class.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/non-root-this/class.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/non-root-this/class.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/non-root-this/class.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/non-root-this/function.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/non-root-this/function.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/non-root-this/function.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/non-root-this/function.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/non-root-this/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/non-root-this/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/non-root-this/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/non-root-this/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/self-reference/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/self-reference/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-exports-call.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-exports-call.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-exports-call.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-exports-call.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-module-exports-call.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-module-exports-call.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-module-exports-call.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-module-exports-call.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-module-exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-module-exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-module-exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-module-exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-this.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-this.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-this.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/self-reference/reading-self-from-this.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/sub-properties/exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/sub-properties/exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/sub-properties/exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/sub-properties/exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/sub-properties/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/sub-properties/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/sub-properties/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/sub-properties/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/sub-properties/module-exports.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/sub-properties/module-exports.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/sub-properties/module-exports.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/sub-properties/module-exports.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/sub-properties/this.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/sub-properties/this.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/sub-properties/this.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/sub-properties/this.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/top-level-this/block.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/top-level-this/block.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/top-level-this/block.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/top-level-this/block.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/top-level-this/index.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/top-level-this/index.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/top-level-this/index.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/top-level-this/index.js diff --git a/packages/rspack/tests/cases/cjs-tree-shaking/top-level-this/root.js b/packages/rspack-test-tools/tests/cases/cjs-tree-shaking/top-level-this/root.js similarity index 100% rename from packages/rspack/tests/cases/cjs-tree-shaking/top-level-this/root.js rename to packages/rspack-test-tools/tests/cases/cjs-tree-shaking/top-level-this/root.js diff --git a/packages/rspack/tests/cases/code-generation/escaped-characters/index.js b/packages/rspack-test-tools/tests/cases/code-generation/escaped-characters/index.js similarity index 100% rename from packages/rspack/tests/cases/code-generation/escaped-characters/index.js rename to packages/rspack-test-tools/tests/cases/code-generation/escaped-characters/index.js diff --git a/packages/rspack/tests/cases/code-generation/escaped-characters/module.js b/packages/rspack-test-tools/tests/cases/code-generation/escaped-characters/module.js similarity index 100% rename from packages/rspack/tests/cases/code-generation/escaped-characters/module.js rename to packages/rspack-test-tools/tests/cases/code-generation/escaped-characters/module.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-binary-expression/child/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-binary-expression/child/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-binary-expression/child/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-binary-expression/child/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-binary-expression/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-binary-expression/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-binary-expression/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-binary-expression/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-binary-expression/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-binary-expression/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-binary-expression/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-binary-expression/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-binary-expression/webpack.config.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-binary-expression/webpack.config.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-binary-expression/webpack.config.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-binary-expression/webpack.config.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-concat-call/child/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-concat-call/child/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-concat-call/child/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-concat-call/child/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-concat-call/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-concat-call/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-concat-call/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-concat-call/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-concat-call/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-concat-call/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-concat-call/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-concat-call/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-tagged-template/child/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-tagged-template/child/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-tagged-template/child/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-tagged-template/child/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-tagged-template/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-tagged-template/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-tagged-template/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-tagged-template/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-tagged-template/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-tagged-template/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-tagged-template/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-tagged-template/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-template-literal/child/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-template-literal/child/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-template-literal/child/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-template-literal/child/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-template-literal/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-template-literal/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-template-literal/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-template-literal/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-cjs-require-template-literal/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-template-literal/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-cjs-require-template-literal/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-cjs-require-template-literal/index.js diff --git a/packages/rspack/tests/cases/context/context-module-dynamic-import-binary-expression/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-binary-expression/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-dynamic-import-binary-expression/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-binary-expression/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-dynamic-import-binary-expression/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-binary-expression/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-dynamic-import-binary-expression/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-binary-expression/index.js diff --git a/packages/rspack/tests/cases/context/context-module-dynamic-import-tagged-template/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-tagged-template/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-dynamic-import-tagged-template/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-tagged-template/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-dynamic-import-tagged-template/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-tagged-template/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-dynamic-import-tagged-template/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-tagged-template/index.js diff --git a/packages/rspack/tests/cases/context/context-module-dynamic-import-template-literal/child/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-template-literal/child/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-dynamic-import-template-literal/child/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-template-literal/child/index.js diff --git a/packages/rspack/tests/cases/context/context-module-dynamic-import-template-literal/index.js b/packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-template-literal/index.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-dynamic-import-template-literal/index.js rename to packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-template-literal/index.js diff --git a/packages/rspack/tests/cases/context/ignore-hidden-files/folder/.file.js b/packages/rspack-test-tools/tests/cases/context/ignore-hidden-files/folder/.file.js similarity index 100% rename from packages/rspack/tests/cases/context/ignore-hidden-files/folder/.file.js rename to packages/rspack-test-tools/tests/cases/context/ignore-hidden-files/folder/.file.js diff --git a/packages/rspack/tests/cases/context/ignore-hidden-files/index.js b/packages/rspack-test-tools/tests/cases/context/ignore-hidden-files/index.js similarity index 100% rename from packages/rspack/tests/cases/context/ignore-hidden-files/index.js rename to packages/rspack-test-tools/tests/cases/context/ignore-hidden-files/index.js diff --git a/packages/rspack/tests/cases/context/issue-3014/answer.js b/packages/rspack-test-tools/tests/cases/context/issue-3014/answer.js similarity index 100% rename from packages/rspack/tests/cases/context/issue-3014/answer.js rename to packages/rspack-test-tools/tests/cases/context/issue-3014/answer.js diff --git a/packages/rspack/tests/cases/context/issue-3014/index.js b/packages/rspack-test-tools/tests/cases/context/issue-3014/index.js similarity index 100% rename from packages/rspack/tests/cases/context/issue-3014/index.js rename to packages/rspack-test-tools/tests/cases/context/issue-3014/index.js diff --git a/packages/rspack/tests/cases/context/issue-3241/index.js b/packages/rspack-test-tools/tests/cases/context/issue-3241/index.js similarity index 100% rename from packages/rspack/tests/cases/context/issue-3241/index.js rename to packages/rspack-test-tools/tests/cases/context/issue-3241/index.js diff --git a/packages/rspack/tests/cases/context/issue-3241/nr-hooks/ahook.js b/packages/rspack-test-tools/tests/cases/context/issue-3241/nr-hooks/ahook.js similarity index 100% rename from packages/rspack/tests/cases/context/issue-3241/nr-hooks/ahook.js rename to packages/rspack-test-tools/tests/cases/context/issue-3241/nr-hooks/ahook.js diff --git a/packages/rspack/tests/cases/context/issue-4557/folder/my-story.js b/packages/rspack-test-tools/tests/cases/context/issue-4557/folder/my-story.js similarity index 100% rename from packages/rspack/tests/cases/context/issue-4557/folder/my-story.js rename to packages/rspack-test-tools/tests/cases/context/issue-4557/folder/my-story.js diff --git a/packages/rspack/tests/cases/context/issue-4557/index.js b/packages/rspack-test-tools/tests/cases/context/issue-4557/index.js similarity index 100% rename from packages/rspack/tests/cases/context/issue-4557/index.js rename to packages/rspack-test-tools/tests/cases/context/issue-4557/index.js diff --git a/packages/rspack/tests/cases/context/issue-4663/assets/sample.js b/packages/rspack-test-tools/tests/cases/context/issue-4663/assets/sample.js similarity index 100% rename from packages/rspack/tests/cases/context/issue-4663/assets/sample.js rename to packages/rspack-test-tools/tests/cases/context/issue-4663/assets/sample.js diff --git a/packages/rspack/tests/cases/context/issue-4663/index.js b/packages/rspack-test-tools/tests/cases/context/issue-4663/index.js similarity index 100% rename from packages/rspack/tests/cases/context/issue-4663/index.js rename to packages/rspack-test-tools/tests/cases/context/issue-4663/index.js diff --git a/packages/rspack/tests/cases/context/resource-query-prefix/index.js b/packages/rspack-test-tools/tests/cases/context/resource-query-prefix/index.js similarity index 100% rename from packages/rspack/tests/cases/context/resource-query-prefix/index.js rename to packages/rspack-test-tools/tests/cases/context/resource-query-prefix/index.js diff --git a/packages/rspack/tests/cases/context/resource-query-prefix/sub/a.js b/packages/rspack-test-tools/tests/cases/context/resource-query-prefix/sub/a.js similarity index 100% rename from packages/rspack/tests/cases/context/resource-query-prefix/sub/a.js rename to packages/rspack-test-tools/tests/cases/context/resource-query-prefix/sub/a.js diff --git a/packages/rspack/tests/cases/context/resource-query-prefix/sub/abc.js b/packages/rspack-test-tools/tests/cases/context/resource-query-prefix/sub/abc.js similarity index 100% rename from packages/rspack/tests/cases/context/resource-query-prefix/sub/abc.js rename to packages/rspack-test-tools/tests/cases/context/resource-query-prefix/sub/abc.js diff --git a/packages/rspack/tests/cases/context/resource-query/a.js b/packages/rspack-test-tools/tests/cases/context/resource-query/a.js similarity index 100% rename from packages/rspack/tests/cases/context/resource-query/a.js rename to packages/rspack-test-tools/tests/cases/context/resource-query/a.js diff --git a/packages/rspack/tests/cases/context/resource-query/abc.js b/packages/rspack-test-tools/tests/cases/context/resource-query/abc.js similarity index 100% rename from packages/rspack/tests/cases/context/resource-query/abc.js rename to packages/rspack-test-tools/tests/cases/context/resource-query/abc.js diff --git a/packages/rspack/tests/cases/context/resource-query/index.js b/packages/rspack-test-tools/tests/cases/context/resource-query/index.js similarity index 100% rename from packages/rspack/tests/cases/context/resource-query/index.js rename to packages/rspack-test-tools/tests/cases/context/resource-query/index.js diff --git a/packages/rspack/tests/cases/context/rspack-issue-5521/errors.js b/packages/rspack-test-tools/tests/cases/context/rspack-issue-5521/errors.js similarity index 100% rename from packages/rspack/tests/cases/context/rspack-issue-5521/errors.js rename to packages/rspack-test-tools/tests/cases/context/rspack-issue-5521/errors.js diff --git a/packages/rspack/tests/cases/context/rspack-issue-5521/index.js b/packages/rspack-test-tools/tests/cases/context/rspack-issue-5521/index.js similarity index 100% rename from packages/rspack/tests/cases/context/rspack-issue-5521/index.js rename to packages/rspack-test-tools/tests/cases/context/rspack-issue-5521/index.js diff --git a/packages/rspack/tests/cases/context/rspack-issue-5535/index.js b/packages/rspack-test-tools/tests/cases/context/rspack-issue-5535/index.js similarity index 100% rename from packages/rspack/tests/cases/context/rspack-issue-5535/index.js rename to packages/rspack-test-tools/tests/cases/context/rspack-issue-5535/index.js diff --git a/packages/rspack/tests/cases/context/rspack-issue-5535/test-module/index.js b/packages/rspack-test-tools/tests/cases/context/rspack-issue-5535/test-module/index.js similarity index 100% rename from packages/rspack/tests/cases/context/rspack-issue-5535/test-module/index.js rename to packages/rspack-test-tools/tests/cases/context/rspack-issue-5535/test-module/index.js diff --git a/packages/rspack/tests/cases/context/rspack-issue-5535/test-module/modules/test.module.js b/packages/rspack-test-tools/tests/cases/context/rspack-issue-5535/test-module/modules/test.module.js similarity index 100% rename from packages/rspack/tests/cases/context/rspack-issue-5535/test-module/modules/test.module.js rename to packages/rspack-test-tools/tests/cases/context/rspack-issue-5535/test-module/modules/test.module.js diff --git a/packages/rspack/tests/cases/errors/harmony-export-default-from/bar.js b/packages/rspack-test-tools/tests/cases/errors/harmony-export-default-from/bar.js similarity index 100% rename from packages/rspack/tests/cases/errors/harmony-export-default-from/bar.js rename to packages/rspack-test-tools/tests/cases/errors/harmony-export-default-from/bar.js diff --git a/packages/rspack/tests/cases/errors/harmony-export-default-from/errors.js b/packages/rspack-test-tools/tests/cases/errors/harmony-export-default-from/errors.js similarity index 100% rename from packages/rspack/tests/cases/errors/harmony-export-default-from/errors.js rename to packages/rspack-test-tools/tests/cases/errors/harmony-export-default-from/errors.js diff --git a/packages/rspack/tests/cases/errors/harmony-export-default-from/foo.js b/packages/rspack-test-tools/tests/cases/errors/harmony-export-default-from/foo.js similarity index 100% rename from packages/rspack/tests/cases/errors/harmony-export-default-from/foo.js rename to packages/rspack-test-tools/tests/cases/errors/harmony-export-default-from/foo.js diff --git a/packages/rspack/tests/cases/errors/harmony-export-default-from/index.js b/packages/rspack-test-tools/tests/cases/errors/harmony-export-default-from/index.js similarity index 100% rename from packages/rspack/tests/cases/errors/harmony-export-default-from/index.js rename to packages/rspack-test-tools/tests/cases/errors/harmony-export-default-from/index.js diff --git a/packages/rspack/tests/cases/esm/export-star-and-import/a.js b/packages/rspack-test-tools/tests/cases/esm/export-star-and-import/a.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-star-and-import/a.js rename to packages/rspack-test-tools/tests/cases/esm/export-star-and-import/a.js diff --git a/packages/rspack/tests/cases/esm/export-star-and-import/index.js b/packages/rspack-test-tools/tests/cases/esm/export-star-and-import/index.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-star-and-import/index.js rename to packages/rspack-test-tools/tests/cases/esm/export-star-and-import/index.js diff --git a/packages/rspack/tests/cases/esm/export-star-missing/errors.js b/packages/rspack-test-tools/tests/cases/esm/export-star-missing/errors.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-star-missing/errors.js rename to packages/rspack-test-tools/tests/cases/esm/export-star-missing/errors.js diff --git a/packages/rspack/tests/cases/esm/export-star-missing/index.js b/packages/rspack-test-tools/tests/cases/esm/export-star-missing/index.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-star-missing/index.js rename to packages/rspack-test-tools/tests/cases/esm/export-star-missing/index.js diff --git a/packages/rspack/tests/cases/esm/export-star-missing/lib.js b/packages/rspack-test-tools/tests/cases/esm/export-star-missing/lib.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-star-missing/lib.js rename to packages/rspack-test-tools/tests/cases/esm/export-star-missing/lib.js diff --git a/packages/rspack/tests/cases/esm/export-star/index.js b/packages/rspack-test-tools/tests/cases/esm/export-star/index.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-star/index.js rename to packages/rspack-test-tools/tests/cases/esm/export-star/index.js diff --git a/packages/rspack/tests/cases/esm/export-star/lib.js b/packages/rspack-test-tools/tests/cases/esm/export-star/lib.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-star/lib.js rename to packages/rspack-test-tools/tests/cases/esm/export-star/lib.js diff --git a/packages/rspack/tests/cases/esm/export-star/variables.js b/packages/rspack-test-tools/tests/cases/esm/export-star/variables.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-star/variables.js rename to packages/rspack-test-tools/tests/cases/esm/export-star/variables.js diff --git a/packages/rspack/tests/cases/esm/export-string-name/a.js b/packages/rspack-test-tools/tests/cases/esm/export-string-name/a.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-string-name/a.js rename to packages/rspack-test-tools/tests/cases/esm/export-string-name/a.js diff --git a/packages/rspack/tests/cases/esm/export-string-name/index.js b/packages/rspack-test-tools/tests/cases/esm/export-string-name/index.js similarity index 100% rename from packages/rspack/tests/cases/esm/export-string-name/index.js rename to packages/rspack-test-tools/tests/cases/esm/export-string-name/index.js diff --git a/packages/rspack/tests/cases/esm/import-meta-property/index.js b/packages/rspack-test-tools/tests/cases/esm/import-meta-property/index.js similarity index 100% rename from packages/rspack/tests/cases/esm/import-meta-property/index.js rename to packages/rspack-test-tools/tests/cases/esm/import-meta-property/index.js diff --git a/packages/rspack/tests/cases/esm/import-meta/index.js b/packages/rspack-test-tools/tests/cases/esm/import-meta/index.js similarity index 100% rename from packages/rspack/tests/cases/esm/import-meta/index.js rename to packages/rspack-test-tools/tests/cases/esm/import-meta/index.js diff --git a/packages/rspack/tests/cases/indirect-call/call/dep.js b/packages/rspack-test-tools/tests/cases/indirect-call/call/dep.js similarity index 100% rename from packages/rspack/tests/cases/indirect-call/call/dep.js rename to packages/rspack-test-tools/tests/cases/indirect-call/call/dep.js diff --git a/packages/rspack/tests/cases/indirect-call/call/index.js b/packages/rspack-test-tools/tests/cases/indirect-call/call/index.js similarity index 100% rename from packages/rspack/tests/cases/indirect-call/call/index.js rename to packages/rspack-test-tools/tests/cases/indirect-call/call/index.js diff --git a/packages/rspack/tests/cases/indirect-call/tagged-template-expression/dep.js b/packages/rspack-test-tools/tests/cases/indirect-call/tagged-template-expression/dep.js similarity index 100% rename from packages/rspack/tests/cases/indirect-call/tagged-template-expression/dep.js rename to packages/rspack-test-tools/tests/cases/indirect-call/tagged-template-expression/dep.js diff --git a/packages/rspack/tests/cases/indirect-call/tagged-template-expression/dep1.js b/packages/rspack-test-tools/tests/cases/indirect-call/tagged-template-expression/dep1.js similarity index 100% rename from packages/rspack/tests/cases/indirect-call/tagged-template-expression/dep1.js rename to packages/rspack-test-tools/tests/cases/indirect-call/tagged-template-expression/dep1.js diff --git a/packages/rspack/tests/cases/indirect-call/tagged-template-expression/index.js b/packages/rspack-test-tools/tests/cases/indirect-call/tagged-template-expression/index.js similarity index 100% rename from packages/rspack/tests/cases/indirect-call/tagged-template-expression/index.js rename to packages/rspack-test-tools/tests/cases/indirect-call/tagged-template-expression/index.js diff --git a/packages/rspack/tests/cases/interop/basic/a.js b/packages/rspack-test-tools/tests/cases/interop/basic/a.js similarity index 100% rename from packages/rspack/tests/cases/interop/basic/a.js rename to packages/rspack-test-tools/tests/cases/interop/basic/a.js diff --git a/packages/rspack/tests/cases/interop/basic/esm.js b/packages/rspack-test-tools/tests/cases/interop/basic/esm.js similarity index 100% rename from packages/rspack/tests/cases/interop/basic/esm.js rename to packages/rspack-test-tools/tests/cases/interop/basic/esm.js diff --git a/packages/rspack/tests/cases/interop/basic/index.js b/packages/rspack-test-tools/tests/cases/interop/basic/index.js similarity index 100% rename from packages/rspack/tests/cases/interop/basic/index.js rename to packages/rspack-test-tools/tests/cases/interop/basic/index.js diff --git a/packages/rspack/tests/cases/interop/exports/index.js b/packages/rspack-test-tools/tests/cases/interop/exports/index.js similarity index 100% rename from packages/rspack/tests/cases/interop/exports/index.js rename to packages/rspack-test-tools/tests/cases/interop/exports/index.js diff --git a/packages/rspack/tests/cases/interop/exports/lib.js b/packages/rspack-test-tools/tests/cases/interop/exports/lib.js similarity index 100% rename from packages/rspack/tests/cases/interop/exports/lib.js rename to packages/rspack-test-tools/tests/cases/interop/exports/lib.js diff --git a/packages/rspack/tests/cases/interop/mjs/a.js b/packages/rspack-test-tools/tests/cases/interop/mjs/a.js similarity index 100% rename from packages/rspack/tests/cases/interop/mjs/a.js rename to packages/rspack-test-tools/tests/cases/interop/mjs/a.js diff --git a/packages/rspack/tests/cases/interop/mjs/index.js b/packages/rspack-test-tools/tests/cases/interop/mjs/index.js similarity index 100% rename from packages/rspack/tests/cases/interop/mjs/index.js rename to packages/rspack-test-tools/tests/cases/interop/mjs/index.js diff --git a/packages/rspack/tests/cases/interop/mjs/lib.mjs b/packages/rspack-test-tools/tests/cases/interop/mjs/lib.mjs similarity index 100% rename from packages/rspack/tests/cases/interop/mjs/lib.mjs rename to packages/rspack-test-tools/tests/cases/interop/mjs/lib.mjs diff --git a/packages/rspack/tests/cases/interop/mjs/value.js b/packages/rspack-test-tools/tests/cases/interop/mjs/value.js similarity index 100% rename from packages/rspack/tests/cases/interop/mjs/value.js rename to packages/rspack-test-tools/tests/cases/interop/mjs/value.js diff --git a/packages/rspack/tests/cases/mjs/cjs-import-default-umd/index.mjs b/packages/rspack-test-tools/tests/cases/mjs/cjs-import-default-umd/index.mjs similarity index 100% rename from packages/rspack/tests/cases/mjs/cjs-import-default-umd/index.mjs rename to packages/rspack-test-tools/tests/cases/mjs/cjs-import-default-umd/index.mjs diff --git a/packages/rspack/tests/cases/mjs/cjs-import-default-umd/package.json b/packages/rspack-test-tools/tests/cases/mjs/cjs-import-default-umd/package.json similarity index 100% rename from packages/rspack/tests/cases/mjs/cjs-import-default-umd/package.json rename to packages/rspack-test-tools/tests/cases/mjs/cjs-import-default-umd/package.json diff --git a/packages/rspack/tests/cases/mjs/cjs-import-default-umd/umd.js b/packages/rspack-test-tools/tests/cases/mjs/cjs-import-default-umd/umd.js similarity index 100% rename from packages/rspack/tests/cases/mjs/cjs-import-default-umd/umd.js rename to packages/rspack-test-tools/tests/cases/mjs/cjs-import-default-umd/umd.js diff --git a/packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/cjs.js b/packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/cjs.js similarity index 100% rename from packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/cjs.js rename to packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/cjs.js diff --git a/packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/data.json b/packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/data.json similarity index 100% rename from packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/data.json rename to packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/data.json diff --git a/packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/dynamic.js b/packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/dynamic.js similarity index 100% rename from packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/dynamic.js rename to packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/dynamic.js diff --git a/packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/dynamicFlagged.js b/packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/dynamicFlagged.js similarity index 100% rename from packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/dynamicFlagged.js rename to packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/dynamicFlagged.js diff --git a/packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/flagged.js b/packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/flagged.js similarity index 100% rename from packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/flagged.js rename to packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/flagged.js diff --git a/packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/index.js b/packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/index.js similarity index 100% rename from packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/index.js rename to packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/index.js diff --git a/packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/reexport.js b/packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/reexport.js similarity index 100% rename from packages/rspack/tests/cases/mjs/non-mjs-cjs-import-default/reexport.js rename to packages/rspack-test-tools/tests/cases/mjs/non-mjs-cjs-import-default/reexport.js diff --git a/packages/rspack/tests/cases/mjs/type-module/index.js b/packages/rspack-test-tools/tests/cases/mjs/type-module/index.js similarity index 100% rename from packages/rspack/tests/cases/mjs/type-module/index.js rename to packages/rspack-test-tools/tests/cases/mjs/type-module/index.js diff --git a/packages/rspack/tests/cases/mjs/type-module/package.json b/packages/rspack-test-tools/tests/cases/mjs/type-module/package.json similarity index 100% rename from packages/rspack/tests/cases/mjs/type-module/package.json rename to packages/rspack-test-tools/tests/cases/mjs/type-module/package.json diff --git a/packages/rspack/tests/cases/mjs/type-null/index.js b/packages/rspack-test-tools/tests/cases/mjs/type-null/index.js similarity index 100% rename from packages/rspack/tests/cases/mjs/type-null/index.js rename to packages/rspack-test-tools/tests/cases/mjs/type-null/index.js diff --git a/packages/rspack/tests/cases/mjs/type-null/package.json b/packages/rspack-test-tools/tests/cases/mjs/type-null/package.json similarity index 100% rename from packages/rspack/tests/cases/mjs/type-null/package.json rename to packages/rspack-test-tools/tests/cases/mjs/type-null/package.json diff --git a/packages/rspack/tests/cases/parsing/_harmony-commonjs-mix/index.js b/packages/rspack-test-tools/tests/cases/parsing/_harmony-commonjs-mix/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/_harmony-commonjs-mix/index.js rename to packages/rspack-test-tools/tests/cases/parsing/_harmony-commonjs-mix/index.js diff --git a/packages/rspack/tests/cases/parsing/_harmony-commonjs-mix/module.js b/packages/rspack-test-tools/tests/cases/parsing/_harmony-commonjs-mix/module.js similarity index 100% rename from packages/rspack/tests/cases/parsing/_harmony-commonjs-mix/module.js rename to packages/rspack-test-tools/tests/cases/parsing/_harmony-commonjs-mix/module.js diff --git a/packages/rspack/tests/cases/parsing/_harmony-commonjs-mix/module1.js b/packages/rspack-test-tools/tests/cases/parsing/_harmony-commonjs-mix/module1.js similarity index 100% rename from packages/rspack/tests/cases/parsing/_harmony-commonjs-mix/module1.js rename to packages/rspack-test-tools/tests/cases/parsing/_harmony-commonjs-mix/module1.js diff --git a/packages/rspack/tests/cases/parsing/empty-resource-query/a.js b/packages/rspack-test-tools/tests/cases/parsing/empty-resource-query/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/empty-resource-query/a.js rename to packages/rspack-test-tools/tests/cases/parsing/empty-resource-query/a.js diff --git a/packages/rspack/tests/cases/parsing/empty-resource-query/abc.js b/packages/rspack-test-tools/tests/cases/parsing/empty-resource-query/abc.js similarity index 100% rename from packages/rspack/tests/cases/parsing/empty-resource-query/abc.js rename to packages/rspack-test-tools/tests/cases/parsing/empty-resource-query/abc.js diff --git a/packages/rspack/tests/cases/parsing/empty-resource-query/index.js b/packages/rspack-test-tools/tests/cases/parsing/empty-resource-query/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/empty-resource-query/index.js rename to packages/rspack-test-tools/tests/cases/parsing/empty-resource-query/index.js diff --git a/packages/rspack/tests/cases/parsing/evaluate-if/foo.js b/packages/rspack-test-tools/tests/cases/parsing/evaluate-if/foo.js similarity index 100% rename from packages/rspack/tests/cases/parsing/evaluate-if/foo.js rename to packages/rspack-test-tools/tests/cases/parsing/evaluate-if/foo.js diff --git a/packages/rspack/tests/cases/parsing/evaluate-if/index.js b/packages/rspack-test-tools/tests/cases/parsing/evaluate-if/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/evaluate-if/index.js rename to packages/rspack-test-tools/tests/cases/parsing/evaluate-if/index.js diff --git a/packages/rspack/tests/cases/parsing/evaluate-logical/index.js b/packages/rspack-test-tools/tests/cases/parsing/evaluate-logical/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/evaluate-logical/index.js rename to packages/rspack-test-tools/tests/cases/parsing/evaluate-logical/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-circular-star-reexport/a.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-circular-star-reexport/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-circular-star-reexport/a.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-circular-star-reexport/a.js diff --git a/packages/rspack/tests/cases/parsing/harmony-circular-star-reexport/b.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-circular-star-reexport/b.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-circular-star-reexport/b.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-circular-star-reexport/b.js diff --git a/packages/rspack/tests/cases/parsing/harmony-circular-star-reexport/c.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-circular-star-reexport/c.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-circular-star-reexport/c.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-circular-star-reexport/c.js diff --git a/packages/rspack/tests/cases/parsing/harmony-circular-star-reexport/index.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-circular-star-reexport/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-circular-star-reexport/index.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-circular-star-reexport/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/bbb.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/bbb.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/bbb.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/bbb.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs1.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs1.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs1.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs1.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs2.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs2.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs2.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs2.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs3.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs3.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs3.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs3.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs4.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs4.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs4.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs4.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs5.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs5.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs5.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/cjs5.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm1.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm1.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm1.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm1.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm2.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm2.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm2.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm2.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm3.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm3.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm3.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm3.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm4.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm4.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm4.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm4.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm5.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm5.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm5.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm5.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm6.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm6.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/esm6.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/esm6.js diff --git a/packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/index.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-commonjs-mix-decorator/index.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-commonjs-mix-decorator/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-deep-exports/cjs.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/cjs.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-deep-exports/cjs.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/cjs.js diff --git a/packages/rspack/tests/cases/parsing/harmony-deep-exports/cjs2.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/cjs2.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-deep-exports/cjs2.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/cjs2.js diff --git a/packages/rspack/tests/cases/parsing/harmony-deep-exports/cjs3.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/cjs3.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-deep-exports/cjs3.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/cjs3.js diff --git a/packages/rspack/tests/cases/parsing/harmony-deep-exports/counter.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/counter.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-deep-exports/counter.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/counter.js diff --git a/packages/rspack/tests/cases/parsing/harmony-deep-exports/esm1.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/esm1.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-deep-exports/esm1.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/esm1.js diff --git a/packages/rspack/tests/cases/parsing/harmony-deep-exports/index.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-deep-exports/index.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-deep-exports/reexport-namespace-again.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/reexport-namespace-again.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-deep-exports/reexport-namespace-again.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/reexport-namespace-again.js diff --git a/packages/rspack/tests/cases/parsing/harmony-deep-exports/reexport-namespace.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/reexport-namespace.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-deep-exports/reexport-namespace.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-deep-exports/reexport-namespace.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/a.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/a.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/a.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/b.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/b.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/b.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/b.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/c.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/c.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/c.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/c.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/d.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/d.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/d.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/d.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/index.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-default-function-decl/index.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-default-function-decl/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/bar.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/bar.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/bar.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/bar.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/class-no-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/class-no-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/class-no-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/class-no-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/class-with-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/class-with-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/class-with-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/class-with-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/class-with-super-no-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/class-with-super-no-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/class-with-super-no-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/class-with-super-no-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/class-with-super-with-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/class-with-super-with-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/class-with-super-with-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/class-with-super-with-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/foo.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/foo.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/foo.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/foo.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/func-no-args-no-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/func-no-args-no-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/func-no-args-no-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/func-no-args-no-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/func-no-args-with-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/func-no-args-with-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/func-no-args-with-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/func-no-args-with-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/func-with-args-no-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/func-with-args-no-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/func-with-args-no-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/func-with-args-no-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/func-with-args-with-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/func-with-args-with-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/func-with-args-with-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/func-with-args-with-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/get-class-no-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-class-no-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/get-class-no-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-class-no-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/get-class-with-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-class-with-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/get-class-with-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-class-with-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/get-class-with-super-no-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-class-with-super-no-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/get-class-with-super-no-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-class-with-super-no-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/get-class-with-super-with-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-class-with-super-with-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/get-class-with-super-with-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-class-with-super-with-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/get-func-no-args-no-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-func-no-args-no-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/get-func-no-args-no-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-func-no-args-no-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/get-func-no-args-with-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-func-no-args-with-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/get-func-no-args-with-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-func-no-args-with-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/get-func-with-args-no-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-func-with-args-no-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/get-func-with-args-no-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-func-with-args-no-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/get-func-with-args-with-name.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-func-with-args-with-name.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/get-func-with-args-with-name.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/get-func-with-args-with-name.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-hoist/index.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-hoist/index.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-hoist/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/a.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/a.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/a.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/b.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/b.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/b.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/b.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/c.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/c.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/c.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/c.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/cjs.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/cjs.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/cjs.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/cjs.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/cjs1.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/cjs1.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/cjs1.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/cjs1.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/cjs2.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/cjs2.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/cjs2.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/cjs2.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/d.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/d.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/d.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/d.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/e.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/e.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/e.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/e.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/e1.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/e1.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/e1.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/e1.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/f.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/f.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/f.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/f.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/g.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/g.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/g.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/g.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/h.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/h.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/h.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/h.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/index.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/index.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/m.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/m.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/m.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/m.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/n.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/n.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/n.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/n.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/o.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/o.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/o.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/o.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/p.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/p.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/p.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/p.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/q.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/q.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/q.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/q.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/m.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/m.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/m.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/m.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/o.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/o.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/o.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/o.js diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/package.json b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/package.json similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/package.json rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/side-effect-free/package.json diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/some.json b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/some.json similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/some.json rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/some.json diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/some1.json b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/some1.json similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/some1.json rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/some1.json diff --git a/packages/rspack/tests/cases/parsing/harmony-export-import-specifier/weird-cjs.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/weird-cjs.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-export-import-specifier/weird-cjs.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-export-import-specifier/weird-cjs.js diff --git a/packages/rspack/tests/cases/parsing/harmony-in-require-context/index.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-in-require-context/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-in-require-context/index.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-in-require-context/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-in-require-context/langs/en.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-in-require-context/langs/en.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-in-require-context/langs/en.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-in-require-context/langs/en.js diff --git a/packages/rspack/tests/cases/parsing/harmony-in-require-context/lo.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-in-require-context/lo.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-in-require-context/lo.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-in-require-context/lo.js diff --git a/packages/rspack/tests/cases/parsing/harmony-reexport/a.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-reexport/a.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/a.js diff --git a/packages/rspack/tests/cases/parsing/harmony-reexport/b.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/b.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-reexport/b.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/b.js diff --git a/packages/rspack/tests/cases/parsing/harmony-reexport/c.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/c.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-reexport/c.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/c.js diff --git a/packages/rspack/tests/cases/parsing/harmony-reexport/empty.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/empty.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-reexport/empty.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/empty.js diff --git a/packages/rspack/tests/cases/parsing/harmony-reexport/index.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-reexport/index.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/index.js diff --git a/packages/rspack/tests/cases/parsing/harmony-reexport/reexport.js b/packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/reexport.js similarity index 100% rename from packages/rspack/tests/cases/parsing/harmony-reexport/reexport.js rename to packages/rspack-test-tools/tests/cases/parsing/harmony-reexport/reexport.js diff --git a/packages/rspack/tests/cases/parsing/issue-3346/index.js b/packages/rspack-test-tools/tests/cases/parsing/issue-3346/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-3346/index.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-3346/index.js diff --git a/packages/rspack/tests/cases/parsing/issue-3346/locale/a.js b/packages/rspack-test-tools/tests/cases/parsing/issue-3346/locale/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-3346/locale/a.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-3346/locale/a.js diff --git a/packages/rspack/tests/cases/parsing/issue-3346/locale/b.js b/packages/rspack-test-tools/tests/cases/parsing/issue-3346/locale/b.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-3346/locale/b.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-3346/locale/b.js diff --git a/packages/rspack/tests/cases/parsing/issue-5426/index.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5426/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5426/index.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5426/index.js diff --git a/packages/rspack/tests/cases/parsing/issue-5498/foo.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5498/foo.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5498/foo.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5498/foo.js diff --git a/packages/rspack/tests/cases/parsing/issue-5498/index.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5498/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5498/index.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5498/index.js diff --git a/packages/rspack/tests/cases/parsing/issue-5638/computed-inner.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5638/computed-inner.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5638/computed-inner.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5638/computed-inner.js diff --git a/packages/rspack/tests/cases/parsing/issue-5638/computed-nested.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5638/computed-nested.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5638/computed-nested.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5638/computed-nested.js diff --git a/packages/rspack/tests/cases/parsing/issue-5638/computed-require.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5638/computed-require.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5638/computed-require.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5638/computed-require.js diff --git a/packages/rspack/tests/cases/parsing/issue-5638/computed.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5638/computed.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5638/computed.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5638/computed.js diff --git a/packages/rspack/tests/cases/parsing/issue-5638/index.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5638/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5638/index.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5638/index.js diff --git a/packages/rspack/tests/cases/parsing/issue-5638/lib.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5638/lib.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5638/lib.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5638/lib.js diff --git a/packages/rspack/tests/cases/parsing/issue-5786/index.js b/packages/rspack-test-tools/tests/cases/parsing/issue-5786/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/issue-5786/index.js rename to packages/rspack-test-tools/tests/cases/parsing/issue-5786/index.js diff --git a/packages/rspack/tests/cases/parsing/nested-new-url/a.txt b/packages/rspack-test-tools/tests/cases/parsing/nested-new-url/a.txt similarity index 100% rename from packages/rspack/tests/cases/parsing/nested-new-url/a.txt rename to packages/rspack-test-tools/tests/cases/parsing/nested-new-url/a.txt diff --git a/packages/rspack/tests/cases/parsing/nested-new-url/index.js b/packages/rspack-test-tools/tests/cases/parsing/nested-new-url/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/nested-new-url/index.js rename to packages/rspack-test-tools/tests/cases/parsing/nested-new-url/index.js diff --git a/packages/rspack/tests/cases/parsing/nested-webpack-require/a.js b/packages/rspack-test-tools/tests/cases/parsing/nested-webpack-require/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/nested-webpack-require/a.js rename to packages/rspack-test-tools/tests/cases/parsing/nested-webpack-require/a.js diff --git a/packages/rspack/tests/cases/parsing/nested-webpack-require/b.js b/packages/rspack-test-tools/tests/cases/parsing/nested-webpack-require/b.js similarity index 100% rename from packages/rspack/tests/cases/parsing/nested-webpack-require/b.js rename to packages/rspack-test-tools/tests/cases/parsing/nested-webpack-require/b.js diff --git a/packages/rspack/tests/cases/parsing/nested-webpack-require/index.js b/packages/rspack-test-tools/tests/cases/parsing/nested-webpack-require/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/nested-webpack-require/index.js rename to packages/rspack-test-tools/tests/cases/parsing/nested-webpack-require/index.js diff --git a/packages/rspack/tests/cases/parsing/remove-dependency/index.js b/packages/rspack-test-tools/tests/cases/parsing/remove-dependency/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/remove-dependency/index.js rename to packages/rspack-test-tools/tests/cases/parsing/remove-dependency/index.js diff --git a/packages/rspack/tests/cases/parsing/renaming/file.js b/packages/rspack-test-tools/tests/cases/parsing/renaming/file.js similarity index 100% rename from packages/rspack/tests/cases/parsing/renaming/file.js rename to packages/rspack-test-tools/tests/cases/parsing/renaming/file.js diff --git a/packages/rspack/tests/cases/parsing/renaming/index.js b/packages/rspack-test-tools/tests/cases/parsing/renaming/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/renaming/index.js rename to packages/rspack-test-tools/tests/cases/parsing/renaming/index.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4643/a.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4643/a.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/a.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4643/b.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/b.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4643/b.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/b.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4643/c.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/c.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4643/c.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/c.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4643/d.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/d.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4643/d.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/d.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4643/e.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/e.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4643/e.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/e.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4643/index.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4643/index.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4643/index.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/a.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/a.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/a.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/b.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/b.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/b.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/b.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/index.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/index.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/index.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/regexp/a.filtered.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/regexp/a.filtered.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/regexp/a.filtered.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/regexp/a.filtered.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/regexp/a.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/regexp/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/regexp/a.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/regexp/a.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/resourceFragment/index.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/resourceFragment/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/resourceFragment/index.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/resourceFragment/index.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/resourceFragment/returnRF.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/resourceFragment/returnRF.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/resourceFragment/returnRF.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/resourceFragment/returnRF.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/resourceQuery/index.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/resourceQuery/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/resourceQuery/index.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/resourceQuery/index.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/resourceQuery/returnRQ.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/resourceQuery/returnRQ.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/resourceQuery/returnRQ.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/resourceQuery/returnRQ.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-4816/test.filter.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/test.filter.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-4816/test.filter.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-4816/test.filter.js diff --git a/packages/rspack/tests/cases/parsing/rspack-issue-6164/index.js b/packages/rspack-test-tools/tests/cases/parsing/rspack-issue-6164/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/rspack-issue-6164/index.js rename to packages/rspack-test-tools/tests/cases/parsing/rspack-issue-6164/index.js diff --git a/packages/rspack/tests/cases/parsing/top-this/a.js b/packages/rspack-test-tools/tests/cases/parsing/top-this/a.js similarity index 100% rename from packages/rspack/tests/cases/parsing/top-this/a.js rename to packages/rspack-test-tools/tests/cases/parsing/top-this/a.js diff --git a/packages/rspack/tests/cases/parsing/top-this/index.js b/packages/rspack-test-tools/tests/cases/parsing/top-this/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/top-this/index.js rename to packages/rspack-test-tools/tests/cases/parsing/top-this/index.js diff --git a/packages/rspack/tests/cases/parsing/typeof-api-2/index.js b/packages/rspack-test-tools/tests/cases/parsing/typeof-api-2/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/typeof-api-2/index.js rename to packages/rspack-test-tools/tests/cases/parsing/typeof-api-2/index.js diff --git a/packages/rspack/tests/cases/parsing/typeof-api/index.js b/packages/rspack-test-tools/tests/cases/parsing/typeof-api/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/typeof-api/index.js rename to packages/rspack-test-tools/tests/cases/parsing/typeof-api/index.js diff --git a/packages/rspack/tests/cases/parsing/typeof-api/typeof.js b/packages/rspack-test-tools/tests/cases/parsing/typeof-api/typeof.js similarity index 100% rename from packages/rspack/tests/cases/parsing/typeof-api/typeof.js rename to packages/rspack-test-tools/tests/cases/parsing/typeof-api/typeof.js diff --git a/packages/rspack/tests/cases/parsing/typeof/index.js b/packages/rspack-test-tools/tests/cases/parsing/typeof/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/typeof/index.js rename to packages/rspack-test-tools/tests/cases/parsing/typeof/index.js diff --git a/packages/rspack/tests/cases/parsing/typeof/typeof.js b/packages/rspack-test-tools/tests/cases/parsing/typeof/typeof.js similarity index 100% rename from packages/rspack/tests/cases/parsing/typeof/typeof.js rename to packages/rspack-test-tools/tests/cases/parsing/typeof/typeof.js diff --git a/packages/rspack/tests/cases/parsing/unsupport-require-property/index.js b/packages/rspack-test-tools/tests/cases/parsing/unsupport-require-property/index.js similarity index 100% rename from packages/rspack/tests/cases/parsing/unsupport-require-property/index.js rename to packages/rspack-test-tools/tests/cases/parsing/unsupport-require-property/index.js diff --git a/packages/rspack/tests/cases/parsing/unsupport-require-property/warnings.js b/packages/rspack-test-tools/tests/cases/parsing/unsupport-require-property/warnings.js similarity index 100% rename from packages/rspack/tests/cases/parsing/unsupport-require-property/warnings.js rename to packages/rspack-test-tools/tests/cases/parsing/unsupport-require-property/warnings.js diff --git a/packages/rspack/tests/cases/resolve/axios-0.27.2/index.js b/packages/rspack-test-tools/tests/cases/resolve/axios-0.27.2/index.js similarity index 100% rename from packages/rspack/tests/cases/resolve/axios-0.27.2/index.js rename to packages/rspack-test-tools/tests/cases/resolve/axios-0.27.2/index.js diff --git a/packages/rspack/tests/cases/resolve/axios-0.27.2/webpack.config.js b/packages/rspack-test-tools/tests/cases/resolve/axios-0.27.2/webpack.config.js similarity index 100% rename from packages/rspack/tests/cases/resolve/axios-0.27.2/webpack.config.js rename to packages/rspack-test-tools/tests/cases/resolve/axios-0.27.2/webpack.config.js diff --git a/packages/rspack/tests/cases/resolve/browser-field/index.js b/packages/rspack-test-tools/tests/cases/resolve/browser-field/index.js similarity index 100% rename from packages/rspack/tests/cases/resolve/browser-field/index.js rename to packages/rspack-test-tools/tests/cases/resolve/browser-field/index.js diff --git a/packages/rspack/tests/cases/resolve/browser-field/webpack.config.js b/packages/rspack-test-tools/tests/cases/resolve/browser-field/webpack.config.js similarity index 100% rename from packages/rspack/tests/cases/resolve/browser-field/webpack.config.js rename to packages/rspack-test-tools/tests/cases/resolve/browser-field/webpack.config.js diff --git a/packages/rspack/tests/cases/resolve/path-with-symbol/#/@@iterator/index.js b/packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/#/@@iterator/index.js similarity index 100% rename from packages/rspack/tests/cases/resolve/path-with-symbol/#/@@iterator/index.js rename to packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/#/@@iterator/index.js diff --git a/packages/rspack/tests/cases/resolve/path-with-symbol/#/index.js b/packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/#/index.js similarity index 100% rename from packages/rspack/tests/cases/resolve/path-with-symbol/#/index.js rename to packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/#/index.js diff --git a/packages/rspack/tests/cases/resolve/path-with-symbol/_a-b-c.js b/packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/_a-b-c.js similarity index 100% rename from packages/rspack/tests/cases/resolve/path-with-symbol/_a-b-c.js rename to packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/_a-b-c.js diff --git a/packages/rspack/tests/cases/resolve/path-with-symbol/d-e_f.js b/packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/d-e_f.js similarity index 100% rename from packages/rspack/tests/cases/resolve/path-with-symbol/d-e_f.js rename to packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/d-e_f.js diff --git a/packages/rspack/tests/cases/resolve/path-with-symbol/g.js b/packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/g.js similarity index 100% rename from packages/rspack/tests/cases/resolve/path-with-symbol/g.js rename to packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/g.js diff --git a/packages/rspack/tests/cases/resolve/path-with-symbol/index.js b/packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/index.js similarity index 100% rename from packages/rspack/tests/cases/resolve/path-with-symbol/index.js rename to packages/rspack-test-tools/tests/cases/resolve/path-with-symbol/index.js diff --git a/packages/rspack/tests/cases/resolve/placeholder/[id].js b/packages/rspack-test-tools/tests/cases/resolve/placeholder/[id].js similarity index 100% rename from packages/rspack/tests/cases/resolve/placeholder/[id].js rename to packages/rspack-test-tools/tests/cases/resolve/placeholder/[id].js diff --git a/packages/rspack/tests/cases/resolve/placeholder/index.js b/packages/rspack-test-tools/tests/cases/resolve/placeholder/index.js similarity index 100% rename from packages/rspack/tests/cases/resolve/placeholder/index.js rename to packages/rspack-test-tools/tests/cases/resolve/placeholder/index.js diff --git a/packages/rspack/tests/cases/resolve/query/empty.js b/packages/rspack-test-tools/tests/cases/resolve/query/empty.js similarity index 100% rename from packages/rspack/tests/cases/resolve/query/empty.js rename to packages/rspack-test-tools/tests/cases/resolve/query/empty.js diff --git a/packages/rspack/tests/cases/resolve/query/file.js b/packages/rspack-test-tools/tests/cases/resolve/query/file.js similarity index 100% rename from packages/rspack/tests/cases/resolve/query/file.js rename to packages/rspack-test-tools/tests/cases/resolve/query/file.js diff --git a/packages/rspack/tests/cases/resolve/query/file2.js b/packages/rspack-test-tools/tests/cases/resolve/query/file2.js similarity index 100% rename from packages/rspack/tests/cases/resolve/query/file2.js rename to packages/rspack-test-tools/tests/cases/resolve/query/file2.js diff --git a/packages/rspack/tests/cases/resolve/query/index.js b/packages/rspack-test-tools/tests/cases/resolve/query/index.js similarity index 100% rename from packages/rspack/tests/cases/resolve/query/index.js rename to packages/rspack-test-tools/tests/cases/resolve/query/index.js diff --git "a/packages/rspack/tests/cases/resolve/query/\346\265\213\350\257\225.js" "b/packages/rspack-test-tools/tests/cases/resolve/query/\346\265\213\350\257\225.js" similarity index 100% rename from "packages/rspack/tests/cases/resolve/query/\346\265\213\350\257\225.js" rename to "packages/rspack-test-tools/tests/cases/resolve/query/\346\265\213\350\257\225.js" diff --git a/packages/rspack/tests/cases/runtime/require/cjs.js b/packages/rspack-test-tools/tests/cases/runtime/require/cjs.js similarity index 100% rename from packages/rspack/tests/cases/runtime/require/cjs.js rename to packages/rspack-test-tools/tests/cases/runtime/require/cjs.js diff --git a/packages/rspack/tests/cases/runtime/require/context.js b/packages/rspack-test-tools/tests/cases/runtime/require/context.js similarity index 100% rename from packages/rspack/tests/cases/runtime/require/context.js rename to packages/rspack-test-tools/tests/cases/runtime/require/context.js diff --git a/packages/rspack/tests/cases/runtime/require/error.js b/packages/rspack-test-tools/tests/cases/runtime/require/error.js similarity index 100% rename from packages/rspack/tests/cases/runtime/require/error.js rename to packages/rspack-test-tools/tests/cases/runtime/require/error.js diff --git a/packages/rspack/tests/cases/runtime/require/foo.js b/packages/rspack-test-tools/tests/cases/runtime/require/foo.js similarity index 100% rename from packages/rspack/tests/cases/runtime/require/foo.js rename to packages/rspack-test-tools/tests/cases/runtime/require/foo.js diff --git a/packages/rspack/tests/cases/runtime/require/index.js b/packages/rspack-test-tools/tests/cases/runtime/require/index.js similarity index 100% rename from packages/rspack/tests/cases/runtime/require/index.js rename to packages/rspack-test-tools/tests/cases/runtime/require/index.js diff --git a/packages/rspack/tests/cases/runtime/require/monaco.js b/packages/rspack-test-tools/tests/cases/runtime/require/monaco.js similarity index 100% rename from packages/rspack/tests/cases/runtime/require/monaco.js rename to packages/rspack-test-tools/tests/cases/runtime/require/monaco.js diff --git a/packages/rspack/tests/cases/runtime/require/typeof-require.js b/packages/rspack-test-tools/tests/cases/runtime/require/typeof-require.js similarity index 100% rename from packages/rspack/tests/cases/runtime/require/typeof-require.js rename to packages/rspack-test-tools/tests/cases/runtime/require/typeof-require.js diff --git a/packages/rspack/tests/cases/warnings/case-sensitive/B/file.js b/packages/rspack-test-tools/tests/cases/warnings/case-sensitive/B/file.js similarity index 100% rename from packages/rspack/tests/cases/warnings/case-sensitive/B/file.js rename to packages/rspack-test-tools/tests/cases/warnings/case-sensitive/B/file.js diff --git a/packages/rspack/tests/cases/warnings/case-sensitive/a.js b/packages/rspack-test-tools/tests/cases/warnings/case-sensitive/a.js similarity index 100% rename from packages/rspack/tests/cases/warnings/case-sensitive/a.js rename to packages/rspack-test-tools/tests/cases/warnings/case-sensitive/a.js diff --git a/packages/rspack/tests/cases/warnings/case-sensitive/index.js b/packages/rspack-test-tools/tests/cases/warnings/case-sensitive/index.js similarity index 100% rename from packages/rspack/tests/cases/warnings/case-sensitive/index.js rename to packages/rspack-test-tools/tests/cases/warnings/case-sensitive/index.js diff --git a/packages/rspack/tests/cases/warnings/case-sensitive/warnings.js b/packages/rspack-test-tools/tests/cases/warnings/case-sensitive/warnings.js similarity index 100% rename from packages/rspack/tests/cases/warnings/case-sensitive/warnings.js rename to packages/rspack-test-tools/tests/cases/warnings/case-sensitive/warnings.js diff --git a/packages/rspack/tests/cases/warnings/not-fully-specified/fully-specified.mjs b/packages/rspack-test-tools/tests/cases/warnings/not-fully-specified/fully-specified.mjs similarity index 100% rename from packages/rspack/tests/cases/warnings/not-fully-specified/fully-specified.mjs rename to packages/rspack-test-tools/tests/cases/warnings/not-fully-specified/fully-specified.mjs diff --git a/packages/rspack/tests/cases/warnings/not-fully-specified/index.js b/packages/rspack-test-tools/tests/cases/warnings/not-fully-specified/index.js similarity index 100% rename from packages/rspack/tests/cases/warnings/not-fully-specified/index.js rename to packages/rspack-test-tools/tests/cases/warnings/not-fully-specified/index.js diff --git a/packages/rspack/tests/cases/warnings/not-fully-specified/not-fully-specified.mjs b/packages/rspack-test-tools/tests/cases/warnings/not-fully-specified/not-fully-specified.mjs similarity index 100% rename from packages/rspack/tests/cases/warnings/not-fully-specified/not-fully-specified.mjs rename to packages/rspack-test-tools/tests/cases/warnings/not-fully-specified/not-fully-specified.mjs diff --git a/packages/rspack/tests/cases/warnings/not-fully-specified/warnings.js b/packages/rspack-test-tools/tests/cases/warnings/not-fully-specified/warnings.js similarity index 100% rename from packages/rspack/tests/cases/warnings/not-fully-specified/warnings.js rename to packages/rspack-test-tools/tests/cases/warnings/not-fully-specified/warnings.js diff --git a/packages/rspack/tests/cases/warnings/require-as-expression/index.js b/packages/rspack-test-tools/tests/cases/warnings/require-as-expression/index.js similarity index 100% rename from packages/rspack/tests/cases/warnings/require-as-expression/index.js rename to packages/rspack-test-tools/tests/cases/warnings/require-as-expression/index.js diff --git a/packages/rspack/tests/cases/warnings/require-as-expression/warnings.js b/packages/rspack-test-tools/tests/cases/warnings/require-as-expression/warnings.js similarity index 100% rename from packages/rspack/tests/cases/warnings/require-as-expression/warnings.js rename to packages/rspack-test-tools/tests/cases/warnings/require-as-expression/warnings.js diff --git a/packages/rspack/tests/cases/worker/not-fully-specified-by-default/a.js b/packages/rspack-test-tools/tests/cases/worker/not-fully-specified-by-default/a.js similarity index 100% rename from packages/rspack/tests/cases/worker/not-fully-specified-by-default/a.js rename to packages/rspack-test-tools/tests/cases/worker/not-fully-specified-by-default/a.js diff --git a/packages/rspack/tests/cases/worker/not-fully-specified-by-default/index.js b/packages/rspack-test-tools/tests/cases/worker/not-fully-specified-by-default/index.js similarity index 100% rename from packages/rspack/tests/cases/worker/not-fully-specified-by-default/index.js rename to packages/rspack-test-tools/tests/cases/worker/not-fully-specified-by-default/index.js diff --git a/packages/rspack/tests/TestCases.template.js b/packages/rspack/tests/TestCases.template.js deleted file mode 100644 index 4fb0418139a5..000000000000 --- a/packages/rspack/tests/TestCases.template.js +++ /dev/null @@ -1,547 +0,0 @@ -"use strict"; - -require("./helpers/warmup-webpack"); -const path = require("path"); -const fs = require("graceful-fs"); -const vm = require("vm"); -const { pathToFileURL, URL } = require("url"); -const rimraf = require("rimraf"); -const checkArrayExpectation = require("./checkArrayExpectation"); -const createLazyTestEnv = require("./helpers/createLazyTestEnv"); -const deprecationTracking = require("./helpers/deprecationTracking"); -const captureStdio = require("./helpers/captureStdio"); -const asModule = require("./helpers/asModule"); -const filterInfraStructureErrors = require("./helpers/infrastructureLogErrors"); - -const casesPath = path.join(__dirname, "cases"); -let categories = fs.readdirSync(casesPath); -categories = categories.map(cat => { - return { - name: cat, - tests: fs - .readdirSync(path.join(casesPath, cat)) - .filter(folder => folder.indexOf("_") < 0) - }; -}); - -const createLogger = appendTarget => { - return { - log: l => appendTarget.push(l), - debug: l => appendTarget.push(l), - trace: l => appendTarget.push(l), - info: l => appendTarget.push(l), - warn: console.warn.bind(console), - error: console.error.bind(console), - logTime: () => {}, - group: () => {}, - groupCollapsed: () => {}, - groupEnd: () => {}, - profile: () => {}, - profileEnd: () => {}, - clear: () => {}, - status: () => {} - }; -}; - -const describeCases = config => { - describe(config.name, () => { - let stderr; - beforeEach(() => { - stderr = captureStdio(process.stderr, true); - }); - afterEach(() => { - stderr.restore(); - }); - categories.forEach(category => { - describe(category.name, function () { - jest.setTimeout(20000); - - category.tests - .filter(test => { - const testDirectory = path.join(casesPath, category.name, test); - const filterPath = path.join(testDirectory, "test.filter.js"); - if (fs.existsSync(filterPath) && !require(filterPath)(config)) { - describe.skip(test, () => { - it("filtered", () => {}); - }); - return false; - } - return true; - }) - .forEach(testName => { - let infraStructureLog = []; - - describe(testName, () => { - const testDirectory = path.join( - casesPath, - category.name, - testName - ); - const outputDirectory = path.join( - __dirname, - "js", - config.name, - category.name, - testName - ); - const cacheDirectory = path.join( - __dirname, - "js/.cache", - config.name, - category.name, - testName - ); - let testConfig = {}; - const testConfigPath = path.join(testDirectory, "test.config.js"); - if (fs.existsSync(testConfigPath)) { - testConfig = require(testConfigPath); - } - const TerserPlugin = require("terser-webpack-plugin"); - const terserForTesting = new TerserPlugin({ - parallel: false - }); - let options = { - context: casesPath, - entry: "./" + category.name + "/" + testName + "/", - target: config.target || "async-node", - devtool: config.devtool, - mode: config.mode || "none", - optimization: config.mode - ? { - emitOnErrors: true, - minimizer: [terserForTesting], - ...testConfig.optimization - } - : { - removeAvailableModules: true, - removeEmptyChunks: true, - mergeDuplicateChunks: true, - // CHANGE: rspack does not support `flagIncludedChunks` yet. - // flagIncludedChunks: true, - sideEffects: true, - providedExports: true, - usedExports: true, - mangleExports: true, - // CHANGE: rspack does not support `emitOnErrors` yet. - // emitOnErrors: true, - concatenateModules: - !!testConfig?.optimization?.concatenateModules, - innerGraph: true, - // CHANGE: size is not supported yet - // moduleIds: "size", - // chunkIds: "size", - moduleIds: "named", - chunkIds: "named", - minimizer: [terserForTesting], - ...config.optimization - }, - // CHANGE: rspack does not support `performance` yet. - // performance: { - // hints: false - // }, - node: { - __dirname: "mock", - __filename: "mock" - }, - cache: config.cache && { - cacheDirectory, - ...config.cache - }, - output: { - // CHANGE: rspack does not support `pathinfo` yet. - // pathinfo: "verbose", - path: outputDirectory, - filename: config.module ? "bundle.mjs" : "bundle.js" - }, - resolve: { - modules: ["web_modules", "node_modules"], - mainFields: [ - "webpack", - "browser", - "web", - "browserify", - "main" - ], - aliasFields: ["browser"], - extensions: [".webpack.js", ".web.js", ".js", ".json"] - }, - resolveLoader: { - modules: [ - "web_loaders", - "web_modules", - "node_loaders", - "node_modules" - ], - mainFields: ["webpackLoader", "webLoader", "loader", "main"], - extensions: [ - ".webpack-loader.js", - ".web-loader.js", - ".loader.js", - ".js" - ] - }, - module: { - rules: [ - { - test: /\.coffee$/, - loader: "coffee-loader" - }, - { - test: /\.pug/, - loader: "pug-loader" - }, - { - test: /\.wat$/i, - loader: "wast-loader", - type: "webassembly/async" - } - ] - }, - plugins: (config.plugins || []) - .concat(testConfig.plugins || []) - .concat(function () { - this.hooks.compilation.tap("TestCasesTest", compilation => { - [ - // CHANGE: the follwing hooks are not supported yet, so comment it out - // "optimize", - // "optimizeModules", - // "optimizeChunks", - // "afterOptimizeTree", - // "afterOptimizeAssets" - ].forEach(hook => { - compilation.hooks[hook].tap("TestCasesTest", () => - compilation.checkConstraints() - ); - }); - }); - }), - experiments: { - asyncWebAssembly: true, - topLevelAwait: true, - // CHANGE: rspack does not support `backCompat` yet. - // backCompat: false, - // CHANGE: Rspack enables `css` by default. - // Turning off here to fallback to webpack's default css processing logic. - - rspackFuture: testConfig?.experiments?.rspackFuture ?? { - newTreeshaking: true - }, - css: false, - ...(config.module ? { outputModule: true } : {}) - }, - infrastructureLogging: config.cache && { - debug: true, - console: createLogger(infraStructureLog) - } - }; - const cleanups = []; - afterAll(() => { - options = undefined; - testConfig = undefined; - for (const fn of cleanups) fn(); - }); - beforeAll(done => { - rimraf(cacheDirectory, done); - }); - if (config.cache) { - it( - `${testName} should pre-compile to fill disk cache (1st)`, - done => { - const oldPath = options.output.path; - options.output.path = path.join( - options.output.path, - "cache1" - ); - infraStructureLog.length = 0; - const deprecationTracker = deprecationTracking.start(); - const webpack = require("@rspack/core").rspack; - webpack(options, err => { - deprecationTracker(); - options.output.path = oldPath; - if (err) return done(err); - const infrastructureLogErrors = - filterInfraStructureErrors(infraStructureLog, { - run: 1, - options - }); - if ( - infrastructureLogErrors.length && - checkArrayExpectation( - testDirectory, - { infrastructureLogs: infrastructureLogErrors }, - "infrastructureLog", - "infrastructure-log", - "InfrastructureLog", - done - ) - ) { - return; - } - done(); - }); - }, - testConfig.timeout || 60000 - ); - it( - `${testName} should pre-compile to fill disk cache (2nd)`, - done => { - const oldPath = options.output.path; - options.output.path = path.join( - options.output.path, - "cache2" - ); - infraStructureLog.length = 0; - const deprecationTracker = deprecationTracking.start(); - const webpack = require("@rspack/core").rspack; - webpack(options, err => { - deprecationTracker(); - options.output.path = oldPath; - if (err) return done(err); - const infrastructureLogErrors = - filterInfraStructureErrors(infraStructureLog, { - run: 2, - options - }); - if ( - infrastructureLogErrors.length && - checkArrayExpectation( - testDirectory, - { infrastructureLogs: infrastructureLogErrors }, - "infrastructureLog", - "infrastructure-log", - "InfrastructureLog", - done - ) - ) { - return; - } - done(); - }); - }, - testConfig.cachedTimeout || testConfig.timeout || 10000 - ); - } - it( - testName + " should compile", - done => { - infraStructureLog.length = 0; - const webpack = require(".."); - const compiler = webpack(options); - const run = () => { - const deprecationTracker = deprecationTracking.start(); - compiler.run((err, stats) => { - const deprecations = deprecationTracker(); - if (err) return done(err); - const infrastructureLogErrors = - filterInfraStructureErrors(infraStructureLog, { - run: 3, - options - }); - if ( - infrastructureLogErrors.length && - checkArrayExpectation( - testDirectory, - { infrastructureLogs: infrastructureLogErrors }, - "infrastructureLog", - "infrastructure-log", - "InfrastructureLog", - done - ) - ) { - return; - } - compiler.close(err => { - if (err) return done(err); - const statOptions = { - preset: "verbose", - colors: false, - modules: true, - reasonsSpace: 1000 - }; - fs.mkdirSync(outputDirectory, { recursive: true }); - fs.writeFileSync( - path.join(outputDirectory, "stats.txt"), - stats.toString(statOptions), - "utf-8" - ); - const jsonStats = stats.toJson({ - errorDetails: true, - modules: false, - assets: false, - chunks: false - }); - if ( - checkArrayExpectation( - testDirectory, - jsonStats, - "error", - "Error", - done - ) - ) { - return; - } - if ( - checkArrayExpectation( - testDirectory, - jsonStats, - "warning", - "Warning", - done - ) - ) { - return; - } - const infrastructureLogging = stderr.toString(); - if (infrastructureLogging) { - done( - new Error( - "Errors/Warnings during build:\n" + - infrastructureLogging - ) - ); - } - - expect(deprecations).toEqual(config.deprecations || []); - - Promise.resolve().then(done); - }); - }); - }; - if (config.cache) { - // pre-compile to fill memory cache - const deprecationTracker = deprecationTracking.start(); - compiler.run(err => { - deprecationTracker(); - if (err) return done(err); - run(); - }); - } else { - run(); - } - }, - testConfig.cachedTimeout || - testConfig.timeout || - (config.cache ? 20000 : 60000) - ); - - it( - testName + " should load the compiled tests", - done => { - const esmContext = vm.createContext({ - it: _it, - expect, - process, - global, - URL, - Buffer, - setTimeout, - setImmediate, - nsObj: function (m) { - Object.defineProperty(m, Symbol.toStringTag, { - value: "Module" - }); - return m; - } - }); - cleanups.push(() => (esmContext.it = undefined)); - function _require(module, esmMode) { - if (module.startsWith("./")) { - const p = path.join(outputDirectory, module); - const content = fs.readFileSync(p, "utf-8"); - if (p.endsWith(".mjs")) { - let esm; - try { - esm = new vm.SourceTextModule(content, { - identifier: p, - context: esmContext, - initializeImportMeta: (meta, module) => { - meta.url = pathToFileURL(p).href; - }, - importModuleDynamically: async ( - specifier, - module - ) => { - const result = await _require( - specifier, - "evaluated" - ); - return await asModule(result, module.context); - } - }); - cleanups.push(() => (esmContext.it = undefined)); - } catch (e) { - console.log(e); - e.message += `\nwhile parsing ${p}`; - throw e; - } - if (esmMode === "unlinked") return esm; - return (async () => { - await esm.link(async (specifier, module) => { - return await asModule( - await _require(specifier, "unlinked"), - module.context, - true - ); - }); - // node.js 10 needs instantiate - if (esm.instantiate) esm.instantiate(); - await esm.evaluate(); - if (esmMode === "evaluated") return esm; - const ns = esm.namespace; - return ns.default && ns.default instanceof Promise - ? ns.default - : ns; - })(); - } else { - const fn = vm.runInThisContext( - "(function(require, module, exports, __dirname, __filename, it, expect) {" + - "global.expect = expect;" + - 'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + - content + - "\n})", - p - ); - const m = { - exports: {}, - webpackTestSuiteModule: true - }; - fn.call( - m.exports, - _require, - m, - m.exports, - outputDirectory, - p, - _it, - expect - ); - return m.exports; - } - } else return require(module); - } - _require.webpackTestSuiteRequire = true; - Promise.resolve() - .then(() => _require("./" + options.output.filename)) - .then(() => { - if (getNumberOfTests() === 0) - return done( - new Error("No tests exported by test case") - ); - done(); - }, done); - }, - 10000 - ); - - const { it: _it, getNumberOfTests } = createLazyTestEnv( - testConfig.timeout || 10000 - ); - }); - }); - }); - }); - }); -}; - -exports.describeCases = describeCases; diff --git a/packages/rspack/tests/TestCasesNormal.basictest.js b/packages/rspack/tests/TestCasesNormal.basictest.js deleted file mode 100644 index 9d975ad2882b..000000000000 --- a/packages/rspack/tests/TestCasesNormal.basictest.js +++ /dev/null @@ -1,7 +0,0 @@ -const { describeCases } = require("./TestCases.template"); - -describe("TestCases", () => { - describeCases({ - name: "normal" - }); -}); diff --git a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/index.js b/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/index.js deleted file mode 100644 index 79dfd09dd571..000000000000 --- a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/axios'); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/adapters/http.js b/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/adapters/http.js deleted file mode 100644 index 0f279f0615e8..000000000000 --- a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/adapters/http.js +++ /dev/null @@ -1,3 +0,0 @@ -const inexists = require('./in-exists'); -module.exports = inexists; -throw Error("should not resolve this file when enabled browser_field") diff --git a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/adapters/xhr.js b/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/adapters/xhr.js deleted file mode 100644 index 24bd4922fd11..000000000000 --- a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/adapters/xhr.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'xhr'; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/axios.js b/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/axios.js deleted file mode 100644 index 7ae5bcf7a103..000000000000 --- a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/axios.js +++ /dev/null @@ -1,4 +0,0 @@ -var defaults = require('./defaults'); -var axios = defaults; -module.exports = axios; -module.exports.default = axios; diff --git a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/defaults/index.js b/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/defaults/index.js deleted file mode 100644 index 842746ca7426..000000000000 --- a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/lib/defaults/index.js +++ /dev/null @@ -1,17 +0,0 @@ -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = require('../adapters/xhr'); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = require('../adapters/http'); - } - return adapter; -} - -var defaults = { - adapter: getDefaultAdapter(), -} - -module.exports = defaults; diff --git a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/package.json b/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/package.json deleted file mode 100644 index 02f3c4df381b..000000000000 --- a/packages/rspack/tests/cases/resolve/axios-0.27.2/node_modules/axios-demo/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "axios-demo", - "version": "0.27.2", - "description": "Promise based HTTP client for the browser and node.js", - "main": "index.js", - "browser": { - "./lib/adapters/http.js": "./lib/adapters/xhr.js", - "./lib/defaults/env/FormData.js": "./lib/helpers/null.js" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/file.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/file.js deleted file mode 100644 index 3d566b49076e..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/file.js +++ /dev/null @@ -1 +0,0 @@ -throw new Error("Fail"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/index.js deleted file mode 100644 index 5fdf0a731ce9..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.module = require("wrong-module"); -exports.file = require("ignoring-module/file"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/package.json deleted file mode 100644 index 8d49b9a68bb5..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/ignoring-module/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "browser": { - "wrong-module": false, - "./file.js": false - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/new-module/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/new-module/index.js deleted file mode 100644 index a6c8c8dfc54b..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/new-module/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "new-module"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/new-module/inner.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/new-module/inner.js deleted file mode 100644 index 899e86f9d9c5..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/new-module/inner.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "new-module/inner"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/a.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/a.js deleted file mode 100644 index 01cd3e7139ec..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/a.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "a"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/b.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/b.js deleted file mode 100644 index fba3204fe661..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/b.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "b"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/c.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/c.js deleted file mode 100644 index ebaf7584d34b..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/c.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "c"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/d.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/d.js deleted file mode 100644 index 76e86216bc4c..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/d.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "d"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/package.json deleted file mode 100644 index 8330ebaf92c8..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-file/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "browser": { - "a.js": "./a", - "./b.js": "./b", - "c.js": "./d.js", - "./d.js": "./c.js" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-module/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-module/index.js deleted file mode 100644 index 51226ed76fa8..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-module/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("new-module"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-module/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-module/package.json deleted file mode 100644 index 57eac1506f16..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/recursive-module/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "new-module": "new-module" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/file.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/file.js deleted file mode 100644 index 764d9cb9e4f0..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/file.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "file"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/index.js deleted file mode 100644 index dd8c24508fb3..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("replacing-file1/file"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/new-file.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/new-file.js deleted file mode 100644 index abdc855fa81b..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/new-file.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "new-file"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/package.json deleted file mode 100644 index c71d836ff68e..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file1/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "./file.js": "./new-file.js" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/file.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/file.js deleted file mode 100644 index 764d9cb9e4f0..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/file.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "file"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/index.js deleted file mode 100644 index d1e170620b87..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("replacing-file2/file"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/package.json deleted file mode 100644 index 1e99b7d80e40..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file2/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "./file.js": "new-module" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/file.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/file.js deleted file mode 100644 index 764d9cb9e4f0..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/file.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "file"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/index.js deleted file mode 100644 index f546aa4afcd6..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("replacing-file3/file"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/package.json deleted file mode 100644 index a6aedbc9e970..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "./file.js": "new-module/inner" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/file.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/file.js deleted file mode 100644 index 764d9cb9e4f0..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/file.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "file"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/index.js deleted file mode 100644 index 648007d544e3..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("replacing-file4/dir/file"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/new-file.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/new-file.js deleted file mode 100644 index abdc855fa81b..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/dir/new-file.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "new-file"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/index.js deleted file mode 100644 index 9c6d3b777912..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("replacing-file4/dir"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/package.json deleted file mode 100644 index d7009d073819..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-file4/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "./dir/file.js": "./dir/new-file" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module1/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module1/index.js deleted file mode 100644 index 1ec389e8b624..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module1/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("wrong-module"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module1/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module1/package.json deleted file mode 100644 index 221f3e271b91..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module1/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "wrong-module": "new-module" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module2/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module2/index.js deleted file mode 100644 index 1ec389e8b624..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module2/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("wrong-module"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module2/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module2/package.json deleted file mode 100644 index e5d73548a299..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module2/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "wrong-module": "new-module/inner" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module3/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module3/index.js deleted file mode 100644 index 51226ed76fa8..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module3/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("new-module"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module3/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module3/package.json deleted file mode 100644 index 29eb170b4161..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "new-module": "new-module/inner" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/index.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/index.js deleted file mode 100644 index 1ec389e8b624..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("wrong-module"); \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/module.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/module.js deleted file mode 100644 index 5563af446d16..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/module.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "replacing-module4/module"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/package.json b/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/package.json deleted file mode 100644 index b65fb7188cef..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/replacing-module4/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "browser": { - "wrong-module": "./module.js" - } -} \ No newline at end of file diff --git a/packages/rspack/tests/cases/resolve/browser-field/node_modules/wrong-module.js b/packages/rspack/tests/cases/resolve/browser-field/node_modules/wrong-module.js deleted file mode 100644 index 6c1246713122..000000000000 --- a/packages/rspack/tests/cases/resolve/browser-field/node_modules/wrong-module.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "wrong-module"; \ No newline at end of file diff --git a/packages/rspack/tests/cases/warnings/case-sensitive/A.js b/packages/rspack/tests/cases/warnings/case-sensitive/A.js deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/rspack/tests/cases/warnings/case-sensitive/b/file.js b/packages/rspack/tests/cases/warnings/case-sensitive/b/file.js deleted file mode 100644 index e69de29bb2d1..000000000000