UNPKG

2.18 kBJavaScriptView Raw
1module.exports = function (karma) {
2 karma.set({
3 /**
4 * From where to look for files, starting with the location of this file.
5 */
6 basePath: '.',
7
8 /**
9 * This is the list of file patterns to load into the browser during testing.
10 */
11 files: [
12 'node_modules/sofa-core/dist/sofa.core.js',
13 'node_modules/sofa-storages/dist/sofa.storages.js',
14 'node_modules/sofa-testing/mocks/sofa.config.mock.js',
15 'node_modules/angular/angular.js',
16 'node_modules/angular-mocks/angular-mocks.js',
17 'src/**/*.js',
18 'test/**/*.spec.js'
19 ],
20 exclude: [],
21 frameworks: ['jasmine'],
22 plugins: [
23 'karma-jasmine',
24 'karma-firefox-launcher',
25 'karma-chrome-launcher'
26 ],
27 preprocessors: {},
28
29 /**
30 * How to report, by default.
31 */
32 reporters: 'dots',
33
34 /**
35 * On which port should the browser connect, on which port is the test runner
36 * operating, and what is the URL path for the browser to use.
37 */
38 port: 9018,
39 runnerPort: 9101,
40 urlRoot: '/',
41
42 /**
43 * Disable file watching by default.
44 */
45 autoWatch: false,
46
47 /**
48 * The list of browsers to launch to test on. This includes only "Firefox" by
49 * default, but other browser names include:
50 * Chrome, ChromeCanary, Firefox, Opera, Safari, PhantomJS
51 *
52 * Note that you can also use the executable name of the browser, like "chromium"
53 * or "firefox", but that these vary based on your operating system.
54 *
55 * You may also leave this blank and manually navigate your browser to
56 * http://localhost:9018/ when you're running tests. The window/tab can be left
57 * open and the tests will automatically occur there during the build. This has
58 * the aesthetic advantage of not launching a browser every time you save.
59 */
60 browsers: [
61 process.env.TRAVIS ? 'Firefox' : 'Chrome'
62 ]
63 });
64};
65