mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 03:23:57 +08:00
20 lines
378 B
JavaScript
20 lines
378 B
JavaScript
'use strict';
|
|
|
|
var Mocha = require('mocha');
|
|
var glob = require('glob');
|
|
|
|
var root = 'tests/{unit,acceptance}';
|
|
var specFiles = glob.sync(root + '/**/*.spec.js');
|
|
var mocha = new Mocha({
|
|
timeout: 5000,
|
|
reporter: 'spec'
|
|
});
|
|
|
|
specFiles.forEach(mocha.addFile.bind(mocha));
|
|
|
|
mocha.run(function(failures){
|
|
process.on('exit', function () {
|
|
process.exit(failures);
|
|
});
|
|
});
|