/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/cases/async-modules/top-level-error/index.js
49 строк
1 KB
Ivan Kopeykin
feat: add dead control flow check
28 фев 2025, 17:39
Не верифицирован
28 фев 2025, 17:39
af7d788
Код
Авторство
О чём код?
it("should allow to import an rejected async module again", async () => { await expect(require("./main")).rejects.toEqual( expect.objectContaining({ message: expect.stringContaining("expected rejection 1") }) ); await expect(require("./module")).rejects.toEqual( expect.objectContaining({ message: expect.stringContaining("expected rejection 1") }) ); await expect(require("./module?2")).rejects.toEqual( expect.objectContaining({ message: expect.stringContaining("expected rejection 2") }) ); await expect(require("./reexport?2")).rejects.toEqual( expect.objectContaining({ message: expect.stringContaining("expected rejection 1") }) ); try { require("./script") } catch (e) { expect.stringContaining("expected rejection 1") } try { require("./script-reexport") } catch (e) { expect.stringContaining("expected rejection 1") } await Promise.all([ expect(require("./module?3")).rejects.toEqual( expect.objectContaining({ message: expect.stringContaining("expected rejection 3") }) ), expect(require("./module?4")).rejects.toEqual( expect.objectContaining({ message: expect.stringContaining("expected rejection 4") }) ), expect(require("./module?5")).rejects.toEqual( expect.objectContaining({ message: expect.stringContaining("expected rejection 5") }) ) ]); });