Skip to content

Very basic test suite infrastructure#999

Open
stuartlangridge wants to merge 2 commits intoNerdyDayTrips:mainfrom
stuartlangridge:testsuite
Open

Very basic test suite infrastructure#999
stuartlangridge wants to merge 2 commits intoNerdyDayTrips:mainfrom
stuartlangridge:testsuite

Conversation

@stuartlangridge
Copy link
Contributor

A bash script, run-tests.sh, which runs a web page test suite. This installs playwright if not already installed, and a headless chromium, and then runs all the tests it discovers. A very very basic test is in tests/ but this is mostly there to confirm that the infrastructure works. It should be an example for how to write more tests, though, along with the playwright documentation.

Note that we also add a new envar, HUGO_SKIP_OPENGRAPH; if this envar is defined, we skip generating the opengraph images. The test suite uses this because it means that spinning up the server as a fresh build only takes a few seconds and not three minutes.

A bash script, run-tests.sh, which runs a web page test suite.
This installs [playwright](https://playwright.dev) if not already installed, and a headless chromium, and then runs all the tests it discovers.
A very very basic test is in tests/ but this is mostly there to confirm that the infrastructure works. It should be an example for how to write more tests, though, along with the playwright documentation.

Note that we also add a new envar, HUGO_SKIP_OPENGRAPH; if this envar is defined, we skip generating the opengraph images. The test suite uses this because it means that spinning up the server as a fresh build only takes a few seconds and not three minutes.
@popey popey added the enhancement New feature or request label Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants