Skip to content

Commit 696a293

Browse files
committed
fix(stark-testing): make sure to use chrome from puppeteer
In test, we use `puppeteer` to setup chrome ISSUES CLOSED: #4028
1 parent 19019ed commit 696a293

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

docs/MIGRATION_ANGULAR_16.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ in `package.json` remove the following script
102102
}
103103
```
104104

105+
### adapt `karma.conf.js`
106+
107+
```txt
108+
//lines to removed
109+
110+
// Puppeteer: https://github.com/GoogleChrome/puppeteer/
111+
// takes care of download Chrome and making it available (can do much more :p)
112+
process.env.CHROME_BIN = require("puppeteer").executablePath();
113+
```
114+
105115
### test
106116

107117
- remove `node_module` directory

docs/MIGRATION_GUIDE_STARK_12.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,21 @@ Due to this, following changes have to be made in application using `stark-testi
839839
"test-fast:ci": "npm run ng -- test --watch=false --code-coverage"
840840
```
841841

842+
-- Adapt "karma.conf.js"
843+
844+
```txt
845+
/**
846+
* Load karma config from Stark
847+
*/
848+
const defaultKarmaConfig = require("./node_modules/@nationalbankbelgium/stark-testing/karma.conf.js").rawKarmaConfig;
849+
850+
//Add following lines
851+
852+
// Puppeteer: https://github.com/GoogleChrome/puppeteer/
853+
// takes care of download Chrome and making it available (can do much more :p)
854+
process.env.CHROME_BIN = require("puppeteer").executablePath();
855+
```
856+
842857
## Stark-UI
843858

844859
### 1. Update styles

packages/stark-testing/karma.conf.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ const helpers = require("./helpers");
33
const ci = require("ci-info");
44
const isCI = process.argv.indexOf("--watch=false") > -1 || !!ci.isCI;
55

6+
// Puppeteer: https://github.com/GoogleChrome/puppeteer/
7+
// takes care of download Chrome and making it available (can do much more :p)
8+
process.env.CHROME_BIN = require("puppeteer").executablePath();
9+
610
const rawKarmaConfig = {
711
// base path that will be used to resolve all patterns (e.g. files, exclude)
812
basePath: "",

0 commit comments

Comments
 (0)