Skip to content

Commit ff0ec86

Browse files
authored
Merge pull request #1568 from tanem/automate-example-verification
Automate example verification with Playwright
2 parents 95fb7e6 + 5c21ebe commit ff0ec86

8 files changed

Lines changed: 1089 additions & 16 deletions

.github/copilot-instructions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ These constraints are not expressed in the source code and affect how features s
5555
- Do not use em dashes (``). Use colons, full stops, or other punctuation.
5656
- Code comments should only document non-obvious behaviour, constraints, or design decisions.
5757

58+
## Example Tests
59+
60+
- `npm test` builds and verifies all examples in `examples/` via Playwright (`test/examples.test.ts`).
61+
- `npm run test:examples` runs only example verification (useful for quick iteration).
62+
- When adding, removing, or renaming an example, update the `parcelExamples` or `umdExamples` arrays in `test/examples.test.ts` and the `parcelExamples` array in `scripts/build-examples.js`.
63+
- Parcel examples must be listed in `scripts/build-examples.js` so they are built with the local library before testing.
64+
- UMD examples are served as static HTML. Their unpkg CDN requests are intercepted and fulfilled with the local UMD build.
65+
5866
## Commits
5967

6068
- Prefer single-line commit messages.

0 commit comments

Comments
 (0)