Skip to content

Commit

Permalink
fix: use puppeteer for karma testing browser bin to avoid using none-…
Browse files Browse the repository at this point in the history
…existing local binary
  • Loading branch information
michelherv authored and just-jeb committed Mar 4, 2021
1 parent a80f3d3 commit 79894c2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function(config) {
const path = require('path');
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"puppeteer": "^5.5.0",
"ts-node": "~8.1.1",
"tslint": "~6.1.0",
"typescript": "~4.0.5"
Expand Down
5 changes: 4 additions & 1 deletion packages/custom-webpack/examples/sanity-app/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function(config) {
const path = require('path');
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
Expand Down
1 change: 1 addition & 0 deletions packages/custom-webpack/examples/sanity-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"puppeteer": "^5.5.0",
"ts-node": "~8.2.0",
"tslint": "~6.1.0",
"typescript": "~4.0.5"
Expand Down

0 comments on commit 79894c2

Please sign in to comment.