From: Nicolas Coden Date: Sun, 25 Mar 2018 01:25:02 +0000 (+0200) Subject: fix: ensure that headless-chrome tests run in all environments X-Git-Tag: v6.6.0~3^2~248^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14b4e12c2;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: ensure that headless-chrome tests run in all environments Bug with the Linux sandbox SUID can appear or not depending on the Kernel version on the runner. https://gist.github.com/ncoden/6e79cef6f62608fd9443ea2a601806bc Using `no-sandbox` with chrome is generally not recommended for security reasons, but recommended in this case by Travis. See: * https://docs.travis-ci.com/user/chrome#Sandboxing * https://github.com/travis-ci/travis-ci/issues/8836 * https://github.com/GoogleChrome/puppeteer/issues/515 --- diff --git a/package.json b/package.json index 1b3bebb61..9b12b9f47 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ "test:ci": "npm run test:sass && npm run test:javascript:ci", "test:sass": "mocha test/sass/test_sass.js", "test:javascript:transpile": "gulp sass:foundation && gulp test:transpile-js", - "test:javascript:units": "npm run test:javascript:transpile && mocha-headless-chrome -a ignore-resource-errors -f test/javascript/index.html", + "test:javascript:units": "npm run test:javascript:transpile && mocha-headless-chrome -a ignore-resource-errors -a no-sandbox -f test/javascript/index.html", "test:javascript:browserstack": "npm run test:javascript:transpile && browserstack-runner", - "test:javascript:ci": "npm run test:javascript:transpile && mocha-headless-chrome -a ignore-resource-errors -f test/javascript/index.html && browserstack-runner", + "test:javascript:ci": "npm run test:javascript:transpile && mocha-headless-chrome -a ignore-resource-errors -a no-sandbox -f test/javascript/index.html && browserstack-runner", "test:visual": "gulp test", "deploy": "gulp deploy", "deploy:prep": "gulp deploy:prep",