Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Add wait-on
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Strand committed Jan 8, 2020
1 parent 74a3bd5 commit a23b0c0
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
name: E2E tests
command: |
DocID=$(curl -s --data-binary @data/drugcases.qvf http://localhost:9076/v1/apps/import | jq -r '.attributes.id')
npm run start:build
npm run start:serve &
npm run start:cov
DocID=$DocID npm run test:e2e
npx nyc report -r html
Expand Down
66 changes: 66 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"start": "parcel src/index.html --open",
"start:build": "cross-env NODE_ENV=test parcel build src/index.html",
"start:serve": "cross-env NODE_ENV=test parcel serve src/index.html",
"start:cov": "npm run start:build && npm run start:serve & wait-on http-get://localhost:1234 -t 60000",
"test:unit": "aw --glob test/unit/*.spec.js --src src/logic/*.js --coverage",
"test:comp": "aw -c ./test/comp/aw.config.js && nyc report -t ./coverage/.nyc_output -r lcov -r text",
"test:e2e": "aw puppeteer -c ./test/e2e/aw.config.js",
Expand Down Expand Up @@ -81,6 +82,7 @@
"react-test-renderer": "16.12.0",
"stylelint": "12.0.1",
"stylelint-config-standard": "19.0.0",
"stylelint-order": "4.0.0"
"stylelint-order": "4.0.0",
"wait-on": "3.3.0"
}
}
2 changes: 1 addition & 1 deletion test/e2e/_setup.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ after(async () => {
const nyc = new NYC({});
await nyc.report();
if (!coverageFlag) {
console.log('\u001b[31m The code hasn´t been instrumented! Please start the server with `npm run start:build` and then `npm run start:serve`\u001b[0m'); // eslint-disable-line no-console
console.log('\u001b[31m The code hasn´t been instrumented! Please start the server with `npm run start:cov`\u001b[0m'); // eslint-disable-line no-console
}

await browser.close();
Expand Down

0 comments on commit a23b0c0

Please sign in to comment.