Skip to content

Commit

Permalink
Add node development for ignoring certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
debugwand committed Aug 31, 2018
1 parent 7926a28 commit a2377b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ You can also run:

This allows you to select a suite of URLs (in this case, "basic"), and open them in Chromium. This is useful for manually testing a set of URLs.

If, when running locally, you are seeing errors about certificates not being valid, set NODE_ENV to be 'development' e.g. `NODE_ENV=development;n-test smoke -H http://localhost:8080`. This will use some launch options that ignore certificate errors.

### Expectations

Checking response statii is great for checking that your application responds with _something_, but not necessarily the right thing. n-test comes with a bunch of basic things that you check for.
Expand Down
3 changes: 2 additions & 1 deletion lib/smoke/smoke-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class SmokeTest {
const crossBrowserTests = [];

// https://github.com/GoogleChrome/puppeteer/issues/2377
this.browser = await puppeteer.launch({args: ['--ignore-certificate-errors', '--enable-features=NetworkService']});
const launchOptions = (process.NODE_ENV === 'development') ? {args: ['--ignore-certificate-errors', '--enable-features=NetworkService']} : {};
this.browser = await puppeteer.launch(launchOptions);

for (let suiteOptions of configsToRun) {
for (let path in suiteOptions.urls) { //eslint-disable-line guard-for-in
Expand Down

0 comments on commit a2377b6

Please sign in to comment.