-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-main.js
More file actions
43 lines (40 loc) · 1.01 KB
/
Copy pathtest-main.js
File metadata and controls
43 lines (40 loc) · 1.01 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
var allTestFiles = [];
//console.log('hello')
var TEST_REGEXP = /Spec\.js$/;
Object.keys(window.__karma__.files).forEach(function(file) {
if (TEST_REGEXP.test(file)) {
// Normalize paths to RequireJS module names.
allTestFiles.push(file);
}
});
//console.log(allTestFiles);
requirejs.config({
// Karma serves files under /base, which is the basePath from your config file
baseUrl: '/base',
paths: {
'jQuery': 'bower_components/jquery/dist/jquery',
'underscore': 'bower_components/underscore/underscore',
'q': 'bower_components/q/q',
'knockout':'bower_components/knockout/dist/knockout',
'provider': 'js/provider/dataProvider'
},
shim: {
'underscore': {
exports: '_'
},
'jQuery': {
exports: '$'
},
'knockout':{
exports: 'ko'
},
'q': {
exports: 'Q'
},
'provider':'dataProvider'
},
// dynamically load all test files
deps: allTestFiles,
// we have to kickoff jasmine, as it is asynchronous
callback: window.__karma__.start
});