/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/externals/script-invalid-request/index.js
22 строки
646 B
Alexander Akait
fix(webmanifest): rewrite icon URLs at byte offsets (#21655)
10 авг 2026, 01:33
Не верифицирован
10 авг 2026, 01:33
5c5d009
Код
Авторство
О чём код?
const fs = require("fs"); // `var` (not `const`) so the parser cannot fold the branch away and drop the // externals — they must be code-generated, only never loaded. var never = false; it("should build the script externals without loading them", () => { if (never) { require("valid"); require("missing-at"); require("leading-at"); require("trailing-at"); } }); it("should split a script external on its first `@`", () => { const source = fs.readFileSync(__filename, "utf-8"); expect(source).toContain( '"https://cdn.example.com/npm/lodash@4.17.19/lodash.min.js"' ); expect(source).toContain('typeof _ !== "undefined"'); });