mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot
This commit is contained in:
15 files changed
+405
-3
No files matched your search
@@ -75,8 +75,14 @@ server/ # Nitro server (H3 handlers in server/routes/)
|
||||
└── locales/ # en.ts, zh.ts translation dictionaries
|
||||
|
||||
tests/ # Unit tests (bun test)
|
||||
tests/fixtures/ # Provider payload fixtures (github/gitea/custom)
|
||||
tests/__snapshots__/ # Formatter snapshot golden files
|
||||
```
|
||||
|
||||
Continuous integration (`.github/workflows/ci.yml`) runs `bun install --frozen-lockfile`,
|
||||
`bun test`, and `bun run lint`. CodeQL (`codeql.yml`) and Dependabot (`dependabot.yml`) are
|
||||
configured under `.github/`.
|
||||
|
||||
## Scripts
|
||||
|
||||
| Command | Description |
|
||||
@@ -112,6 +118,12 @@ bun test
|
||||
curl http://localhost:8787/health
|
||||
```
|
||||
|
||||
Beyond the per-module unit tests, the suite includes provider fixtures
|
||||
(`tests/fixtures/` + `tests/provider-fixtures.test.ts`), formatter snapshots
|
||||
(`tests/formatter-snapshot.test.ts`), and platform contract tests
|
||||
(`tests/platform-contract.test.ts`) that assert the Discord/Telegram renderers clamp to their
|
||||
platform limits.
|
||||
|
||||
## Adding a New Event Formatter
|
||||
|
||||
1. Add the event type to `GITHUB_COLORS` in `server/lib/formatters/colors.ts` (if new color needed)
|
||||
|
||||
Reference in new issue
Block a user