x/pkgsite: frontend testing strategy #43361
The frontend testing strategy will include a combination of unit, e2e, visual diffing, accessibility, and performance tests using Puppeteer and the Jest testing framework. Lighthouse will be integrated in the testing suite to make assertions on performance and accessibility.
Code in script files should be tested by co-located .test.ts files.
Snapshot tests will be written for pages served by the pkgsite.
Example performance tests.
The text was updated successfully, but these errors were encountered:
This change updates the jest config to specify test environments separately for unit and e2e tests and adds the isolated modules option to the ts-jest config to improve test startup time. For golang/go#43361 Change-Id: I3fbfae2a42c26bd0eeb2d235dab1cced0c8701ea Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/280711 Trust: Jamal Carvalho <email@example.com> Run-TryBot: Jamal Carvalho <firstname.lastname@example.org> TryBot-Result: kokoro <email@example.com> Reviewed-by: Jonathan Amsterdam <firstname.lastname@example.org>
Migrates CopyToClipboardController to TypeScript and adds a unit test. For golang/go#43359 For golang/go#43361 Change-Id: I2e1179aa7cecb0e280a57d420ee2f885c4d6db3c Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/280893 Reviewed-by: Julie Qiu <email@example.com> Trust: Jamal Carvalho <firstname.lastname@example.org>