forked from mnugter/js-data-jsonapi-light
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
54 lines (53 loc) · 1.52 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
const webpackConfig = require('./webpack.config');
const path = require('path')
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'chai', 'sinon'],
files: [
'node_modules/es6-promise/dist/es6-promise.auto.js',
{ pattern: 'node_modules/js-data/dist/js-data.js', nocache: true, watched: true, served: true},
'node_modules/js-data-http/dist/js-data-http.js',
'dist/js-data-jsonapi-light.js',
'test/ds.ts',
'test/resources/**/*.ts',
'test/**/*.spec.ts',
{ pattern: 'test/api/**/*.json', watched: true, served: true, included: false }
],
proxies: {
"/api/": "/base/test/api"
},
exclude: [
],
preprocessors: {
'test/**/*.ts': ['webpack', 'sourcemap'],
'dist/js-data-jsonapi-light.js': ['coverage']
},
webpack: {
module: {
rules: [{
test: /\.ts$/,
include: path.resolve(__dirname, 'test'),
use: [
{ loader: 'ts-loader' }
]
}]
},
resolve: webpackConfig.resolve,
devtool: "inline-source-map"
},
coverageReporter: {
type: 'lcov',
dir: 'coverage/'
},
reporters: ['progress', 'coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: process.env.NODE_ENV === 'development',
browsers: ['PhantomJS'],
singleRun: process.env.NODE_ENV !== 'development',
concurrency: Infinity,
//client: { captureConsole: process.env.NODE_ENV === 'development' }
})
}