/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/source-map/eval-default-source-map-properties/index.js
19 строк
741 B
Xiao
fix: omit empty ignoreList property from source maps (#20319)
19 янв 2026, 16:29
Не верифицирован
19 янв 2026, 16:29
edfaa0f
Код
Авторство
О чём код?
it("should not include empty ignoreList in eval source map", () => { const fs = require("fs"); const source = fs.readFileSync(__filename, "utf-8"); const match = /sourceMappingURL\s*=\s*data:application\/json;charset=utf-8;base64,([A-Za-z0-9+\/=]+)/.exec( source ); expect(match).not.toBeNull(); const mapString = Buffer.from(match[1], "base64").toString("utf-8"); expect(mapString).not.toMatch(/"ignoreList"\s*:\s*\[\s*\]/); // Verify default source map properties are present const sourceMap = JSON.parse(mapString); expect(sourceMap).toHaveProperty("version", 3); expect(sourceMap).toHaveProperty("sources"); expect(Array.isArray(sourceMap.sources)).toBe(true); expect(sourceMap.sources.length).toBeGreaterThan(0); });