-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma.conf.js
47 lines (45 loc) · 1.4 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
const webpackConfig = require('./webpack.config.karma.js');
var configuration = {
frameworks: ['jasmine'],
files: [
// CoveoJsSearch, CoveoJsSearchTests, and CoveoForDynamics are included as externals, so you need include them in your testing environment.
{
pattern: 'node_modules/coveo-search-ui/bin/js/CoveoJsSearch.js',
watched: false
},
{
pattern: 'node_modules/coveo-search-ui-tests/bin/js/CoveoJsSearchTests.js',
watched: false
},
{
pattern: 'node_modules/coveofordynamics-search-ui/bin/js/CoveoForDynamics.js',
watched: false
},
{ pattern: 'src/Index.ts' },
{ pattern: 'tests/**/*.spec.ts' }
],
preprocessors: {
// Builds both the components and the tests.
'src/**/*.ts': ['webpack'],
'tests/**/*.spec.ts': ['webpack'],
},
// Required for Chrome, if you use it.
mime: { 'text/x-typescript': ['ts'] },
// Creates coverage files.
reporters: ['coverage-istanbul', 'spec'],
coverageIstanbulReporter: {
dir: './bin/coverage',
reports: [
'cobertura',
'json',
'lcov',
'text-summary'
],
fixWebpackSourcePaths: true
},
webpack: webpackConfig,
browsers:['Chrome']
};
module.exports = function(config) {
config.set(configuration);
};