Initial import into ODL
[dlux.git] / karma / karma-unit.tpl.js
1 module.exports = function ( karma ) {
2   karma.configure({
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       <% scripts.forEach( function ( file ) { %>'<%= file %>',
13       <% }); %>
14       'src/**/*.js',
15       'src/**/*.coffee',
16     ],
17     exclude: [
18       'src/assets/**/*.js'
19     ],
20     frameworks: [ 'jasmine' ],
21     plugins: [ 'karma-jasmine', 'karma-firefox-launcher', 'karma-chrome-launcher', 'karma-phantomjs-launcher', 'karma-coffee-preprocessor' ],
22     preprocessors: {
23       '**/*.coffee': 'coffee',
24     },
25
26     /**
27      * How to report, by default.
28      */
29     reporters: 'dots',
30
31     /**
32      * On which port should the browser connect, on which port is the test runner
33      * operating, and what is the URL path for the browser to use.
34      */
35     port: 9018,
36     runnerPort: 9100,
37     urlRoot: '/',
38
39     /** 
40      * Disable file watching by default.
41      */
42     autoWatch: false,
43
44     /**
45      * The list of browsers to launch to test on. This includes only "Firefox" by
46      * default, but other browser names include:
47      * Chrome, ChromeCanary, Firefox, Opera, Safari, PhantomJS
48      *
49      * Note that you can also use the executable name of the browser, like "chromium"
50      * or "firefox", but that these vary based on your operating system.
51      *
52      * You may also leave this blank and manually navigate your browser to
53      * http://localhost:9018/ when you're running tests. The window/tab can be left
54      * open and the tests will automatically occur there during the build. This has
55      * the aesthetic advantage of not launching a browser every time you save.
56      */
57     browsers: [
58       'Firefox'
59     ]
60   });
61 };
62