We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b9b73c5 + 07242be commit 360373dCopy full SHA for 360373d
3 files changed
test/hotCases/status/check/file.js
@@ -0,0 +1,3 @@
1
+export var value = 1;
2
+---
3
+export var value = 2;
test/hotCases/status/check/index.js
@@ -0,0 +1,6 @@
+import { value } from "./file";
+
+it("call module.check api with false should return updatedModules correctly", function (done) {
4
+ expect(value).toBe(1);
5
+ NEXT(require("./update")(done));
6
+});
test/hotCases/status/check/update.js
@@ -0,0 +1,15 @@
+module.exports = function (done) {
+ return function (err, stats) {
+ if (err) return done(err);
+ module.hot
+ .check(false)
+ .then(updatedModules => {
7
+ if (!updatedModules) return done(new Error("No update available"));
8
+ expect(updatedModules).toContain("./file.js");
9
+ done();
10
+ })
11
+ .catch(err => {
12
+ done(err);
13
+ });
14
+ };
15
+};
0 commit comments