import * as karma from 'karma' ; import { join } from 'path' ; import Config from '../../config' ; let repeatableStartKarma = ( done , config = { } ) => { return new ( < any > karma ) . Server ( Object . assign ( { configFile : join ( process . cwd ( ) , 'karma.conf.js' ) , singleRun : true } , config ) , ( exitCode ) => { done ( ) ; } ) . start ( ) ; } ; export = ( done ) => { let karmaReporters = Config . getKarmaReporters ( ) ; karmaReporters . singleRun = true ; return repeatableStartKarma ( done , karmaReporters ) ; } ;