Skip to content

Commit

Permalink
fuck WSL, finally no more hassels with ChromeHeadless
Browse files Browse the repository at this point in the history
  • Loading branch information
riophae committed Aug 11, 2019
1 parent 606ec7a commit 4a62c56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"pre-commit": "^1.2.2",
"pug": "^2.0.0",
"pug-loader": "^2.4.0",
"puppeteer": "^1.19.0",
"raw-loader": "^3.0.0",
"regenerator-runtime": "^0.13.1",
"rimraf": "^2.6.2",
Expand Down
14 changes: 8 additions & 6 deletions test/unit/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
const webpackConfig = require('../../build/webpack.test.conf')

process.env.CHROME_BIN = require('puppeteer').executablePath()

module.exports = config => {
config.set({
files: [ './index.js' ],
browsers: [ 'CustomChrome' ],
browsers: [ 'ChromeHeadlessWithoutSandbox' ],
customLaunchers: {
CustomChrome: {
// `ChromeHeadless` without any flags used to be fine,
// but it is not now for some unknown reason.
ChromeHeadlessWithoutSandbox: {
// `ChromeHeadless` without any flags used to be working
// well, but it is not now for some unknown reason.
// Adding `--no-sandbox` flag solves the issue, which
// I know is insecure. But since we are only running
// tests, there would be no problem.
// I know is insecure. But since we are only using
// Chrome to run the tests, it should be just fine.
base: 'ChromeHeadless',
flags: [ '--no-sandbox' ],
},
Expand Down

0 comments on commit 4a62c56

Please sign in to comment.