This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
forked from flightjs/jasmine-flight
-
Notifications
You must be signed in to change notification settings - Fork 3
/
karma.conf.js
74 lines (62 loc) · 1.88 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
// Karma configuration file
//
// For all available config options and default values, see:
// https://github.com/karma-runner/karma/blob/stable/lib/config.js#L54
module.exports = function (config) {
'use strict';
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome'],
preprocessors: {
'lib/jasmine-flight.js': ['webpack'],
'test/spec/**/*.js': ['webpack'],
},
// list of files / patterns to load in the browser
files: [
// jQuery
'bower_components/jquery/dist/jquery.js',
// jasmine-jquery
'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
// jasmine-flight (what we're actually testing!)
'lib/jasmine-flight.js',
// specs
'test/spec/**/*.js',
],
// frameworks to use
frameworks: [
'jasmine'
],
plugins: [
'karma-webpack',
'karma-chrome-launcher',
'karma-jasmine'
],
webpack: {
resolve: {
root: __dirname,
alias: {
'flight': 'bower_components/flight',
'mock/example': 'test/mock/example.js',
'mock/example_mixin': 'test/mock/example_mixin.js',
'mock/example_module': 'test/mock/example_module.js',
},
},
modulesDirectories: ['bower_components'],
},
webpackServer: {
progress: false,
stats: false,
debug: false,
quiet: true
},
reporters: [process.env.TRAVIS ? 'dots' : 'progress'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false
});
};