forked from BioPhoton/angular1-star-rating
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
81 lines (68 loc) · 2.24 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
var path = require("path");
var webpack = require("webpack");
var webpackConfig = require("./webpack.config.js");
var base_c = require("./chore/chore.config");
webpackConfig.entry = {};
webpackConfig.output.filename = "[name].js";
// Karma configuration
// Generated on Fri Jan 16 2015 01:40:34 GMT+0200 (EET)
module.exports = function (config) {
var cfg = {
basePath: ".",
frameworks: ["jasmine"],
port: 3000,
logLevel: config.LOG_INFO,
colors: true,
autoWatch: true,
browsers: ["PhantomJS"],
customLaunchers: {
Chrome_Travis_CI: {
base: 'PhantomJS'
}
},
files: [
"./node_modules/angular/angular.js"
, "./dist/index.js"
, "./src/index.spec.ts"
//, "./src/star-rating.controller.spec.ts"
],
// Karma plugins loaded
plugins: [
"karma-webpack"
, "karma-jasmine"
, 'karma-typescript-preprocessor'
, "karma-coverage"
, "karma-chrome-launcher"
, "karma-phantomjs-launcher"
],
// Coverage reporter generates the coverage
reporters: ["progress", "dots", "coverage"],
// Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: {
// "./src/index.ts": ["webpack"]
"./src/*.spec.ts": ["webpack", "coverage"]
//"src/**/*!(*.spec*|*.protractor*|*.mock*|*.bundle*).ts": ["webpack", "coverage"]
//, "./src/star-rating.component.ts": ["webpack", "coverage"]
//, './src/index.ts':['webpack','coverage']
, './dist/*.js':['coverage']
},
webpack: webpackConfig,
coverageReporter: {
reporters: [
{dir: "coverage/"},
{type: "text"},
{
type : 'json',
subdir : '.',
file : 'coverage-final.json'
}
]
},
singleRun: true
};
if (process.env.TRAVIS) {
cfg.browsers = ['Chrome_Travis_CI'];
}
config.set(cfg);
};