/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/defer-import/same-module/index.js
12 строк
489 B
Alexander Akait
fix: spec-compliant defer namespace [[Set]] and identity (#20913)
05 май 2026, 21:33
Не верифицирован
05 май 2026, 21:33
2fd88dd
Код
Авторство
О чём код?
import * as mod1 from "./module.js"; import defer * as mod2 from "./module.js"; it("should generate different runtime code for the same module", () => { expect(mod1.default).toBe(mod2.default); // Per the TC39 import-defer spec, the deferred namespace is a // distinct Deferred Module Namespace Exotic Object, separate from // the eager namespace of the same module. expect(mod1).not.toBe(mod2); // Test itself + module expect(Object.keys(__webpack_modules__).length).toBe(2); });