]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: ensure that headless-chrome tests run in all environments
authorNicolas Coden <nicolas@ncoden.fr>
Sun, 25 Mar 2018 01:25:02 +0000 (03:25 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sun, 25 Mar 2018 01:25:02 +0000 (03:25 +0200)
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

package.json

index 1b3bebb6108f9db76b5c395a26d5de37c1379c08..9b12b9f47b82083abd0f8b1cb668390ea52b87b8 100644 (file)
@@ -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",