spec: Always run crash-reporter at last
So when a test crashed we can always see the stack trace.
This commit is contained in:
parent
9ced85d860
commit
4b46eca329
1 changed files with 3 additions and 2 deletions
|
@ -62,16 +62,17 @@
|
||||||
if (query.invert) mocha.invert();
|
if (query.invert) mocha.invert();
|
||||||
|
|
||||||
// Read all test files.
|
// Read all test files.
|
||||||
var walker = require('walkdir').walk(require('path').dirname(__dirname), {
|
var walker = require('walkdir').walk(path.dirname(__dirname), {
|
||||||
no_recurse: true
|
no_recurse: true
|
||||||
});
|
});
|
||||||
|
|
||||||
walker.on('file', function(file) {
|
walker.on('file', function(file) {
|
||||||
if (/-spec\.js$/.test(file))
|
if (/-spec\.js$/.test(file) && !file.includes('api-crash-reporter-spec.js'))
|
||||||
mocha.addFile(file);
|
mocha.addFile(file);
|
||||||
});
|
});
|
||||||
|
|
||||||
walker.on('end', function() {
|
walker.on('end', function() {
|
||||||
|
mocha.addFile(path.resolve(__dirname, '..', 'api-crash-reporter-spec.js'))
|
||||||
var runner = mocha.run(function() {
|
var runner = mocha.run(function() {
|
||||||
if (isCi && runner.hasOnly) {
|
if (isCi && runner.hasOnly) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue