The test gate, suite by suite

Every site built with Croftweaver carries its own test gate: 12 test suites that run against the finished build. This page lists each one, with what it checks, an example of a failure, and what a pass does not prove.

When the gate runs

By default the suites run before every push: a git hook builds the site and tests that build in one desktop-size browser. They run again on GitHub, for every pull request and for every push to main and production.

Two limits apply. The hook can be skipped with one flag. And today nothing on the server stops a person from publishing a build that failed: the default publish path runs the tests first, but it is a default, not a lock.

These are the suites of the toolkit template at commit 8ea17a7, copied on .

People can use it

Accessibility tests/a11y.spec.ts

Checks
Automated WCAG A and AA checks on every page, in light and dark.
Fails when
A text colour with too little contrast in the dark theme fails, even when the light theme passes.
Does not prove
Automated rules catch only part of what makes a page accessible, and the run uses one desktop-size browser. Keyboard use and screen readers still need a person.

Navigation tests/navigation.spec.ts

Checks
Every page loads, and internal links written from the site root resolve.
Fails when
A link to a page that was renamed fails. So does a link that only works through a redirect.
Does not prove
Links written relative to the current page are not followed, and links to other sites are not checked.

Anchors tests/anchors.spec.ts

Checks
Every internal link to a section lands on a real section.
Fails when
An internal link to a section fails when no element on the target page has that id.
Does not prove
It cannot tell whether the section is the one you meant. Section links into other sites, and into files such as PDFs, are skipped.

Images tests/images.spec.ts

Checks
A modern format, fixed dimensions, an alt text and a loading choice for every image.
Fails when
A JPEG with no modern format beside it and no width and height fails on two counts: the format, and the missing dimensions.
Does not prove
An empty alt text passes, because a decorative image needs one. It cannot tell whether a description fits the picture.

It says what you mean

Positioning tests/positioning.spec.ts

Checks
The term a page stands for appears where the page’s rule says it must, normally in its title, its description and its opening.
Fails when
A rewrite that drops a required term from the page title fails.
Does not prove
It proves the term is present, not that the positioning is good. A page with no declared term only raises a warning.

Tone tests/tone.spec.ts

Checks
No em dashes, no common contractions and no listed buzzwords, in copy and metadata. Quotations are exempt.
Fails when
A headline with a common contraction fails. So does an em dash outside a quotation.
Does not prove
The word list is short and fixed. It cannot tell whether a sentence is clear or true.

Where the term of each page comes from: how the positioning is worked out, before any copy.

It is safe to publish

Email tests/email.spec.ts

Checks
No plaintext email address in the served HTML.
Fails when
An address typed straight into a page fails. It has to go through the component that hides it.
Does not prove
It reads the HTML the way a simple scraper does. A scraper that runs the scripts of a page can still recover the address.

Links tests/links.spec.ts

Checks
Domains you have retired never come back.
Fails when
A link to a domain you moved away from fails, once that domain is on the list.
Does not prove
The list starts empty and grows by hand. Whether links to other sites still work is a separate audit, not part of this gate.

Preview handling tests/middleware.spec.ts

Checks
Preview addresses ask search engines not to index them.
Fails when
A change that lets a preview address answer without the noindex header fails.
Does not prove
It calls the function directly, so it does not prove that the hosting account runs it. A noindex header also does not stop every AI crawler from citing a preview address.

After the tests, a review in two passes

The tests are the floor. Before a launch, and after a page is added or rewritten, a review skill reads the site in two passes. The first looks for bugs. The second looks for things that no longer match across files: routes, addresses, metadata, config and docs. It reports a ranked list and changes nothing by itself.

For a change with more at stake, such as repositioning a whole site, the skill can send the same material to one independent AI model for a second opinion. It explains the choice and asks you first.

What no test here covers