-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.js
40 lines (33 loc) · 790 Bytes
/
run.js
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
'use strict';
var
_ = require( 'underscore' ),
flashRoutingTests = require( './flashRoutingTests.js' ),
configs = global.flashRoutingTests.currentConfigs;
before( function ( done ) {
if ( configs.before ) {
configs.before( done )
} else {
done();
}
});
after( function ( done ) {
if ( configs.after ) {
configs.after( done )
} else {
done();
}
});
require( 'fs' ).readdirSync( configs.testsFolder + '/batteries' ).forEach( function ( file ) {
var
tweak = configs.runTweaks[ file ],
title = configs.titlePrefix + file,
testConfigs = require( configs.testsFolder + '/batteries/' + file );
function run () {
flashRoutingTests.defineThese( configs, testConfigs );
}
if ( tweak ) {
describe[ tweak ]( title, run );
} else {
describe( title, run );
}
});