-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
68 lines (68 loc) · 2.5 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
// import the config and remove the entry
// see http://mike-ward.net/2015/09/07/tips-on-setting-up-karma-testing-with-webpack/
var webpackConfig = require('./webpack-test.config.js');
webpackConfig.entry = {};
module.exports = function (config) {
config.set({
// To run in additional browsers:
// 1. install corresponding karma launcher
// http://karma-runner.github.io/0.13/config/browsers.html
// 2. add it to the `browsers` array below.
// Alter windows posn and size see http://stackoverflow.com/questions/21968124/start-minimized-browser-instance-with-karma
browsers: ['Chrome_small'],
customLaunchers: {
Chrome_small: {
base: 'Chrome' ,
flags: [
'--window-size=400,400',
'--window-position=-600,200'
]
}
},
port: 9877, // allow parallel testing with DimRS (port 9876)
// sinon-chai must be at end to avoid masking chai
frameworks: ['mocha', 'chai', 'chai-datetime', 'sinon-chai'],
reporters: ['mocha'],
// list of files / patterns to load in the browser
// To test sections of ReScatter that us the dimensionality
// reduction service must include DimRS
// basePath is from top of parent project
basePath: '../',
files: [
'ReScatter/src/index.js',
'ReScatter/test/tsnetest/index.js',
// Built externally - no preprocessor declared
'DimRS/dist/dimrs.js',
],
preprocessors: {
'ReScatter/src/index.js': ['webpack'],
'ReScatter/test/testtsne/index.js': ['webpack'],
},
// webpack config - included
webpack: webpackConfig,
// list of files to exclude
exclude: [
],
//proxies : {
// '/': 'http://localhost:3000'
// },
// enable / disable colors in the output (reporters and logs)
colors: true,
logLevel: config.DEBUG,
// ** ADD THIS IN ** (vue-cli's webpack template doesn't add it by default)
plugins: [
// Preprocessors,
'karma-webpack',
// Launchers
'karma-chrome-launcher',
'karma-firefox-launcher',
// Test Libraries
'karma-mocha',
'karma-sinon-chai',
'karma-chai',
'karma-chai-datetime',
// Reporters
'karma-mocha-reporter',
],
});
};