-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
91 lines (81 loc) · 2.19 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
var path = require('path');
var webpack = require('webpack');
module.exports = function(config) {
config.set({
files: [
// all files ending in "test"
'test/**/*.spec.js'
// each file acts as entry point for the webpack configuration
],
// frameworks to use
frameworks: ['mocha', 'expect'],
preprocessors: {
// only specify one entry point
// and require all tests in there
'test/**/*.spec.js': ['webpack']
},
// reporters: ['spec'],
webpack: {
// webpack configuration
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel?presets[]=es2015'
},
{
test: /\.js$/,
include: /node_modules\/framework-concept/,
loader: 'babel?presets[]=es2015'
},
{
test: /\.js$/,
include: /node_modules\/PatchIt/,
loader: 'babel?presets[]=es2015'
},
{
test: /\.html$/,
loader: 'html',
exclude: /node_modules/
}
]
},
resolve: {
root: path.resolve(__dirname),
extensions: ['', '.js', '.html'],
alias: {
flight: 'node_modules/framework-concept/flight',
PatchIt: 'node_modules/PatchIt',
components: 'src/components',
domain: 'src/domain',
events: 'src/events',
namespace: 'src/namespace',
repositories: 'src/repositories',
}
}
},
webpackMiddleware: {
// webpack-dev-middleware configuration
noInfo: true
},
customLaunchers: {
chrome_without_security: {
base: 'Chrome',
flags: ['--disable-web-security']
},
sauce_chrome_win: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'windows'
}
},
plugins: [
require("karma-chrome-launcher"),
require("karma-webpack"),
require("karma-mocha"),
require("karma-expect"),
],
browsers: ['Chrome']
});
};