diff --git a/packages/rspack-test-tools/jest.config.compat.js b/packages/rspack-test-tools/jest.config.compat.js index e67f33b1780..58ec1b9e3b3 100644 --- a/packages/rspack-test-tools/jest.config.compat.js +++ b/packages/rspack-test-tools/jest.config.compat.js @@ -10,6 +10,9 @@ module.exports = { "/tests/Stats.unittest.js", "/tests/TreeShaking.test.js", "/tests/ConfigTestCases.basictest.js", - "/tests/TestCasesNormal.basictest.js" + "/tests/TestCasesNormal.basictest.js", + "/tests/HotTestCasesWeb.test.js", + "/tests/HotTestCasesNode.test.js", + "/tests/HotTestCasesWebWorker.test.js" ] }; diff --git a/packages/rspack-test-tools/jest.config.legacy.js b/packages/rspack-test-tools/jest.config.legacy.js index c0ef5085998..205cbd665ea 100644 --- a/packages/rspack-test-tools/jest.config.legacy.js +++ b/packages/rspack-test-tools/jest.config.legacy.js @@ -13,6 +13,9 @@ module.exports = { "HotTestStepWeb.test.js", "ConfigTestCases.basictest.js", "TestCasesNormal.basictest.js", + "HotTestCasesWeb.test.js", + "HotTestCasesWebWorker.test.js", + "HotTestCasesNode.test.js", ".difftest.js" ] }; diff --git a/packages/rspack-test-tools/src/helper/legacy/supportsWorker.js b/packages/rspack-test-tools/src/helper/legacy/supportsWorker.js new file mode 100644 index 00000000000..58e369a8875 --- /dev/null +++ b/packages/rspack-test-tools/src/helper/legacy/supportsWorker.js @@ -0,0 +1,15 @@ +// @ts-nocheck +const nodeVersion = process.versions.node.split(".").map(Number); + +module.exports = function supportsWorker() { + // Verify that in the current node version new Worker() accepts URL as the first parameter: + // https://nodejs.org/api/worker_threads.html#worker_threads_new_worker_filename_options + if (nodeVersion[0] >= 14) { + return true; + } else if (nodeVersion[0] === 13 && nodeVersion[1] >= 12) { + return true; + } else if (nodeVersion[0] === 12 && nodeVersion[1] >= 17) { + return true; + } + return false; +}; diff --git a/packages/rspack-test-tools/src/helper/util/expectWarningFactory.js b/packages/rspack-test-tools/src/helper/util/expectWarningFactory.js new file mode 100644 index 00000000000..5522596f35f --- /dev/null +++ b/packages/rspack-test-tools/src/helper/util/expectWarningFactory.js @@ -0,0 +1,24 @@ +// @ts-nocheck +module.exports = () => { + let warnings = []; + let oldWarn; + + beforeEach(done => { + oldWarn = console.warn; + console.warn = m => warnings.push(m); + done(); + }); + + afterEach(done => { + expectWarning(); + console.warn = oldWarn; + done(); + }); + + const expectWarning = (...regexp) => { + expect(warnings).toEqual(regexp.map(r => expect.stringMatching(r))); + warnings.length = 0; + }; + + return expectWarning; +}; diff --git a/packages/rspack-test-tools/tests/HotTestCasesNode.test.js b/packages/rspack-test-tools/tests/HotTestCasesNode.test.js index 2bffae21312..4b6c6959814 100644 --- a/packages/rspack-test-tools/tests/HotTestCasesNode.test.js +++ b/packages/rspack-test-tools/tests/HotTestCasesNode.test.js @@ -2,8 +2,8 @@ const path = require("path"); const { describeByWalk, createHotCase } = require(".."); const NAME = "HotTestCases"; -const caseDir = path.resolve(__dirname, "../../rspack/tests/hotCases"); -const distDir = path.resolve(__dirname, `../../rspack/tests/js/hot-cases-node`); +const caseDir = path.resolve(__dirname, "./hotCases"); +const distDir = path.resolve(__dirname, `./js/hot-cases-node`); describeByWalk(NAME, caseDir, distDir, (name, src, dist) => { createHotCase(name, src, dist, "async-node"); diff --git a/packages/rspack-test-tools/tests/HotTestCasesWeb.test.js b/packages/rspack-test-tools/tests/HotTestCasesWeb.test.js index 3f6d50da486..c612ab52e1c 100644 --- a/packages/rspack-test-tools/tests/HotTestCasesWeb.test.js +++ b/packages/rspack-test-tools/tests/HotTestCasesWeb.test.js @@ -2,8 +2,8 @@ const path = require("path"); const { describeByWalk, createHotCase } = require(".."); const NAME = "HotTestCases"; -const caseDir = path.resolve(__dirname, "../../rspack/tests/hotCases"); -const distDir = path.resolve(__dirname, `../../rspack/tests/js/hot-cases-web`); +const caseDir = path.resolve(__dirname, "./hotCases"); +const distDir = path.resolve(__dirname, `./js/hot-cases-web`); describeByWalk(NAME, caseDir, distDir, (name, src, dist) => { createHotCase(name, src, dist, "web"); diff --git a/packages/rspack-test-tools/tests/HotTestCasesWebWorker.test.js b/packages/rspack-test-tools/tests/HotTestCasesWebWorker.test.js index b96cda95c51..9b1cac88b0d 100644 --- a/packages/rspack-test-tools/tests/HotTestCasesWebWorker.test.js +++ b/packages/rspack-test-tools/tests/HotTestCasesWebWorker.test.js @@ -2,11 +2,8 @@ const path = require("path"); const { describeByWalk, createHotCase } = require(".."); const NAME = "HotTestCases"; -const caseDir = path.resolve(__dirname, "../../rspack/tests/hotCases"); -const distDir = path.resolve( - __dirname, - `../../rspack/tests/js/hot-cases-worker` -); +const caseDir = path.resolve(__dirname, "./hotCases"); +const distDir = path.resolve(__dirname, `./js/hot-cases-worker`); describeByWalk(NAME, caseDir, distDir, (name, src, dist) => { createHotCase(name, src, dist, "webworker"); diff --git a/packages/rspack-test-tools/tests/HotTestStepWeb.test.js b/packages/rspack-test-tools/tests/HotTestStepWeb.test.js index d176d65cde8..1d76fe12054 100644 --- a/packages/rspack-test-tools/tests/HotTestStepWeb.test.js +++ b/packages/rspack-test-tools/tests/HotTestStepWeb.test.js @@ -2,11 +2,8 @@ const path = require("path"); const { describeByWalk, createHotStepCase } = require("../dist"); const NAME = "HotStepTestCasesNode"; -const caseDir = path.resolve(__dirname, "../../rspack/tests/hotCases"); -const distDir = path.resolve( - __dirname, - `../../rspack/tests/js/hot-step-cases-web` -); +const caseDir = path.resolve(__dirname, "./hotCases"); +const distDir = path.resolve(__dirname, `./js/hot-step-cases-web`); process.env["RSPACK_HOT_TEST"] = "true"; diff --git a/packages/rspack/tests/cases/context/context-module-dynamic-import-tagged-template/warnings.js b/packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-tagged-template/warnings.js similarity index 100% rename from packages/rspack/tests/cases/context/context-module-dynamic-import-tagged-template/warnings.js rename to packages/rspack-test-tools/tests/cases/context/context-module-dynamic-import-tagged-template/warnings.js diff --git a/packages/rspack/tests/hotCases/asset/parser-and-generator-states/changed-file.js b/packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/asset/parser-and-generator-states/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/changed-file.js diff --git a/packages/rspack/tests/hotCases/asset/parser-and-generator-states/file.js b/packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/file.js similarity index 100% rename from packages/rspack/tests/hotCases/asset/parser-and-generator-states/file.js rename to packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/file.js diff --git a/packages/rspack/tests/hotCases/asset/parser-and-generator-states/index.js b/packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/index.js similarity index 100% rename from packages/rspack/tests/hotCases/asset/parser-and-generator-states/index.js rename to packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/index.js diff --git a/packages/rspack/tests/hotCases/asset/parser-and-generator-states/logo.svg b/packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/logo.svg similarity index 100% rename from packages/rspack/tests/hotCases/asset/parser-and-generator-states/logo.svg rename to packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/logo.svg diff --git a/packages/rspack/tests/hotCases/asset/parser-and-generator-states/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/asset/parser-and-generator-states/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/asset/parser-and-generator-states/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/asset/parser-and-generator-states/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/asset/parser-and-generator-states/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/asset/parser-and-generator-states/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/asset/parser-and-generator-states/webpack.config.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/changed-file.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/changed-file.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/chunk.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/chunk.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/chunk.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/chunk.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/chunk2.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/chunk2.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/chunk2.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/chunk2.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/file.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/file.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/index.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import-webpackhot/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import-webpackhot/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import/changed-file.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/changed-file.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import/chunk.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/chunk.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import/chunk.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/chunk.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import/chunk2.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/chunk2.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import/chunk2.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/chunk2.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import/file.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import/file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/file.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/index.js diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/accept-system-import/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/accept-system-import/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/accept-system-import/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/asset/changed-file.js b/packages/rspack-test-tools/tests/hotCases/chunk/asset/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/changed-file.js diff --git a/packages/rspack/tests/hotCases/chunk/asset/file.js b/packages/rspack-test-tools/tests/hotCases/chunk/asset/file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/file.js diff --git a/packages/rspack/tests/hotCases/chunk/asset/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/asset/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/index.js diff --git a/packages/rspack/tests/hotCases/chunk/asset/raw.png b/packages/rspack-test-tools/tests/hotCases/chunk/asset/raw.png similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/raw.png rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/raw.png diff --git a/packages/rspack/tests/hotCases/chunk/asset/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/asset/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/asset/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/asset/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/asset/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/asset/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/asset/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/asset/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/asset/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/chunk/asset/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/asset/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/chunk/asset/webpack.config.js diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/changed-file.js b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/changed-file.js diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/chunk.js b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/chunk.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/chunk.js rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/chunk.js diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/file.js b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/file.js diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/index.js diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/node_modules/react.js b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/node_modules/react.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/node_modules/react.js rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/node_modules/react.js diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/node_modules/vue.js b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/node_modules/vue.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/node_modules/vue.js rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/node_modules/vue.js diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/chunk/ensure-chunk-change-to-promise-all/webpack.config.js diff --git a/packages/rspack/tests/hotCases/chunk/issue-4476/changed-file.js b/packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/issue-4476/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/changed-file.js diff --git a/packages/rspack/tests/hotCases/chunk/issue-4476/file.js b/packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/issue-4476/file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/file.js diff --git a/packages/rspack/tests/hotCases/chunk/issue-4476/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/issue-4476/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/index.js diff --git a/packages/rspack/tests/hotCases/chunk/issue-4476/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/issue-4476/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/issue-4476/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/issue-4476/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/chunk/issue-4476/webpack.config.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/a/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/a/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/a/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/a/index.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/b/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/b/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/b/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/b/index.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/changed-file.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/changed-file.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/file.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/file.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/main/async.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/main/async.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/main/async.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/main/async.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/main/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/main/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/main/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/main/index.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk-single-runtime/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk-single-runtime/webpack.config.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/a/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/a/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/a/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/a/index.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/b/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/b/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/b/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/b/index.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/changed-file.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/changed-file.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/file.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/file.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/file.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/file.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/main/index.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/main/index.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/main/index.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/main/index.js diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/chunk/multi-chunk/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/chunk/multi-chunk/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/chunk/multi-chunk/webpack.config.js diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/changed-file.js b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/changed-file.js diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/index.js b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/index.js similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/index.js rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/index.js diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/module.js b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/module.js similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/module.js rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/module.js diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept-webpackhot/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept-webpackhot/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept/changed-file.js b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/changed-file.js diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept/index.js b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/index.js similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept/index.js rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/index.js diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept/module.js b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/module.js similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept/module.js rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/module.js diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/code-generation/this-in-accept/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/code-generation/this-in-accept/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/code-generation/this-in-accept/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/context/request-position/changed-file.js b/packages/rspack-test-tools/tests/hotCases/context/request-position/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/context/request-position/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/context/request-position/changed-file.js diff --git a/packages/rspack/tests/hotCases/context/request-position/file.js b/packages/rspack-test-tools/tests/hotCases/context/request-position/file.js similarity index 100% rename from packages/rspack/tests/hotCases/context/request-position/file.js rename to packages/rspack-test-tools/tests/hotCases/context/request-position/file.js diff --git a/packages/rspack/tests/hotCases/context/request-position/index.js b/packages/rspack-test-tools/tests/hotCases/context/request-position/index.js similarity index 100% rename from packages/rspack/tests/hotCases/context/request-position/index.js rename to packages/rspack-test-tools/tests/hotCases/context/request-position/index.js diff --git a/packages/rspack/tests/hotCases/context/request-position/lib/a.js b/packages/rspack-test-tools/tests/hotCases/context/request-position/lib/a.js similarity index 100% rename from packages/rspack/tests/hotCases/context/request-position/lib/a.js rename to packages/rspack-test-tools/tests/hotCases/context/request-position/lib/a.js diff --git a/packages/rspack/tests/hotCases/context/request-position/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/context/request-position/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/context/request-position/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/context/request-position/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/context/request-position/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/context/request-position/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/context/request-position/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/context/request-position/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/css/css-loading-unique-name/changed-file.js b/packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/css/css-loading-unique-name/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/changed-file.js diff --git a/packages/rspack/tests/hotCases/css/css-loading-unique-name/index.css b/packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/index.css similarity index 100% rename from packages/rspack/tests/hotCases/css/css-loading-unique-name/index.css rename to packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/index.css diff --git a/packages/rspack/tests/hotCases/css/css-loading-unique-name/index.js b/packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/index.js similarity index 100% rename from packages/rspack/tests/hotCases/css/css-loading-unique-name/index.js rename to packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/index.js diff --git a/packages/rspack/tests/hotCases/css/css-loading-unique-name/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/css/css-loading-unique-name/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/css/css-loading-unique-name/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/css/css-loading-unique-name/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/css/css-loading-unique-name/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/css/css-loading-unique-name/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/css/css-loading-unique-name/webpack.config.js diff --git a/packages/rspack/tests/hotCases/css/css-modules/changed-file.js b/packages/rspack-test-tools/tests/hotCases/css/css-modules/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/css/css-modules/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/css/css-modules/changed-file.js diff --git a/packages/rspack/tests/hotCases/css/css-modules/index.js b/packages/rspack-test-tools/tests/hotCases/css/css-modules/index.js similarity index 100% rename from packages/rspack/tests/hotCases/css/css-modules/index.js rename to packages/rspack-test-tools/tests/hotCases/css/css-modules/index.js diff --git a/packages/rspack/tests/hotCases/css/css-modules/index.module.css b/packages/rspack-test-tools/tests/hotCases/css/css-modules/index.module.css similarity index 100% rename from packages/rspack/tests/hotCases/css/css-modules/index.module.css rename to packages/rspack-test-tools/tests/hotCases/css/css-modules/index.module.css diff --git a/packages/rspack/tests/hotCases/css/css-modules/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/css/css-modules/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/css/css-modules/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/css/css-modules/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/css/css-modules/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/css/css-modules/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/css/css-modules/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/css/css-modules/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/css/css-modules/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/css/css-modules/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/css/css-modules/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/css/css-modules/webpack.config.js diff --git a/packages/rspack/tests/hotCases/css/css/changed-file.js b/packages/rspack-test-tools/tests/hotCases/css/css/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/css/css/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/css/css/changed-file.js diff --git a/packages/rspack/tests/hotCases/css/css/index.css b/packages/rspack-test-tools/tests/hotCases/css/css/index.css similarity index 100% rename from packages/rspack/tests/hotCases/css/css/index.css rename to packages/rspack-test-tools/tests/hotCases/css/css/index.css diff --git a/packages/rspack/tests/hotCases/css/css/index.js b/packages/rspack-test-tools/tests/hotCases/css/css/index.js similarity index 100% rename from packages/rspack/tests/hotCases/css/css/index.js rename to packages/rspack-test-tools/tests/hotCases/css/css/index.js diff --git a/packages/rspack/tests/hotCases/css/css/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/css/css/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/css/css/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/css/css/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/css/css/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/css/css/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/css/css/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/css/css/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/css/parser-and-generator-states/changed-file.js b/packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/css/parser-and-generator-states/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/changed-file.js diff --git a/packages/rspack/tests/hotCases/css/parser-and-generator-states/index.js b/packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/index.js similarity index 100% rename from packages/rspack/tests/hotCases/css/parser-and-generator-states/index.js rename to packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/index.js diff --git a/packages/rspack/tests/hotCases/css/parser-and-generator-states/index.module.css b/packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/index.module.css similarity index 100% rename from packages/rspack/tests/hotCases/css/parser-and-generator-states/index.module.css rename to packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/index.module.css diff --git a/packages/rspack/tests/hotCases/css/parser-and-generator-states/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/css/parser-and-generator-states/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/css/parser-and-generator-states/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/css/parser-and-generator-states/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/css/parser-and-generator-states/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/css/parser-and-generator-states/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/css/parser-and-generator-states/webpack.config.js diff --git a/packages/rspack/tests/hotCases/determinism/issue-10174/changed-file.js b/packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/determinism/issue-10174/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/changed-file.js diff --git a/packages/rspack/tests/hotCases/determinism/issue-10174/deps/a.js b/packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/deps/a.js similarity index 100% rename from packages/rspack/tests/hotCases/determinism/issue-10174/deps/a.js rename to packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/deps/a.js diff --git a/packages/rspack/tests/hotCases/determinism/issue-10174/deps/b.js b/packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/deps/b.js similarity index 100% rename from packages/rspack/tests/hotCases/determinism/issue-10174/deps/b.js rename to packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/deps/b.js diff --git a/packages/rspack/tests/hotCases/determinism/issue-10174/deps/c.js b/packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/deps/c.js similarity index 100% rename from packages/rspack/tests/hotCases/determinism/issue-10174/deps/c.js rename to packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/deps/c.js diff --git a/packages/rspack/tests/hotCases/determinism/issue-10174/hot.js b/packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/hot.js similarity index 100% rename from packages/rspack/tests/hotCases/determinism/issue-10174/hot.js rename to packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/hot.js diff --git a/packages/rspack/tests/hotCases/determinism/issue-10174/index.js b/packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/index.js similarity index 100% rename from packages/rspack/tests/hotCases/determinism/issue-10174/index.js rename to packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/index.js diff --git a/packages/rspack/tests/hotCases/determinism/issue-10174/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/determinism/issue-10174/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/determinism/issue-10174/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/determinism/issue-10174/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/determinism/issue-10174/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/changed-file.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/changed-file.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/chunk1.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/chunk1.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/chunk1.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/chunk1.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/chunk2.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/chunk2.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/chunk2.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/chunk2.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/index.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/index.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/index.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/index.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/module.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/module.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/module.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/module.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/shared.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/shared.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/shared.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/shared.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared-in-other-runtime/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/changed-file.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/changed-file.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/chunk1.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/chunk1.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/chunk1.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/chunk1.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/chunk2.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/chunk2.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/chunk2.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/chunk2.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/index.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/index.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/index.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/index.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/module.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/module.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/module.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/module.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/shared.js b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/shared.js similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/shared.js rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/shared.js diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/disposing/remove-chunk-with-shared/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/disposing/remove-chunk-with-shared/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/decline-webpackhot/a.js b/packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/a.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline-webpackhot/a.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/a.js diff --git a/packages/rspack/tests/hotCases/errors/decline-webpackhot/b.js b/packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/b.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline-webpackhot/b.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/b.js diff --git a/packages/rspack/tests/hotCases/errors/decline-webpackhot/c.js b/packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/c.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline-webpackhot/c.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/c.js diff --git a/packages/rspack/tests/hotCases/errors/decline-webpackhot/changed-file.js b/packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline-webpackhot/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/changed-file.js diff --git a/packages/rspack/tests/hotCases/errors/decline-webpackhot/index.js b/packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/index.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline-webpackhot/index.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/index.js diff --git a/packages/rspack/tests/hotCases/errors/decline-webpackhot/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline-webpackhot/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/decline-webpackhot/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline-webpackhot/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/decline-webpackhot/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/decline/a.js b/packages/rspack-test-tools/tests/hotCases/errors/decline/a.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline/a.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline/a.js diff --git a/packages/rspack/tests/hotCases/errors/decline/b.js b/packages/rspack-test-tools/tests/hotCases/errors/decline/b.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline/b.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline/b.js diff --git a/packages/rspack/tests/hotCases/errors/decline/c.js b/packages/rspack-test-tools/tests/hotCases/errors/decline/c.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline/c.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline/c.js diff --git a/packages/rspack/tests/hotCases/errors/decline/changed-file.js b/packages/rspack-test-tools/tests/hotCases/errors/decline/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline/changed-file.js diff --git a/packages/rspack/tests/hotCases/errors/decline/index.js b/packages/rspack-test-tools/tests/hotCases/errors/decline/index.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline/index.js rename to packages/rspack-test-tools/tests/hotCases/errors/decline/index.js diff --git a/packages/rspack/tests/hotCases/errors/decline/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/decline/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/decline/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/decline/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/decline/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/decline/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/decline/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/events/a.js b/packages/rspack-test-tools/tests/hotCases/errors/events/a.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/a.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/a.js diff --git a/packages/rspack/tests/hotCases/errors/events/b.js b/packages/rspack-test-tools/tests/hotCases/errors/events/b.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/b.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/b.js diff --git a/packages/rspack/tests/hotCases/errors/events/c.js b/packages/rspack-test-tools/tests/hotCases/errors/events/c.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/c.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/c.js diff --git a/packages/rspack/tests/hotCases/errors/events/changed-file.js b/packages/rspack-test-tools/tests/hotCases/errors/events/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/changed-file.js diff --git a/packages/rspack/tests/hotCases/errors/events/d.js b/packages/rspack-test-tools/tests/hotCases/errors/events/d.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/d.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/d.js diff --git a/packages/rspack/tests/hotCases/errors/events/e.js b/packages/rspack-test-tools/tests/hotCases/errors/events/e.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/e.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/e.js diff --git a/packages/rspack/tests/hotCases/errors/events/f.js b/packages/rspack-test-tools/tests/hotCases/errors/events/f.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/f.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/f.js diff --git a/packages/rspack/tests/hotCases/errors/events/g.js b/packages/rspack-test-tools/tests/hotCases/errors/events/g.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/g.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/g.js diff --git a/packages/rspack/tests/hotCases/errors/events/h.js b/packages/rspack-test-tools/tests/hotCases/errors/events/h.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/h.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/h.js diff --git a/packages/rspack/tests/hotCases/errors/events/i.js b/packages/rspack-test-tools/tests/hotCases/errors/events/i.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/i.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/i.js diff --git a/packages/rspack/tests/hotCases/errors/events/index.js b/packages/rspack-test-tools/tests/hotCases/errors/events/index.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/index.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/index.js diff --git a/packages/rspack/tests/hotCases/errors/events/j.js b/packages/rspack-test-tools/tests/hotCases/errors/events/j.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/j.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/j.js diff --git a/packages/rspack/tests/hotCases/errors/events/k.js b/packages/rspack-test-tools/tests/hotCases/errors/events/k.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/k.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/k.js diff --git a/packages/rspack/tests/hotCases/errors/events/l.js b/packages/rspack-test-tools/tests/hotCases/errors/events/l.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/l.js rename to packages/rspack-test-tools/tests/hotCases/errors/events/l.js diff --git a/packages/rspack/tests/hotCases/errors/events/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/events/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/events/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/events/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/events/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/events/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/events/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/self-decline/a.js b/packages/rspack-test-tools/tests/hotCases/errors/self-decline/a.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/self-decline/a.js rename to packages/rspack-test-tools/tests/hotCases/errors/self-decline/a.js diff --git a/packages/rspack/tests/hotCases/errors/self-decline/b.js b/packages/rspack-test-tools/tests/hotCases/errors/self-decline/b.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/self-decline/b.js rename to packages/rspack-test-tools/tests/hotCases/errors/self-decline/b.js diff --git a/packages/rspack/tests/hotCases/errors/self-decline/c.js b/packages/rspack-test-tools/tests/hotCases/errors/self-decline/c.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/self-decline/c.js rename to packages/rspack-test-tools/tests/hotCases/errors/self-decline/c.js diff --git a/packages/rspack/tests/hotCases/errors/self-decline/changed-file.js b/packages/rspack-test-tools/tests/hotCases/errors/self-decline/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/self-decline/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/errors/self-decline/changed-file.js diff --git a/packages/rspack/tests/hotCases/errors/self-decline/index.js b/packages/rspack-test-tools/tests/hotCases/errors/self-decline/index.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/self-decline/index.js rename to packages/rspack-test-tools/tests/hotCases/errors/self-decline/index.js diff --git a/packages/rspack/tests/hotCases/errors/self-decline/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/self-decline/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/self-decline/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/self-decline/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/self-decline/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/self-decline/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/self-decline/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/self-decline/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/a.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/a.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/a.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/a.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/b.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/b.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/b.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/b.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/c.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/c.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/c.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/c.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/changed-file.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/changed-file.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/index.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/index.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/index.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/index.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/unaccepted-ignored/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted-ignored/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted-ignored/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/unaccepted/a.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted/a.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted/a.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted/a.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted/b.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted/b.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted/b.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted/b.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted/c.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted/c.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted/c.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted/c.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted/changed-file.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted/changed-file.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted/index.js b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted/index.js similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted/index.js rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted/index.js diff --git a/packages/rspack/tests/hotCases/errors/unaccepted/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/errors/unaccepted/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/errors/unaccepted/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/errors/unaccepted/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/errors/unaccepted/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/changed-file.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/changed-file.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/index.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/index.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/index.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/index.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/module.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/module.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/module.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/module.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/exports.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/exports.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/exports.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/exports.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/file.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/file.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/file.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/file.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/main.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/main.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/main.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/main.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/package.json b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/package.json similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/package.json rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/node_modules/dep1/package.json diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/import-meta-webpack-hot/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/changed-file.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/changed-file.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/index.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/index.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/index.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/index.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/module.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/module.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/module.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/module.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/exports.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/exports.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/exports.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/exports.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/file.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/file.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/file.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/file.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/main.js b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/main.js similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/main.js rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/main.js diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/package.json b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/package.json similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/package.json rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/node_modules/dep1/package.json diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/esm-dependency-import/module-hot/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/esm-dependency-import/module-hot/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/esm-dependency-import/module-hot/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/fake-update-loader.js b/packages/rspack-test-tools/tests/hotCases/fake-update-loader.js similarity index 100% rename from packages/rspack/tests/hotCases/fake-update-loader.js rename to packages/rspack-test-tools/tests/hotCases/fake-update-loader.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-default/changed-file.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-default/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/changed-file.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-default/file.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-default/file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/file.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-default/index.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/index.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-default/index.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/index.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-default/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-default/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-default/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-default/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-default/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-multiple/changed-file.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-multiple/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/changed-file.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-multiple/commonjs.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/commonjs.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-multiple/commonjs.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/commonjs.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-multiple/file.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-multiple/file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/file.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-multiple/index.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/index.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-multiple/index.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/index.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-multiple/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-multiple/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/auto-import-multiple/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import-multiple/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import-multiple/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/auto-import/changed-file.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import/changed-file.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import/file.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import/file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import/file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import/file.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import/index.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import/index.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import/index.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import/index.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-import/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/auto-import/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/auto-import/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-import/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-import/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/auto-reexport/changed-file.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-reexport/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/changed-file.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-reexport/file.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-reexport/file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/file.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-reexport/index.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/index.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-reexport/index.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/index.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-reexport/reexport.js b/packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/reexport.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-reexport/reexport.js rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/reexport.js diff --git a/packages/rspack/tests/hotCases/harmony/auto-reexport/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-reexport/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/auto-reexport/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/auto-reexport/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/auto-reexport/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/changed-file.js b/packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/changed-file.js diff --git a/packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/file.js b/packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/file.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/file.js rename to packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/file.js diff --git a/packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/index.js b/packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/index.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/index.js rename to packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/index.js diff --git a/packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/reexport.js b/packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/reexport.js similarity index 100% rename from packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/reexport.js rename to packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/reexport.js diff --git a/packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/harmony/cjs-analyze-changed/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/harmony/cjs-analyze-changed/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/hash/hot-index/changed-file.js b/packages/rspack-test-tools/tests/hotCases/hash/hot-index/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/hash/hot-index/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/hash/hot-index/changed-file.js diff --git a/packages/rspack/tests/hotCases/hash/hot-index/file.js b/packages/rspack-test-tools/tests/hotCases/hash/hot-index/file.js similarity index 100% rename from packages/rspack/tests/hotCases/hash/hot-index/file.js rename to packages/rspack-test-tools/tests/hotCases/hash/hot-index/file.js diff --git a/packages/rspack/tests/hotCases/hash/hot-index/index.js b/packages/rspack-test-tools/tests/hotCases/hash/hot-index/index.js similarity index 100% rename from packages/rspack/tests/hotCases/hash/hot-index/index.js rename to packages/rspack-test-tools/tests/hotCases/hash/hot-index/index.js diff --git a/packages/rspack/tests/hotCases/hash/hot-index/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/hash/hot-index/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/hash/hot-index/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/hash/hot-index/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/hash/hot-index/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/hash/hot-index/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/hash/hot-index/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/hash/hot-index/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/hash/hot-index/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/hash/hot-index/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/hash/hot-index/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/hash/hot-index/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/hash/hot-index/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/hash/hot-index/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/hash/hot-index/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/hash/hot-index/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/changed-file.js b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/changed-file.js diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/data.json b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/data.json similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/data.json rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/data.json diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/index.js b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/index.js similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/index.js rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/index.js diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/module1.js b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/module1.js similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/module1.js rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/module1.js diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/module2.js b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/module2.js similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/module2.js rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/module2.js diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/invalidate/conditional-accept/store.js b/packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/store.js similarity index 100% rename from packages/rspack/tests/hotCases/invalidate/conditional-accept/store.js rename to packages/rspack-test-tools/tests/hotCases/invalidate/conditional-accept/store.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/changed-file.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/changed-file.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/file.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/file.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/file.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/file.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/index.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/index.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/index.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/index.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/reexport.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/reexport.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/reexport.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/reexport.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/auto-reexport/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/auto-reexport/webpack.config.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/a/index.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/a/index.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/a/index.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/a/index.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/b/index.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/b/index.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/b/index.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/b/index.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/changed-file.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/changed-file.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/file.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/file.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/file.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/file.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/main/async.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/main/async.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/main/async.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/main/async.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/main/index.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/main/index.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/main/index.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/main/index.js diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/newTreeshaking/multi-chunk-single-runtime/webpack.config.js diff --git a/packages/rspack/tests/hotCases/plugins/banner/changed-file.js b/packages/rspack-test-tools/tests/hotCases/plugins/banner/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/changed-file.js diff --git a/packages/rspack/tests/hotCases/plugins/banner/file.js b/packages/rspack-test-tools/tests/hotCases/plugins/banner/file.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/file.js rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/file.js diff --git a/packages/rspack/tests/hotCases/plugins/banner/index.js b/packages/rspack-test-tools/tests/hotCases/plugins/banner/index.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/index.js rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/index.js diff --git a/packages/rspack/tests/hotCases/plugins/banner/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/plugins/banner/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/plugins/banner/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/plugins/banner/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/plugins/banner/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/plugins/banner/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/plugins/banner/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/plugins/banner/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/plugins/banner/test.filter.js b/packages/rspack-test-tools/tests/hotCases/plugins/banner/test.filter.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/test.filter.js rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/test.filter.js diff --git a/packages/rspack/tests/hotCases/plugins/banner/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/plugins/banner/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/banner/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/plugins/banner/webpack.config.js diff --git a/packages/rspack/tests/hotCases/plugins/html/changed-file.js b/packages/rspack-test-tools/tests/hotCases/plugins/html/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/html/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/plugins/html/changed-file.js diff --git a/packages/rspack/tests/hotCases/plugins/html/file.js b/packages/rspack-test-tools/tests/hotCases/plugins/html/file.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/html/file.js rename to packages/rspack-test-tools/tests/hotCases/plugins/html/file.js diff --git a/packages/rspack/tests/hotCases/plugins/html/index.html b/packages/rspack-test-tools/tests/hotCases/plugins/html/index.html similarity index 100% rename from packages/rspack/tests/hotCases/plugins/html/index.html rename to packages/rspack-test-tools/tests/hotCases/plugins/html/index.html diff --git a/packages/rspack/tests/hotCases/plugins/html/index.js b/packages/rspack-test-tools/tests/hotCases/plugins/html/index.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/html/index.js rename to packages/rspack-test-tools/tests/hotCases/plugins/html/index.js diff --git a/packages/rspack/tests/hotCases/plugins/html/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/plugins/html/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/plugins/html/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/plugins/html/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/plugins/html/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/plugins/html/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/plugins/html/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/plugins/html/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/plugins/html/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/plugins/html/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/plugins/html/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/plugins/html/webpack.config.js diff --git a/packages/rspack/tests/hotCases/recover/recover-after-self-error/a.js b/packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/a.js similarity index 100% rename from packages/rspack/tests/hotCases/recover/recover-after-self-error/a.js rename to packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/a.js diff --git a/packages/rspack/tests/hotCases/recover/recover-after-self-error/changed-file.js b/packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/recover/recover-after-self-error/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/changed-file.js diff --git a/packages/rspack/tests/hotCases/recover/recover-after-self-error/errors2.js b/packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/errors2.js similarity index 100% rename from packages/rspack/tests/hotCases/recover/recover-after-self-error/errors2.js rename to packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/errors2.js diff --git a/packages/rspack/tests/hotCases/recover/recover-after-self-error/index.js b/packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/index.js similarity index 100% rename from packages/rspack/tests/hotCases/recover/recover-after-self-error/index.js rename to packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/index.js diff --git a/packages/rspack/tests/hotCases/recover/recover-after-self-error/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/recover/recover-after-self-error/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/recover/recover-after-self-error/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/recover/recover-after-self-error/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/recover/recover-after-self-error/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/recover/recover-after-self-error/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/recover/recover-after-self-error/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/accept/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/accept/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/accept/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/accept/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/accept/file.js b/packages/rspack-test-tools/tests/hotCases/runtime/accept/file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/accept/file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/accept/file.js diff --git a/packages/rspack/tests/hotCases/runtime/accept/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/accept/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/accept/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/accept/index.js diff --git a/packages/rspack/tests/hotCases/runtime/accept/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/accept/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/accept/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/accept/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/accept/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/accept/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/accept/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/accept/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/bubble-async/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-async/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/bubble-async/file.js b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-async/file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/file.js diff --git a/packages/rspack/tests/hotCases/runtime/bubble-async/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-async/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/index.js diff --git a/packages/rspack/tests/hotCases/runtime/bubble-async/parent-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/parent-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-async/parent-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/parent-file.js diff --git a/packages/rspack/tests/hotCases/runtime/bubble-async/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-async/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/bubble-async/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-async/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-async/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/bubble-update/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-update/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/bubble-update/file.js b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-update/file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/file.js diff --git a/packages/rspack/tests/hotCases/runtime/bubble-update/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-update/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/index.js diff --git a/packages/rspack/tests/hotCases/runtime/bubble-update/parent-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/parent-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-update/parent-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/parent-file.js diff --git a/packages/rspack/tests/hotCases/runtime/bubble-update/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-update/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/bubble-update/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/bubble-update/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/bubble-update/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/circular/a.js b/packages/rspack-test-tools/tests/hotCases/runtime/circular/a.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/circular/a.js rename to packages/rspack-test-tools/tests/hotCases/runtime/circular/a.js diff --git a/packages/rspack/tests/hotCases/runtime/circular/b.js b/packages/rspack-test-tools/tests/hotCases/runtime/circular/b.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/circular/b.js rename to packages/rspack-test-tools/tests/hotCases/runtime/circular/b.js diff --git a/packages/rspack/tests/hotCases/runtime/circular/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/circular/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/circular/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/circular/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/circular/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/circular/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/circular/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/circular/index.js diff --git a/packages/rspack/tests/hotCases/runtime/circular/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/circular/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/circular/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/circular/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/circular/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/circular/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/circular/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/circular/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/a.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/a.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/a.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/a.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/b.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/b.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/b.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/b.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/index.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/module.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/module.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/module.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/module.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-chunk/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-chunk/webpack.config.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-module/a.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/a.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-module/a.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/a.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-module/b.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/b.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-module/b.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/b.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-module/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-module/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-module/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-module/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/index.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-module/module.js b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/module.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-module/module.js rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/module.js diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-module/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-module/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-module/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-module/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/dispose-removed-module/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/dispose-removed-module/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/dispose-removed-module/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/hmr-circular/a.js b/packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/a.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/hmr-circular/a.js rename to packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/a.js diff --git a/packages/rspack/tests/hotCases/runtime/hmr-circular/b.js b/packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/b.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/hmr-circular/b.js rename to packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/b.js diff --git a/packages/rspack/tests/hotCases/runtime/hmr-circular/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/hmr-circular/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/hmr-circular/entry.js b/packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/entry.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/hmr-circular/entry.js rename to packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/entry.js diff --git a/packages/rspack/tests/hotCases/runtime/hmr-circular/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/hmr-circular/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/index.js diff --git a/packages/rspack/tests/hotCases/runtime/hmr-circular/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/hmr-circular/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/hmr-circular/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/hmr-circular/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/hmr-circular/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/chunk.js b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/chunk.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/chunk.js rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/chunk.js diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/file.js b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/file.js diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/index.js diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/inner.js b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/inner.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/inner.js rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/inner.js diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/unaffected-chunk.js b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/unaffected-chunk.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/unaffected-chunk.js rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/unaffected-chunk.js diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/unaffected-inner.js b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/unaffected-inner.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/unaffected-inner.js rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/unaffected-inner.js diff --git a/packages/rspack/tests/hotCases/runtime/import-after-download/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/import-after-download/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/runtime/import-after-download/webpack.config.js diff --git a/packages/rspack/tests/hotCases/runtime/replace-runtime-module/a.js b/packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/a.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/replace-runtime-module/a.js rename to packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/a.js diff --git a/packages/rspack/tests/hotCases/runtime/replace-runtime-module/b.js b/packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/b.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/replace-runtime-module/b.js rename to packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/b.js diff --git a/packages/rspack/tests/hotCases/runtime/replace-runtime-module/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/replace-runtime-module/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/replace-runtime-module/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/replace-runtime-module/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/index.js diff --git a/packages/rspack/tests/hotCases/runtime/replace-runtime-module/module.js b/packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/module.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/replace-runtime-module/module.js rename to packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/module.js diff --git a/packages/rspack/tests/hotCases/runtime/replace-runtime-module/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/replace-runtime-module/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/replace-runtime-module/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/replace-runtime-module/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/replace-runtime-module/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/a.js b/packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/a.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/a.js rename to packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/a.js diff --git a/packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/b.js b/packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/b.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/b.js rename to packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/b.js diff --git a/packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/index.js similarity index 86% rename from packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/index.js index d3fddcdc1b3..7b173fa654f 100644 --- a/packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/index.js +++ b/packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/index.js @@ -1,4 +1,4 @@ -const expectWarning = require("../../../helpers/expectWarningFactory")(); +const expectWarning = require("../../../../dist/helper/util/expectWarningFactory")(); const getInner = require("./module"); it("should print correct warning messages when a disposed module is required", done => { diff --git a/packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/module.js b/packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/module.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/module.js rename to packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/module.js diff --git a/packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/require-disposed-module-warning/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/require-disposed-module-warning/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/file.js b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/file.js diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/index.js diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-and-dispose/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-and-dispose/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-factory/a.js b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/a.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-factory/a.js rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/a.js diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-factory/b.js b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/b.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-factory/b.js rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/b.js diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-factory/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-factory/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-factory/hot.js b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/hot.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-factory/hot.js rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/hot.js diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-factory/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-factory/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/index.js diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-factory/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-factory/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/self-accept-factory/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/self-accept-factory/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/self-accept-factory/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-modules/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-modules/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-modules/fileA.js b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/fileA.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-modules/fileA.js rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/fileA.js diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-modules/fileB.js b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/fileB.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-modules/fileB.js rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/fileB.js diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-modules/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-modules/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/index.js diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-modules/parent-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/parent-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-modules/parent-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/parent-file.js diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-modules/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-modules/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-modules/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-modules/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-modules/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-times/changed-file.js b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-times/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/changed-file.js diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-times/file.js b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/file.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-times/file.js rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/file.js diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-times/index.js b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/index.js similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-times/index.js rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/index.js diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-times/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-times/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-times/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-times/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-times/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-times/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/runtime/update-multiple-times/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/runtime/update-multiple-times/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/runtime/update-multiple-times/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/disable/changed-file.js b/packages/rspack-test-tools/tests/hotCases/source-map/disable/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/source-map/disable/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/source-map/disable/changed-file.js diff --git a/packages/rspack/tests/hotCases/source-map/disable/file.js b/packages/rspack-test-tools/tests/hotCases/source-map/disable/file.js similarity index 100% rename from packages/rspack/tests/hotCases/source-map/disable/file.js rename to packages/rspack-test-tools/tests/hotCases/source-map/disable/file.js diff --git a/packages/rspack/tests/hotCases/source-map/disable/index.js b/packages/rspack-test-tools/tests/hotCases/source-map/disable/index.js similarity index 100% rename from packages/rspack/tests/hotCases/source-map/disable/index.js rename to packages/rspack-test-tools/tests/hotCases/source-map/disable/index.js diff --git a/packages/rspack/tests/hotCases/source-map/disable/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/source-map/disable/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/source-map/disable/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/source-map/disable/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/disable/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/source-map/disable/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/source-map/disable/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/source-map/disable/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/disable/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/source-map/disable/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/source-map/disable/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/source-map/disable/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/disable/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/source-map/disable/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/source-map/disable/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/source-map/disable/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/disable/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/source-map/disable/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/source-map/disable/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/source-map/disable/webpack.config.js diff --git a/packages/rspack/tests/hotCases/source-map/enable/changed-file.js b/packages/rspack-test-tools/tests/hotCases/source-map/enable/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/source-map/enable/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/source-map/enable/changed-file.js diff --git a/packages/rspack/tests/hotCases/source-map/enable/file.js b/packages/rspack-test-tools/tests/hotCases/source-map/enable/file.js similarity index 100% rename from packages/rspack/tests/hotCases/source-map/enable/file.js rename to packages/rspack-test-tools/tests/hotCases/source-map/enable/file.js diff --git a/packages/rspack/tests/hotCases/source-map/enable/index.js b/packages/rspack-test-tools/tests/hotCases/source-map/enable/index.js similarity index 100% rename from packages/rspack/tests/hotCases/source-map/enable/index.js rename to packages/rspack-test-tools/tests/hotCases/source-map/enable/index.js diff --git a/packages/rspack/tests/hotCases/source-map/enable/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/source-map/enable/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/source-map/enable/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/source-map/enable/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/enable/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/source-map/enable/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/source-map/enable/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/source-map/enable/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/enable/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/source-map/enable/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/source-map/enable/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/source-map/enable/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/enable/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/source-map/enable/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/source-map/enable/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/source-map/enable/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/source-map/enable/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/source-map/enable/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/source-map/enable/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/source-map/enable/webpack.config.js diff --git a/packages/rspack/tests/hotCases/status/accept/changed-file.js b/packages/rspack-test-tools/tests/hotCases/status/accept/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/status/accept/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/status/accept/changed-file.js diff --git a/packages/rspack/tests/hotCases/status/accept/file.js b/packages/rspack-test-tools/tests/hotCases/status/accept/file.js similarity index 100% rename from packages/rspack/tests/hotCases/status/accept/file.js rename to packages/rspack-test-tools/tests/hotCases/status/accept/file.js diff --git a/packages/rspack/tests/hotCases/status/accept/index.js b/packages/rspack-test-tools/tests/hotCases/status/accept/index.js similarity index 100% rename from packages/rspack/tests/hotCases/status/accept/index.js rename to packages/rspack-test-tools/tests/hotCases/status/accept/index.js diff --git a/packages/rspack/tests/hotCases/status/accept/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/status/accept/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/status/accept/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/status/accept/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/status/accept/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/status/accept/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/status/accept/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/status/accept/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/status/check/changed-file.js b/packages/rspack-test-tools/tests/hotCases/status/check/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/status/check/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/status/check/changed-file.js diff --git a/packages/rspack/tests/hotCases/status/check/file.js b/packages/rspack-test-tools/tests/hotCases/status/check/file.js similarity index 100% rename from packages/rspack/tests/hotCases/status/check/file.js rename to packages/rspack-test-tools/tests/hotCases/status/check/file.js diff --git a/packages/rspack/tests/hotCases/status/check/index.js b/packages/rspack-test-tools/tests/hotCases/status/check/index.js similarity index 100% rename from packages/rspack/tests/hotCases/status/check/index.js rename to packages/rspack-test-tools/tests/hotCases/status/check/index.js diff --git a/packages/rspack/tests/hotCases/status/check/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/status/check/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/status/check/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/status/check/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/status/check/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/status/check/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/status/check/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/status/check/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/status/check/update.js b/packages/rspack-test-tools/tests/hotCases/status/check/update.js similarity index 100% rename from packages/rspack/tests/hotCases/status/check/update.js rename to packages/rspack-test-tools/tests/hotCases/status/check/update.js diff --git a/packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/changed-file.js b/packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/changed-file.js diff --git a/packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/index.js b/packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/index.js similarity index 100% rename from packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/index.js rename to packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/index.js diff --git a/packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/module.js b/packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/module.js similarity index 100% rename from packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/module.js rename to packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/module.js diff --git a/packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/subject.js b/packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/subject.js similarity index 100% rename from packages/rspack/tests/hotCases/unexpected-invalidation/used-exports/subject.js rename to packages/rspack-test-tools/tests/hotCases/unexpected-invalidation/used-exports/subject.js diff --git a/packages/rspack/tests/hotCases/update.js b/packages/rspack-test-tools/tests/hotCases/update.js similarity index 100% rename from packages/rspack/tests/hotCases/update.js rename to packages/rspack-test-tools/tests/hotCases/update.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/changed-file.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/changed-file.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/chunk.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/chunk.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/chunk.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/chunk.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/chunkS.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/chunkS.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/chunkS.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/chunkS.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/index.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/index.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/index.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/index.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/module.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/module.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/module.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/module.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/moduleA.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleA.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/moduleA.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleA.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/moduleAs.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleAs.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/moduleAs.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleAs.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/moduleB.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleB.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/moduleB.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleB.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/moduleBs.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleBs.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/moduleBs.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleBs.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/moduleS.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleS.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/moduleS.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/moduleS.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/0.snap.txt b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/0.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/0.snap.txt rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/0.snap.txt diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/1.snap.txt b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/1.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/1.snap.txt rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/1.snap.txt diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/2.snap.txt b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/2.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/2.snap.txt rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/2.snap.txt diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/3.snap.txt b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/3.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/3.snap.txt rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/3.snap.txt diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/4.snap.txt b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/4.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/4.snap.txt rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/4.snap.txt diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/5.snap.txt b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/5.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/5.snap.txt rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/5.snap.txt diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/6.snap.txt b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/6.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/6.snap.txt rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/6.snap.txt diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/7.snap.txt b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/7.snap.txt similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/snapshot/web/7.snap.txt rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/snapshot/web/7.snap.txt diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/webpack.config.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/worker.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/worker.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/worker.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/worker.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/workerA.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/workerA.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/workerA.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/workerA.js diff --git a/packages/rspack/tests/hotCases/worker/issue-5597/workerB.js b/packages/rspack-test-tools/tests/hotCases/worker/issue-5597/workerB.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/issue-5597/workerB.js rename to packages/rspack-test-tools/tests/hotCases/worker/issue-5597/workerB.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/changed-file.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/changed-file.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/changed-file.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/changed-file.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/chunk.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/chunk.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/chunk.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/chunk.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/chunkS.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/chunkS.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/chunkS.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/chunkS.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/index.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/index.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/index.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/index.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/module.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/module.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/module.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/module.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/moduleA.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleA.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/moduleA.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleA.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/moduleAs.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleAs.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/moduleAs.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleAs.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/moduleB.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleB.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/moduleB.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleB.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/moduleBs.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleBs.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/moduleBs.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleBs.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/moduleS.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleS.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/moduleS.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/moduleS.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/test.filter.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/test.filter.js similarity index 73% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/test.filter.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/test.filter.js index 280545e2884..ffcf7639021 100644 --- a/packages/rspack/tests/hotCases/worker/move-between-runtime/test.filter.js +++ b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/test.filter.js @@ -1,4 +1,4 @@ -var supportsWorker = require("../../../helpers/supportsWorker"); +var supportsWorker = require("../../../../dist/helper/legacy/supportsWorker"); module.exports = function (config) { // TODO: port https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/dependencies/HarmonyAcceptDependency.js#L86-L98 diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/webpack.config.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/webpack.config.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/webpack.config.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/webpack.config.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/worker.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/worker.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/worker.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/worker.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/workerA.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/workerA.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/workerA.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/workerA.js diff --git a/packages/rspack/tests/hotCases/worker/move-between-runtime/workerB.js b/packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/workerB.js similarity index 100% rename from packages/rspack/tests/hotCases/worker/move-between-runtime/workerB.js rename to packages/rspack-test-tools/tests/hotCases/worker/move-between-runtime/workerB.js diff --git a/packages/rspack/tests/HotTestCases.template.js b/packages/rspack/tests/HotTestCases.template.js deleted file mode 100644 index 8bfcc9dd72a..00000000000 --- a/packages/rspack/tests/HotTestCases.template.js +++ /dev/null @@ -1,409 +0,0 @@ -"use strict"; - -require("./helpers/warmup-webpack"); - -const path = require("path"); -const fs = require("graceful-fs"); -const vm = require("vm"); -const rimraf = require("rimraf"); -const checkArrayExpectation = require("./checkArrayExpectation"); -const createLazyTestEnv = require("./helpers/createLazyTestEnv"); - -const casesPath = path.join(__dirname, "hotCases"); -let categories = fs - .readdirSync(casesPath) - .filter(dir => fs.statSync(path.join(casesPath, dir)).isDirectory()); -categories = categories.map(cat => { - return { - name: cat, - tests: fs - .readdirSync(path.join(casesPath, cat)) - .filter(folder => folder.indexOf("_") < 0) - }; -}); - -const describeCases = config => { - describe(config.name, () => { - categories.forEach(category => { - describe(category.name, () => { - category.tests.forEach(testName => { - const testDirectory = path.join(casesPath, category.name, testName); - const filterPath = path.join(testDirectory, "test.filter.js"); - if (fs.existsSync(filterPath) && !require(filterPath)(config)) { - describe.skip(testName, () => { - it("filtered", () => {}); - }); - return; - } - describe(testName, () => { - let compiler; - afterAll(callback => { - compiler.close(callback); - compiler = undefined; - }); - - it( - testName + " should compile", - done => { - const webpack = require(".."); - const outputDirectory = path.join( - __dirname, - "js", - `hot-cases-${config.name}`, - category.name, - testName - ); - rimraf.sync(outputDirectory); - const recordsPath = path.join(outputDirectory, "records.json"); - const fakeUpdateLoaderOptions = { - updateIndex: 0 - }; - const configPath = path.join( - testDirectory, - "webpack.config.js" - ); - let options = {}; - if (fs.existsSync(configPath)) options = require(configPath); - if (typeof options === "function") { - options = options({ config }); - } - if (!options.mode) options.mode = "development"; - if (!options.devtool) options.devtool = false; - if (!options.context) options.context = testDirectory; - if (!options.entry) options.entry = "./index.js"; - if (!options.output) options.output = {}; - if (!options.output.path) options.output.path = outputDirectory; - if (!options.output.filename) - options.output.filename = "bundle.js"; - if (!options.output.chunkFilename) - options.output.chunkFilename = "[name].chunk.[fullhash].js"; - // CHANGE: the pathinfo is currently not supported in Rspack - // if (options.output.pathinfo === undefined) - // options.output.pathinfo = true; - if (options.output.publicPath === undefined) - options.output.publicPath = "https://test.cases/path/"; - if (options.output.library === undefined) - options.output.library = { type: "commonjs2" }; - if (!options.optimization) options.optimization = {}; - if (!options.optimization.moduleIds) - options.optimization.moduleIds = "named"; - if (!options.module) options.module = {}; - if (!options.module.rules) options.module.rules = []; - // CHANGE: switched to `use` configuration to support css and json - options.module.rules.push({ - test: /\.(js|css|json)/, - use: [ - { - loader: path.join( - __dirname, - "hotCases", - "fake-update-loader.js" - ), - options: fakeUpdateLoaderOptions - } - ] - }); - if (!options.target) options.target = config.target; - if (!options.plugins) options.plugins = []; - options.plugins.push( - new webpack.HotModuleReplacementPlugin(), - new webpack.LoaderOptionsPlugin(fakeUpdateLoaderOptions) - ); - // CHANGE: the recordsPath is currently not supported in Rspack - // if (!options.recordsPath) options.recordsPath = recordsPath; - compiler = webpack(options); - compiler.run((err, stats) => { - if (err) return done(err); - const jsonStats = stats.toJson({ - errorDetails: true - }); - if ( - checkArrayExpectation( - testDirectory, - jsonStats, - "error", - "Error", - done - ) - ) { - return; - } - if ( - checkArrayExpectation( - testDirectory, - jsonStats, - "warning", - "Warning", - done - ) - ) { - return; - } - - const urlToPath = url => { - if (url.startsWith("https://test.cases/path/")) - url = url.slice(24); - return path.resolve(outputDirectory, `./${url}`); - }; - const urlToRelativePath = url => { - if (url.startsWith("https://test.cases/path/")) - url = url.slice(24); - return `./${url}`; - }; - const window = { - fetch: async url => { - try { - const buffer = await new Promise((resolve, reject) => - fs.readFile(urlToPath(url), (err, b) => - err ? reject(err) : resolve(b) - ) - ); - return { - status: 200, - ok: true, - json: async () => JSON.parse(buffer.toString("utf-8")) - }; - } catch (err) { - if (err.code === "ENOENT") { - return { - status: 404, - ok: false - }; - } - throw err; - } - }, - importScripts: url => { - expect(url).toMatch(/^https:\/\/test\.cases\/path\//); - _require(urlToRelativePath(url)); - }, - document: { - createElement(type) { - return { - _type: type, - _attrs: {}, - setAttribute(name, value) { - this._attrs[name] = value; - }, - // CHANGE: added support for `getAttribute` method - getAttribute(name) { - return this._attrs[name]; - }, - // CHANGE: added support for `removeAttribute` method - removeAttribute(name) { - delete this._attrs[name]; - }, - parentNode: { - removeChild(node) { - // ok - } - }, - // CHANGE: added support for css link - sheet: { - disabled: false - } - }; - }, - head: { - // CHANGE: added support for `children` property - children: [], - // CHANGE: added support for `insertBefore` method - insertBefore(element, before) { - element.parentNode = this; - this.children.unshift(element); - Promise.resolve().then(() => { - if (element.onload) { - element.onload({ type: "load", target: element }); - } - }); - }, - // CHANGE: enhanced `insertBefore` method - appendChild(element) { - element.parentNode = this; - this.children.push(element); - if (element._type === "script") { - Promise.resolve().then(() => { - _require(urlToRelativePath(element.src)); - if (element.onload) { - element.onload({ - type: "load", - target: element - }); - } - }); - } else { - if (element.onload) { - element.onload({ type: "load", target: element }); - } - } - }, - // CHANGE: added support for `removeChild` method - removeChild(node) { - const index = this.children.indexOf(node); - this.children.splice(index, 1); - } - }, - getElementsByTagName(name) { - if (name === "head") return [this.head]; - // CHANGE: added support for link tag - if (name === "script" || name === "link") - return this.head.children.filter( - i => i._type === name - ); - throw new Error("Not supported"); - } - }, - Worker: require("./helpers/createFakeWorker")({ - outputDirectory - }), - EventSource: require("./helpers/EventSourceForNode"), - location: { - href: "https://test.cases/path/index.html", - origin: "https://test.cases", - toString() { - return "https://test.cases/path/index.html"; - } - } - }; - - function _next(callback) { - fakeUpdateLoaderOptions.updateIndex++; - compiler.run((err, stats) => { - if (err) return callback(err); - const jsonStats = stats.toJson({ - errorDetails: true - }); - if ( - checkArrayExpectation( - testDirectory, - jsonStats, - "error", - "errors" + fakeUpdateLoaderOptions.updateIndex, - "Error", - callback - ) - ) { - return; - } - if ( - checkArrayExpectation( - testDirectory, - jsonStats, - "warning", - "warnings" + fakeUpdateLoaderOptions.updateIndex, - "Warning", - callback - ) - ) { - return; - } - callback(null, jsonStats); - }); - } - - function _require(module) { - if (module.startsWith("./")) { - const p = path.join(outputDirectory, module); - if (module.endsWith(".json")) { - return JSON.parse(fs.readFileSync(p, "utf-8")); - } else { - const fn = vm.runInThisContext( - "(function(require, module, exports, __dirname, __filename, it, beforeEach, afterEach, expect, jest, self, window, fetch, document, importScripts, Worker, EventSource, NEXT, STATS) {" + - "global.expect = expect;" + - 'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + - fs.readFileSync(p, "utf-8") + - "\n})", - p - ); - const m = { - exports: {} - }; - fn.call( - m.exports, - _require, - m, - m.exports, - outputDirectory, - p, - _it, - _beforeEach, - _afterEach, - expect, - jest, - window, - window, - window.fetch, - window.document, - window.importScripts, - window.Worker, - window.EventSource, - _next, - jsonStats - ); - return m.exports; - } - } else return require(module); - } - let promise = Promise.resolve(); - const info = stats.toJson({ all: false, entrypoints: true }); - // CHANGE: here it is diffrent from webpack, because we add hotCases/chunk/multi-chunk-single-runtime - if ( - config.target === "web" || - config.target === "webworker" - ) { - for (const file of info.entrypoints.main.assets) { - // CHANGE: filtered non-JavaScript files from test and included CSS file handling - if (file.name.endsWith(".js")) { - _require(`./${file.name}`); - } else { - const cssElement = - window.document.createElement("link"); - cssElement.href = file.name; - cssElement.rel = "stylesheet"; - window.document.head.appendChild(cssElement); - } - } - } else { - // CHANGE: filtered non-JavaScript files - const assets = info.entrypoints.main.assets.filter(s => - s.name.endsWith(".js") - ); - const result = _require( - `./${assets[assets.length - 1].name}` - ); - if (typeof result === "object" && "then" in result) - promise = promise.then(() => result); - } - promise.then( - () => { - if (getNumberOfTests() < 1) - return done( - new Error("No tests exported by test case") - ); - - done(); - }, - err => { - console.log(err); - done(err); - } - ); - }); - }, - 20000 - ); - - const { - it: _it, - beforeEach: _beforeEach, - afterEach: _afterEach, - getNumberOfTests - } = createLazyTestEnv(20000); - }); - }); - }); - }); - }); -}; - -module.exports.describeCases = describeCases; diff --git a/packages/rspack/tests/HotTestCasesNode.test.js b/packages/rspack/tests/HotTestCasesNode.test.js deleted file mode 100644 index 64ed67adf41..00000000000 --- a/packages/rspack/tests/HotTestCasesNode.test.js +++ /dev/null @@ -1,8 +0,0 @@ -const { describeCases } = require("./HotTestCases.template"); - -describe("HotTestCases", () => { - describeCases({ - name: "async-node", - target: "async-node" - }); -}); diff --git a/packages/rspack/tests/HotTestCasesWeb.test.js b/packages/rspack/tests/HotTestCasesWeb.test.js deleted file mode 100644 index 59052deac03..00000000000 --- a/packages/rspack/tests/HotTestCasesWeb.test.js +++ /dev/null @@ -1,8 +0,0 @@ -const { describeCases } = require("./HotTestCases.template"); - -describe("HotTestCases", () => { - describeCases({ - name: "web", - target: "web" - }); -}); diff --git a/packages/rspack/tests/HotTestCasesWebWorker.test.js b/packages/rspack/tests/HotTestCasesWebWorker.test.js deleted file mode 100644 index 9aaeb189f5d..00000000000 --- a/packages/rspack/tests/HotTestCasesWebWorker.test.js +++ /dev/null @@ -1,8 +0,0 @@ -const { describeCases } = require("./HotTestCases.template"); - -describe("HotTestCases", () => { - describeCases({ - name: "webworker", - target: "webworker" - }); -});