diff --git a/test/watchCases/simple/production/0/changing-file.js b/test/watchCases/simple/production/0/changing-file.js new file mode 100644 index 000000000..335d3d1ad --- /dev/null +++ b/test/watchCases/simple/production/0/changing-file.js @@ -0,0 +1 @@ +module.exports = "0"; diff --git a/test/watchCases/simple/production/0/changing-module.js b/test/watchCases/simple/production/0/changing-module.js new file mode 100644 index 000000000..b428ff41a --- /dev/null +++ b/test/watchCases/simple/production/0/changing-module.js @@ -0,0 +1 @@ +export default "0"; diff --git a/test/watchCases/simple/production/0/index.js b/test/watchCases/simple/production/0/index.js new file mode 100644 index 000000000..b335a3e45 --- /dev/null +++ b/test/watchCases/simple/production/0/index.js @@ -0,0 +1,6 @@ +import module from "./changing-module"; + +it("should watch for changes", function () { + expect(require("./changing-file")).toBe(WATCH_STEP); + expect(module).toBe(WATCH_STEP); +}); diff --git a/test/watchCases/simple/production/1/changing-file.js b/test/watchCases/simple/production/1/changing-file.js new file mode 100644 index 000000000..ba0e0f3e1 --- /dev/null +++ b/test/watchCases/simple/production/1/changing-file.js @@ -0,0 +1 @@ +module.exports = "1"; diff --git a/test/watchCases/simple/production/1/changing-module.js b/test/watchCases/simple/production/1/changing-module.js new file mode 100644 index 000000000..508074e2a --- /dev/null +++ b/test/watchCases/simple/production/1/changing-module.js @@ -0,0 +1 @@ +export default "1"; diff --git a/test/watchCases/simple/production/2/changing-file.js b/test/watchCases/simple/production/2/changing-file.js new file mode 100644 index 000000000..c202b8513 --- /dev/null +++ b/test/watchCases/simple/production/2/changing-file.js @@ -0,0 +1 @@ +module.exports = "2"; diff --git a/test/watchCases/simple/production/2/changing-module.js b/test/watchCases/simple/production/2/changing-module.js new file mode 100644 index 000000000..bd360e75d --- /dev/null +++ b/test/watchCases/simple/production/2/changing-module.js @@ -0,0 +1 @@ +export default "2"; diff --git a/test/watchCases/simple/production/webpack.config.js b/test/watchCases/simple/production/webpack.config.js new file mode 100644 index 000000000..dffc81bba --- /dev/null +++ b/test/watchCases/simple/production/webpack.config.js @@ -0,0 +1,4 @@ +/** @type {import("../../../../").Configuration} */ +module.exports = { + mode: "production" +};