Files
DefinitelyTyped/karma/karma-0.12-tests.ts
2016-05-10 12:22:25 -07:00

26 lines
569 B
TypeScript

import gulp = require('gulp');
import karma = require('karma');
function runKarma(singleRun: boolean): void {
karma.server.start({
configFile: __dirname + '/karma.conf.js',
singleRun: singleRun
});
}
gulp.task('test:unit:karma', ['build:test:unit'], () => runKarma(true));
karma.server.start({port: 9876}, (exitCode: number) => {
console.log('Karma has exited with ' + exitCode);
process.exit(exitCode);
});
karma.runner.run({port: 9876}, (exitCode: number) => {
console.log('Karma has exited with ' + exitCode);
process.exit(exitCode);
});