forked from blockchain/My-Wallet-V3-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
147 lines (127 loc) · 4.74 KB
/
karma.conf.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
module.exports = function (config) {
var configuration = {
basePath: './',
logLevel: config.LOG_WARN,
client: { captureConsole: false },
exclude: [],
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
'node_modules/jasmine-es6-promise-matchers/jasmine-es6-promise-matchers.js',
'bower_components/angular/angular.js',
'bower_components/angular-sanitize/angular-sanitize.js',
'bower_components/angular-mocks/angular-mocks.js',
'bower_components/angular-animate/angular-animate.js',
'bower_components/oclazyload/dist/ocLazyLoad.js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/angular-ui-select/dist/select.js',
'bower_components/angular-audio/app/angular.audio.js',
'bower_components/qrcode/lib/qrcode.min.js',
'bower_components/angular-qr/angular-qr.min.js',
'bower_components/angular-inview/angular-inview.js',
'bower_components/browserdetection/src/browser-detection.js',
'bower_components/compare-versions/index.js',
'bower_components/ng-file-upload/ng-file-upload.min.js',
'bower_components/angular-local-storage/dist/angular-local-storage.min.js',
'assets/js/shared.module.js',
'assets/js/walletDirectives.js',
'assets/js/sharedServices/*.service.js',
'assets/js/sharedDirectives/*.directive.js',
'tests/wallet-app.module.spec.js',
'assets/js/landingCtrl.js',
'assets/js/core/wallet-app.core.module.js',
'build/js/templates.js',
'assets/js/controllers/**/*.controller.js',
'assets/js/components/**/*.component.js',
'assets/js/wallet-filters.module.js',
'assets/js/filters/*.js',
'assets/js/services/**/*.service.js',
'assets/js/directives/*.directive.js',
'assets/js/constants/**/*.constant.js',
'assets/js/wallet-lazy-load.module.js',
'assets/js/core/*.js',
'tests/filters/*.js',
'tests/controllers/**/*.js',
'tests/components/*.js',
'tests/services/**/*.js',
'tests/directives/*.js',
'tests/mocks/**/*.js',
'tests/**/*.js',
'app/templates/*.pug'
],
autoWatch: true,
preprocessors: {
'**/*.pug': ['ng-pug2js'],
'assets/js/core/wallet-app.core.module.js': ['babel'],
'assets/js/controllers/**/*.js': ['coverage', 'babel'],
'assets/js/components/**/*.js': ['coverage', 'babel'],
'assets/js/wallet-filters.module.js': ['babel', 'coverage'],
'assets/js/filters/*.filter.js': ['babel', 'coverage'],
'assets/js/services/*.service.js': ['babel', 'coverage'],
'assets/js/directives/*.directive.js': ['babel', 'coverage'],
'assets/js/shared.module.js': ['babel'],
'assets/js/walletDirectives.js': ['babel'],
'assets/js/sharedServices/*.service.js': ['babel', 'coverage'],
'assets/js/sharedDirectives/*.directive.js': ['babel', 'coverage'],
'assets/js/core/*.service.js': ['babel'],
'assets/js/routes.js': ['babel', 'coverage'],
'assets/js/wallet-app.module.js': ['babel'],
'assets/js/landingCtrl.js': ['babel', 'coverage'],
'tests/**/*.js': ['babel']
},
babelPreprocessor: {
options: {
presets: ['es2015'],
sourceMap: 'inline'
},
filename: function (file) {
return file.originalPath.replace(/\.js$/, '.es5.js');
},
sourceFileName: function (file) {
return file.originalPath;
}
},
ngPug2JsPreprocessor: {
stripPrefix: 'app/',
prependPrefix: '',
// or define a custom transform function
// cacheIdFromPath: function(filepath) {
// console.log(filepath);
// return null;
// },
// Support for pug locals to render at compile time
// locals: {
// foo: 'bar'
// },
templateExtension: 'html',
// setting this option will create only a single module that contains templates
// from all the files, so you can load them all with module('foo')
// moduleName: 'foo',
// Pug compiler options. For a list of possible options, consult Pug documentation.
pugOptions: {
doctype: 'xml'
}
},
browserify: {
debug: true,
transform: [
'babelify',
['browserify-istanbul', { instrumenter: require('isparta') }]
]
},
frameworks: ['jasmine', 'browserify'],
browsers: ['PhantomJS'],
reporters: ['progress', 'osx', 'coverage'],
coverageReporter: {
reporters: [
{type: 'html', dir: 'coverage/'},
{type: 'lcovonly', dir: 'coverage-lcov/'}
],
subdir: '.'
}
};
if (process.env.TRAVIS) {
// Optionally do something Travis specific
}
config.set(configuration);
};