forked from angular/protractor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
executable file
·45 lines (39 loc) · 1.21 KB
/
test.js
File metadata and controls
executable file
·45 lines (39 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env node
var glob = require('glob').sync;
var spawn = require('child_process').spawn;
var scripts = [
'node lib/cli.js spec/basicConf.js',
'node lib/cli.js spec/multiConf.js',
'node lib/cli.js spec/multiSplitConf.js',
'node lib/cli.js spec/altRootConf.js',
'node lib/cli.js spec/onPrepareConf.js',
'node lib/cli.js spec/onPrepareFileConf.js',
'node lib/cli.js spec/mochaConf.js',
'node lib/cli.js spec/cucumberConf.js',
'node lib/cli.js spec/withLoginConf.js',
'node lib/cli.js spec/suitesConf.js --suite okmany',
'node lib/cli.js spec/suitesConf.js --suite okspec'
];
scripts.push(
'node node_modules/.bin/minijasminenode jasminewd/spec/adapterSpec.js ' +
glob('spec/unit/*.js').join(' ') + ' ' +
glob('docs/spec/*.js').join(' '));
var failed = false;
(function runTests(i) {
if (i < scripts.length) {
console.log('node ' + scripts[i]);
var args = scripts[i].split(/\s/);
var test = spawn(args[0], args.slice(1), {stdio: 'inherit'});
test.on('error', function(err) {
throw err;
});
test.on('exit', function(code) {
if (code != 0) {
failed = true;
}
runTests(i + 1);
});
} else {
process.exit(failed ? 1 : 0);
}
}(0));