grunt karma:dev now runs local browsers grunt karma:saucelabs runs saucelabs browsers
Showing
3 changed files
with
107 additions
and
4 deletions
... | @@ -113,10 +113,16 @@ module.exports = function(grunt) { | ... | @@ -113,10 +113,16 @@ module.exports = function(grunt) { |
113 | configFile: 'test/karma.conf.js', | 113 | configFile: 'test/karma.conf.js', |
114 | frameworks: ['qunit'] | 114 | frameworks: ['qunit'] |
115 | }, | 115 | }, |
116 | dev: { | 116 | |
117 | saucelabs: { | ||
117 | configFile: 'test/karma.conf.js', | 118 | configFile: 'test/karma.conf.js', |
118 | autoWatch: true | 119 | autoWatch: true |
119 | }, | 120 | }, |
121 | |||
122 | dev: { | ||
123 | configFile: 'test/localkarma.conf.js', | ||
124 | autoWatch: true | ||
125 | }, | ||
120 | ci: { | 126 | ci: { |
121 | configFile: 'test/karma.conf.js', | 127 | configFile: 'test/karma.conf.js', |
122 | autoWatch: false | 128 | autoWatch: false | ... | ... |
... | @@ -58,9 +58,9 @@ module.exports = function(config) { | ... | @@ -58,9 +58,9 @@ module.exports = function(config) { |
58 | 'karma-qunit', | 58 | 'karma-qunit', |
59 | 'karma-chrome-launcher', | 59 | 'karma-chrome-launcher', |
60 | 'karma-firefox-launcher', | 60 | 'karma-firefox-launcher', |
61 | //'karma-ie-launcher', | 61 | 'karma-ie-launcher', |
62 | //'karma-opera-launcher', | 62 | 'karma-opera-launcher', |
63 | //'karma-phantomjs-launcher', | 63 | 'karma-phantomjs-launcher', |
64 | 'karma-safari-launcher', | 64 | 'karma-safari-launcher', |
65 | 'karma-sauce-launcher' | 65 | 'karma-sauce-launcher' |
66 | ], | 66 | ], | ... | ... |
test/localkarma.conf.js
0 → 100644
1 | // Karma example configuration file | ||
2 | // NOTE: To configure Karma tests, do the following: | ||
3 | // 1. Copy this file and rename the copy with a .conf.js extension, for example: karma.conf.js | ||
4 | // 2. Configure the properties below in your conf.js copy | ||
5 | // 3. Run your tests | ||
6 | |||
7 | module.exports = function(config) { | ||
8 | config.set({ | ||
9 | // base path, that will be used to resolve files and exclude | ||
10 | basePath: '', | ||
11 | |||
12 | frameworks: ['qunit'], | ||
13 | |||
14 | // Set autoWatch to true if you plan to run `grunt karma` continuously, to automatically test changes as you make them. | ||
15 | autoWatch: false, | ||
16 | |||
17 | // Setting singleRun to true here will start up your specified browsers, run tests, and then shut down the browsers. Helpful to have in a CI environment, where you don't want to leave browsers running continuously. | ||
18 | singleRun: true, | ||
19 | |||
20 | // Start these browsers, currently available: | ||
21 | // - Chrome | ||
22 | // - ChromeCanary | ||
23 | // - Firefox | ||
24 | // - Opera | ||
25 | // - Safari (only Mac) | ||
26 | // - PhantomJS | ||
27 | // - IE (only Windows) | ||
28 | // Example usage: | ||
29 | browsers: ['Chrome','Firefox','Safari'], | ||
30 | |||
31 | // List of files / patterns to load in the browser | ||
32 | // Add any new src files to this list. | ||
33 | // If you add new unit tests, they will be picked up automatically by Karma, | ||
34 | // unless you've added them to a nested directory, in which case you should | ||
35 | // add their paths to this list. | ||
36 | |||
37 | files: [ | ||
38 | '../node_modules/video.js/dist/video-js/video.js', | ||
39 | '../node_modules/videojs-contrib-media-sources/videojs-media-sources.js', | ||
40 | '../test/karma-qunit-shim.js', | ||
41 | "../src/videojs-hls.js", | ||
42 | "../src/flv-tag.js", | ||
43 | "../src/exp-golomb.js", | ||
44 | "../src/h264-stream.js", | ||
45 | "../src/aac-stream.js", | ||
46 | "../src/segment-parser.js", | ||
47 | "../src/stream.js", | ||
48 | "../src/m3u8/m3u8-parser.js", | ||
49 | "../tmp/manifests.js", | ||
50 | "../tmp/expected.js", | ||
51 | "tsSegment-bc.js", | ||
52 | "../src/bin-utils.js", | ||
53 | "../src/async-queue.js", | ||
54 | '../test/*.js' | ||
55 | ], | ||
56 | |||
57 | plugins: [ | ||
58 | 'karma-qunit', | ||
59 | 'karma-chrome-launcher', | ||
60 | 'karma-firefox-launcher', | ||
61 | 'karma-ie-launcher', | ||
62 | 'karma-opera-launcher', | ||
63 | 'karma-phantomjs-launcher', | ||
64 | 'karma-safari-launcher' | ||
65 | ], | ||
66 | |||
67 | // list of files to exclude | ||
68 | exclude: [ | ||
69 | |||
70 | ], | ||
71 | |||
72 | |||
73 | // test results reporter to use | ||
74 | // possible values: 'dots', 'progress', 'junit' | ||
75 | reporters: ['progress'], | ||
76 | |||
77 | |||
78 | // web server port | ||
79 | port: 9876, | ||
80 | |||
81 | |||
82 | // cli runner port | ||
83 | runnerPort: 9100, | ||
84 | |||
85 | |||
86 | // enable / disable colors in the output (reporters and logs) | ||
87 | colors: true, | ||
88 | |||
89 | |||
90 | // level of logging | ||
91 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
92 | //logLevel: config.LOG_INFO, | ||
93 | |||
94 | // If browser does not capture in given timeout [ms], kill it | ||
95 | captureTimeout: 60000 | ||
96 | }); | ||
97 | }; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment