forked from summernote/summernote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-main.js
43 lines (37 loc) · 988 Bytes
/
test-main.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
41
42
43
/* global requirejs */
var tests = [];
for (var file in window.__karma__.files) {
if (/spec\.js$/.test(file)) {
tests.push(file);
}
}
requirejs.config({
// Karma serves files from '/base'
baseUrl: '/base/src/js',
paths: {
jquery: '../../test/libs/jquery-1.9.1.min',
bootstrap: '../../test/libs/bootstrap',
es5shim: '../../test/libs/es5-shim',
codemirror: '../../test/libs/codemirror',
chai: '../../node_modules/chai/chai',
spies: '../../node_modules/chai-spies/chai-spies',
chaidom: '../../test/chaidom'
},
shim: {
bootstrap: ['jquery'],
es5shim: { exports: 'es5shim' },
codemirror: { exports: 'codemirror' }
},
packages: [{
name: 'summernote',
location: '.',
main: 'summernote'
}],
// ask Require.js to load these files (all our tests)
deps: tests,
callback: function () {
require(['jquery', 'bootstrap', 'summernote/bs3/settings'], function () {
window.__karma__.start();
});
}
});