Skip to content

Commit

Permalink
chore: add proxy argument to functional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Dec 12, 2019
1 parent bacc5f3 commit 0b6f3b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CODING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ See the [node website](https://nodejs.org) to install node and npm.
* To debug iTowns package on your side project. You can link iTowns package with `npm link ../path/iTowns/` in project folder and auto-transpile to `lib/` when iTowns sources are modified with command `npm run watch` in iTowns folder.

## Testing
For unit test, defines `HTTPS_PROXY` if you launch test behind a proxy.
For unit and functional test, defines `HTTPS_PROXY` if you launch test behind a proxy.

In order to run the tests, [puppeteer](https://github.com/GoogleChrome/puppeteer)
needs to be installed. If installing puppeteer behind a proxy, use `HTTP_PROXY`,
Expand Down
4 changes: 4 additions & 0 deletions test/functional/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ before(async () => {
// using --no-sandbox.
const args = [];

if (process.env.HTTPS_PROXY) {
args.push(`--proxy-server=${process.env.HTTPS_PROXY}`);
}

if (process.env.REMOTE_DEBUGGING) {
args.push(`--remote-debugging-port=${process.env.REMOTE_DEBUGGING}`);
}
Expand Down

0 comments on commit 0b6f3b5

Please sign in to comment.