/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/hotCases/define/issue-6962/module.js
22 строки
790 B
Tobias Koppers
make sure that the callback function in module.hot.accept is parsed
18 июн 2020, 16:09
18 июн 2020, 16:09
d6f6025
Код
Авторство
О чём код?
import value1 from "./a"; it("should have the expected static path defined", function () { expect(DEFINE_PATH).toBe("./a"); }); it("should hot.accept the module located at the static file path without breaking the compiler", function () { module.hot.accept("./a"); expect(value1).toBe(1); }); it("should hot.accept the module located at the defined file path without breaking the compiler, when one argument is passed to hot.accept", function () { module.hot.accept(DEFINE_PATH); }); it("should hot.accept the module located at the defined file path without breaking the compiler, when multiple arguments are passed to hot.accept", function (done) { module.hot.accept(DEFINE_PATH, () => { expect(DEFINE_PATH).toBe("./a"); done(); }); NEXT(require("../../update")(done)); });