blob: c012e4777e26d9ecf3222940b7e3681243b8f595 (
plain)
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
|
window.__karma__.loaded = function() {};
var tests = [];
for (var file in window.__karma__.files) {
if (window.__karma__.files.hasOwnProperty(file)) {
if (/Spec\.js$/.test(file)) {
tests.push(file);
}
}
}
requirejs.config({
baseUrl: '/base',
paths: {
'backbone': 'third-party/backbone',
'backbone.marionette': 'third-party/backbone.marionette',
'handlebars': 'third-party/handlebars',
'moment': 'third-party/moment'
},
shim: {
'backbone.marionette': {
deps: ['backbone'],
exports: 'Marionette'
},
'backbone': {
exports: 'Backbone'
},
'handlebars': {
exports: 'Handlebars'
},
'moment': {
exports: 'moment'
}
},
// ask Require.js to load these files (all our tests)
deps: tests,
// start test run, once Require.js is done
callback: window.__karma__.start
});
|