Skip to content

Commit

Permalink
fix: use chromeheadless not sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Jan 15, 2020
1 parent b1cde9b commit a2f9810
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ phases:
nodejs: 10
commands:
- npm install -g yarn
- curl https://intoli.com/install-google-chrome.sh | bash #TODO: install headless chrome to codebuild image
build:
commands:
- echo Building...
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@
"clients/*"
],
"nohoist": [
"**/karma",
"**/karma/**",
"**/karma-*",
"**/karma-*/**"
"**/karma*",
"**/karma*/**"
]
},
"husky": {
Expand Down
10 changes: 7 additions & 3 deletions packages/hash-blob-browser/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ module.exports = function(config) {
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ["ChromeHeadless"],
browsers: ["ChromeHeadlessNoSandbox"],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: "ChromeHeadless",
flags: ["--no-sandbox"]
}
},

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
Expand Down
2 changes: 1 addition & 1 deletion packages/hash-blob-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"prepublishOnly": "tsc",
"pretest": "tsc",
"test": "karma start karma.conf.js"
"test": "karma start karma.conf.js --browsers ChromeHeadlessNoSandbox"
},
"main": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
8 changes: 7 additions & 1 deletion packages/stream-collector-browser/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ module.exports = function(config) {
"**/*.ts": "karma-typescript"
},
reporters: ["progress", "karma-typescript"],
browsers: ["ChromeHeadless"],
browsers: ["ChromeHeadlessNoSandbox"],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: "ChromeHeadless",
flags: ["--no-sandbox"]
}
},
karmaTypescriptConfig: {
tsconfig: "./tsconfig.json",
bundlerOptions: {
Expand Down
2 changes: 1 addition & 1 deletion packages/stream-collector-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"prepublishOnly": "tsc",
"pretest": "tsc -p tsconfig.json",
"test": "karma start karma.conf.js"
"test": "karma start karma.conf.js --browsers ChromeHeadlessNoSandbox"
},
"author": {
"name": "AWS SDK for JavaScript Team",
Expand Down

0 comments on commit a2f9810

Please sign in to comment.