import { Config as KarmaConfig , ConfigOptions as KarmaConfigOptions } from "karma" ; import { saucelabs , webpack } from "./config" ; import * as browsers from "./config/browsers/unit.json" ; export default ( config ) => { config . set ( { basePath : __dirname , frameworks : [ "fixture" , "jasmine" ] , files : [ "fixtures/**/*" , "suites/unit/**/*.ts" ] , preprocessors : { "**/*.html" : [ "html2js" ] , "**/*.ts" : [ "webpack" , "sourcemap" ] } , webpack : webpack ( config ) , reporters : config . singleRun ? [ "spec" , "coverage-istanbul" ] : [ "spec" , "clear-screen" ] , browsers : [ "Chrome" ] , specReporter : { suppressErrorSummary : true , suppressSkipped : ! config . singleRun } , coverageIstanbulReporter : { reports : [ "html" , "text" ] } , mime : { "text/x-typescript" : [ "ts" ] } , client : { jasmine : { random : false } } , ... ( process . env . GITHUB_ACTIONS || process . env . SAUCE ? saucelabs ( config , browsers ) : { } ) } ) ; } ;