Skip to content

Commit

Permalink
Merge pull request #85 from Financial-Times/smoke-ignore-cert-errors
Browse files Browse the repository at this point in the history
Ignore certificate errors
  • Loading branch information
debugwand authored Aug 31, 2018
2 parents 7505efb + a2377b6 commit 9d43e1b
Show file tree
Hide file tree
Showing 2 changed files with 5 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
4 changes: 3 additions & 1 deletion lib/smoke/smoke-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ class SmokeTest {
const puppetTests = [];
const crossBrowserTests = [];

this.browser = await puppeteer.launch();
// https://github.com/GoogleChrome/puppeteer/issues/2377
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 9d43e1b

Please sign in to comment.