Skip to content

Commit 6e91f7e

Browse files
committed
update karma configuration
1 parent 38d4a49 commit 6e91f7e

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

karma.conf.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
process.env.TEST = true;
2-
process.env.NODE_ENV = 'test';
2+
process.env.NODE_ENV = "test";
33

4-
const webpack = require("webpack");
5-
const path = require("path");
6-
const webpackConfig = require('./webpack.config.js')({ production: false, karma: true });
4+
const webpackConfig = require("./webpack.config.js")({ production: false, karma: true });
75

86
delete webpackConfig.entry;
97

10-
module.exports = function(config) {
8+
module.exports = config => {
119

1210
var configuration = {
1311
basePath: "",
@@ -18,13 +16,10 @@ module.exports = function(config) {
1816
"es6-shim"
1917
],
2018
files: [
21-
"./test/**/**/**.test.ts",
22-
{
23-
pattern: '**/*.map',
24-
served: true,
25-
included: false,
26-
watched: true
27-
}
19+
{ pattern: "node_modules/reflect-metadata/Reflect.js", include: true },
20+
{ pattern: "node_modules/bluebird/js/browser/bluebird.js", include: true },
21+
{ pattern: "./test/**/**/**.test.ts", include: true },
22+
{ pattern: '**/*.map', served: true, included: false, watched: true }
2823
],
2924
preprocessors: {
3025
"./**/**/**/**.ts": ["sourcemap"],
@@ -65,14 +60,14 @@ module.exports = function(config) {
6560
colors: true,
6661
logLevel: config.LOG_INFO,
6762
autoWatch: true,
68-
browsers: ['Chrome']
63+
browsers: []
6964
};
7065

7166
if (process.env.TRAVIS) {
72-
configuration.browsers = ['PhantomJS'];
67+
configuration.browsers.push("PhantomJS");
7368
configuration.plugins.push("karma-phantomjs-launcher");
7469
} else {
75-
configuration.browsers = ['PhantomJS'];
70+
configuration.browsers.push("PhantomJS");
7671
configuration.plugins.push("karma-phantomjs-launcher");
7772
}
7873

0 commit comments

Comments
 (0)