/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/source-map/eval-source-map/index.js
11 строк
525 B
alexander.akait
fix: logic
10 окт 2024, 18:37
10 окт 2024, 18:37
5a3ce4e
Код
Авторство
О чём код?
it("should not include sourcesContent if noSources option is used", function() { var fs = require("fs"); var source = fs.readFileSync(__filename, "utf-8"); var match = /\/\/# sourceMappingURL\s*=\s*data:application\/json;charset=utf-8;base64,(.*)\\n\/\/#/.exec(source); var mapString = Buffer.from(match[1], 'base64').toString('utf-8'); var map = JSON.parse(mapString); expect(map).toHaveProperty("sourcesContent"); expect(/\.js(\?.+)?$/.test(map.file)).toBe(true); }); if (Math.random() < 0) require("./test.js");