mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
27 lines
631 B
TypeScript
27 lines
631 B
TypeScript
/// <reference path="karma.d.ts" />
|
|
/// <reference path="../gulp/gulp.d.ts" />
|
|
|
|
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) => {
|
|
console.log('Karma has exited with ' + exitCode);
|
|
process.exit(exitCode);
|
|
});
|
|
|
|
|
|
karma.runner.run({port: 9876}, (exitCode) => {
|
|
console.log('Karma has exited with ' + exitCode);
|
|
process.exit(exitCode);
|
|
});
|