forked from darkwallet/darkwallet
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest-main.js
42 lines (35 loc) · 1.13 KB
/
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
'use strict';
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: {
'angular-mocks': '../vendors/angular-mocks/angular-mocks',
'date-mock': '../../test/mock/date',
'chrome': '../../test/mock/chrome_mock',
'testUtils': '../../test/mock/testUtils',
'frontend/app': '../../test/mock/frontend_app',
'darkwallet': '../../test/mock/darkwallet_mock',
'available_languages': '../../test/mock/available_languages'
},
shim: {
'angular-mocks': {
deps: ['angular'],
exports: 'angular.mock'
}
},
// ask Require.js to load these files (all our tests)
deps: tests,
// start test run, once Require.js is done
callback: window.__karma__.start
});
// Overriding toLocaleString to simulate an en-US browser
var toLocaleString = Number.prototype.toLocaleString;
Number.prototype.toLocaleString = function(locales, options) {
return toLocaleString.apply(this, ['en-US', options]);
};