-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebpackTestRunner.js
More file actions
21 lines (18 loc) · 1.42 KB
/
Copy pathWebpackTestRunner.js
File metadata and controls
21 lines (18 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// This file is auto-generated
// Any change will be overriden
const ignoreTarget = Meteor.isServer ? 'client' : 'server';
let testFiles = [];
if (Meteor.isAppTest) {
testFiles = testFiles.concat(require.context('./-p', true, /.(test|spec|app-test|app-spec)(s)?.(.+)$/i).keys()).map(file => './-p' + file.substr(1));
testFiles = testFiles.concat(require.context('./imports', true, /.(test|spec|app-test|app-spec)(s)?.(.+)$/i).keys()).map(file => './imports' + file.substr(1));
testFiles = testFiles.concat(require.context('./man', true, /.(test|spec|app-test|app-spec)(s)?.(.+)$/i).keys()).map(file => './man' + file.substr(1));
testFiles = testFiles.concat(require.context('./src', true, /.(test|spec|app-test|app-spec)(s)?.(.+)$/i).keys()).map(file => './src' + file.substr(1));
} else {
testFiles = testFiles.concat(require.context('./-p', true, /.(test|spec)(s)?.(.+)$/i).keys()).map(file => './-p' + file.substr(1));
testFiles = testFiles.concat(require.context('./imports', true, /.(test|spec)(s)?.(.+)$/i).keys()).map(file => './imports' + file.substr(1));
testFiles = testFiles.concat(require.context('./man', true, /.(test|spec)(s)?.(.+)$/i).keys()).map(file => './man' + file.substr(1));
testFiles = testFiles.concat(require.context('./src', true, /.(test|spec)(s)?.(.+)$/i).keys()).map(file => './src' + file.substr(1));
}
testFiles
.filter(file => file.indexOf('/' + ignoreTarget + '/') < 0)
.map(file => require(file));