2016-07-03 19:13:01 +08:00
|
|
|
import a from "./a";
|
|
|
|
|
|
2018-01-25 06:26:31 +08:00
|
|
|
it("should abort when module is not accepted", (done) => {
|
|
|
|
|
expect(a).toBe(1);
|
2016-07-03 19:13:01 +08:00
|
|
|
NEXT(require("../../update")(done, {
|
|
|
|
|
ignoreErrored: true
|
2018-01-25 06:26:31 +08:00
|
|
|
}, () => {
|
|
|
|
|
expect(a).toBe(1);
|
2016-07-03 19:13:01 +08:00
|
|
|
NEXT(require("../../update")(done, {
|
|
|
|
|
ignoreErrored: true
|
2018-01-25 06:26:31 +08:00
|
|
|
}, () => {
|
|
|
|
|
expect(a).toBe(3);
|
2016-07-03 19:13:01 +08:00
|
|
|
done();
|
|
|
|
|
}));
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if(module.hot) {
|
|
|
|
|
module.hot.accept("./a");
|
|
|
|
|
}
|