Skip to content

Commit

Permalink
add test case for watching in production
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jul 16, 2020
1 parent 1879a81 commit a0ab325
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/watchCases/simple/production/0/changing-file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "0";
1 change: 1 addition & 0 deletions test/watchCases/simple/production/0/changing-module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default "0";
6 changes: 6 additions & 0 deletions test/watchCases/simple/production/0/index.js
Original file line number Diff line number Diff line change
@@ -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);
});
1 change: 1 addition & 0 deletions test/watchCases/simple/production/1/changing-file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "1";
1 change: 1 addition & 0 deletions test/watchCases/simple/production/1/changing-module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default "1";
1 change: 1 addition & 0 deletions test/watchCases/simple/production/2/changing-file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "2";
1 change: 1 addition & 0 deletions test/watchCases/simple/production/2/changing-module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default "2";
4 changes: 4 additions & 0 deletions test/watchCases/simple/production/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
mode: "production"
};

0 comments on commit a0ab325

Please sign in to comment.