[communication-identity] Update karma to not use karma-remap-istanbul (#13466)

karma-remap-istanbul is an undesirable dependency we've been trying to remove from the tree. This PR does the same dance we've performed in other libraries to make it unnecessary.
This commit is contained in:
Jeff Fisher 2021-01-28 14:30:11 -08:00 коммит произвёл GitHub
Родитель e140079fb9
Коммит f68f3fe74f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 54 добавлений и 678 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -24,6 +24,10 @@
"name": "communication-common",
"path": "sdk/communication/communication-common"
},
{
"name": "communication-identity",
"path": "sdk/communication/communication-identity"
},
{
"name": "communication-sms",
"path": "sdk/communication/communication-sms"

Просмотреть файл

@ -26,7 +26,7 @@ module.exports = function(config) {
"karma-ie-launcher",
"karma-env-preprocessor",
"karma-coverage",
"karma-remap-istanbul",
"karma-sourcemap-loader",
"karma-junit-reporter",
"karma-json-to-file-reporter",
"karma-json-preprocessor"
@ -46,7 +46,7 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
"**/*.js": ["env"],
"**/*.js": ["sourcemap", "env"],
"recordings/browsers/**/*.json": ["json"]
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
// Preprocess source file to calculate code coverage, however this will make source file unreadable
@ -69,30 +69,19 @@ module.exports = function(config) {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ["mocha", "coverage", "karma-remap-istanbul", "junit", "json-to-file"],
reporters: ["mocha", "coverage", "junit", "json-to-file"],
coverageReporter: {
// specify a common output directory
dir: "coverage-browser/",
reporters: [
{
type: "json",
subdir: ".",
file: "coverage.json"
}
{ type: "json", subdir: ".", file: "coverage.json" },
{ type: "lcovonly", subdir: ".", file: "lcov.info" },
{ type: "html", subdir: "html" },
{ type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" }
]
},
remapIstanbulReporter: {
src: "coverage-browser/coverage.json",
reports: {
lcovonly: "coverage-browser/lcov.info",
html: "coverage-browser/html/report",
"text-summary": null,
cobertura: "./coverage-browser/cobertura-coverage.xml"
}
},
junitReporter: {
outputDir: "", // results will be saved as $outputDir/$browserName.xml
outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile

Просмотреть файл

@ -110,7 +110,7 @@
"karma-junit-reporter": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-mocha": "^2.0.1",
"karma-remap-istanbul": "^0.6.0",
"karma-sourcemap-loader": "^0.3.8",
"karma": "^5.1.0",
"mocha-junit-reporter": "^1.18.0",
"mocha": "^7.1.1",