chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot

This commit is contained in:
RhenCloud 2026-08-15 17:30:51 +08:00
parent 04fa52db52
commit 320e825bf8
No known key found for this signature in database
GPG key ID: A574A617378C4E0B
15 changed files with 405 additions and 3 deletions

View file

@ -122,6 +122,8 @@ server/ # Nitro server
└── locales/ # en.ts, zh.ts translation dictionaries
tests/ # bun test unit tests (webhook, formatter, discord, telegram, admin, groups, invites, audit, send-log, token-store, ...)
tests/fixtures/ # provider payload fixtures (github/gitea/custom) feeding provider + formatter tests
tests/__snapshots__/ # formatter snapshot golden files (toMatchSnapshot)
```
## Responsibilities
@ -200,6 +202,13 @@ bun run lint # ESLint
bun test # Unit tests (under tests/)
```
Test suites beyond the per-module unit tests: provider fixtures (`tests/fixtures/` +
`tests/provider-fixtures.test.ts`), formatter snapshots (`tests/formatter-snapshot.test.ts`
`tests/__snapshots__/`), and platform contract tests (`tests/platform-contract.test.ts`, which
assert the Discord/Telegram renderers clamp to their platform limits). CI
(`.github/workflows/ci.yml`) runs `bun install --frozen-lockfile` + `bun test` + `bun run lint`;
CodeQL (`codeql.yml`) and Dependabot (`dependabot.yml`) are configured under `.github/`.
## Documentation
Keep every functional change in sync with the docs. After implementing a feature, fix,