Skip to content

Commit

Permalink
chore: use wait-on instead of delay in test script
Browse files Browse the repository at this point in the history
Instead of dealying 3 seconds and assuming that will be enough, use
`wait-on` to launch `linkinator` once the website is responding.
  • Loading branch information
Trott committed Sep 26, 2021
1 parent efb8c6f commit f96e24c
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 131 deletions.
222 changes: 94 additions & 128 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"load-schedule": "curl -sS https://raw.githubusercontent.com/nodejs/Release/master/schedule.json -o source/schedule.json",
"start": "npm run serve",
"test": "npm-run-all test:lint test:unit",
"linkinator": "delay 3 && linkinator http://localhost:8080/en/ --recurse --skip \"^(?!http://localhost)\" --verbosity error",
"linkinator": "wait-on http://localhost:8080/en/ && linkinator http://localhost:8080/en/ --recurse --skip \"^(?!http://localhost)\" --verbosity error",
"test:lint": "npm-run-all --parallel --aggregate-output test:lint:*",
"test:lint:js": "standard",
"test:lint:md": "remark -qf .",
Expand Down Expand Up @@ -66,7 +66,6 @@
"devDependencies": {
"chokidar": "^3.5.2",
"cross-env": "^7.0.3",
"delay-cli": "^1.1.0",
"faucet": "0.0.1",
"linkinator": "^2.14.0",
"lockfile-lint": "^4.6.2",
Expand All @@ -82,6 +81,7 @@
"stylelint": "^13.13.1",
"stylelint-config-twbs-bootstrap": "^2.2.3",
"tape": "^5.3.1",
"vnu-jar": "21.9.2"
"vnu-jar": "21.9.2",
"wait-on": "^6.0.0"
}
}

0 comments on commit f96e24c

Please sign in to comment.