/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/cases/inner-graph/array-expression/index.js
24 строки
576 B
Alexander Akait
feat: handle more expression types in isPure for better tree-shaking (#20723)
28 апр 2026, 21:06
Не верифицирован
28 апр 2026, 21:06
45b2358
Код
Авторство
О чём код?
import { o2, o3 } from "./module"; import { exportUsed, export2Used, export3Used, export4Used, export5Used, export6Used } from "./inner"; it("some exports should be unused when no array expression use it", () => { expect(o2[0]).toBe(42); expect(o3[0].EXPORT5()).toBe(42); expect(o3[0].EXPORT6()).toBe(42); if (process.env.NODE_ENV === "production") { expect(exportUsed).toBe(false); expect(export2Used).toBe(false); expect(export3Used).toBe(false); expect(export4Used).toBe(true); expect(export5Used).toBe(true); expect(export6Used).toBe(true); } });