mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
26 lines
569 B
TypeScript
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);
|
|
});
|