File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 11language : node_js
2- # Temporary workaround.
3- # Karma can't access the binaries on travis
4- # without root access.
5- # See https://github.com/travis-ci/travis-ci/issues/8836
6- sudo : required
2+ sudo : false
73node_js :
84- " 4"
95- " 6"
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ module.exports = function( grunt ) {
1313 }
1414
1515 var fs = require ( "fs" ) ,
16- gzip = require ( "gzip-js" ) ;
16+ gzip = require ( "gzip-js" ) ,
17+ isTravis = process . env . TRAVIS ;
1718
1819 if ( ! grunt . option ( "filename" ) ) {
1920 grunt . option ( "filename" , "jquery.js" ) ;
@@ -151,6 +152,12 @@ module.exports = function( grunt ) {
151152 options : {
152153 customContextFile : "test/karma.context.html" ,
153154 customDebugFile : "test/karma.debug.html" ,
155+ customLaunchers : {
156+ ChromeHeadlessNoSandbox : {
157+ base : "ChromeHeadless" ,
158+ flags : [ "--no-sandbox" ]
159+ }
160+ } ,
154161 frameworks : [ "qunit" ] ,
155162 middleware : [ "mockserver" ] ,
156163 plugins : [
@@ -214,7 +221,9 @@ module.exports = function( grunt ) {
214221 singleRun : true
215222 } ,
216223 main : {
217- browsers : [ "ChromeHeadless" ]
224+
225+ // The Chrome sandbox doesn't work on Travis.
226+ browsers : [ isTravis ? "ChromeHeadlessNoSandbox" : "ChromeHeadless" ]
218227 } ,
219228
220229 // To debug tests with Karma:
You can’t perform that action at this time.
0 commit comments