-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
karma.unit.config.js
57 lines (55 loc) · 1.22 KB
/
karma.unit.config.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
'use strict';
const path = require('path');
const fs = require('fs-extra');
function projectManagerHook(projectManager) {
projectManager.once('prepared', function () {
const resourcesDir = path.join(this.karmaRunnerProjectPath, 'Resources');
fs.ensureDirSync(resourcesDir);
fs.copySync(path.join(__dirname, 'Resources'), resourcesDir);
});
}
projectManagerHook.$inject = [ 'projectManager' ];
module.exports = config => {
config.set({
basePath: '../..',
frameworks: [ 'jasmine', 'projectManagerHook' ],
files: [
'test/unit/specs/**/*spec.js'
],
reporters: [ 'mocha', 'junit' ],
plugins: [
'karma-*',
{
'framework:projectManagerHook': [ 'factory', projectManagerHook ]
}
],
titanium: {
sdkVersion: config.sdkVersion || '9.3.2.GA'
},
customLaunchers: {
android: {
base: 'Titanium',
browserName: 'Android AVD',
displayName: 'android',
platform: 'android'
},
ios: {
base: 'Titanium',
browserName: 'iOS Emulator',
displayName: 'ios',
platform: 'ios'
}
},
browsers: [ 'android', 'ios' ],
client: {
jasmine: {
random: false
}
},
singleRun: true,
retryLimit: 0,
concurrency: 1,
captureTimeout: 300000,
logLevel: config.LOG_DEBUG
});
};