mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot
This commit is contained in:
parent
04fa52db52
commit
320e825bf8
15 changed files with 405 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue