feat: generate OpenAPI without peer repositories
Backend security / security (pull_request) Successful in 7s
Backend verify / verify (pull_request) Successful in 2m28s
Conventional commits / commits (pull_request) Successful in 25s
Backend security / security (push) Successful in 6s
Backend verify / verify (push) Successful in 2m16s
Backend security / security (pull_request) Successful in 7s
Backend verify / verify (pull_request) Successful in 2m28s
Conventional commits / commits (pull_request) Successful in 25s
Backend security / security (push) Successful in 6s
Backend verify / verify (push) Successful in 2m16s
This commit was merged in pull request #19.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Backend testing
|
||||
|
||||
Перед нетривиальными тестами сформулируй
|
||||
[общий Test Intent](../../../.ai/conventions/testing.md); отдельный документ
|
||||
[общий Test Intent](engineering.md#test-intent); отдельный документ
|
||||
не требуется. Trivial low-risk изменения обходятся без него.
|
||||
|
||||
## Выбор уровня
|
||||
@@ -15,7 +15,7 @@
|
||||
| Pure mapper/decimal/domain branch | Unit со значимыми edge cases |
|
||||
| Service orchestration/access/retry policy | Jest с mocks внешних boundaries и observable outcome |
|
||||
| Pipe/guard/cookie/status/HTTP error | Configured Nest HTTP boundary; прямого вызова метода controller недостаточно |
|
||||
| OpenAPI metadata/wire schema | `test:openapi-contract` + потребительский contract check |
|
||||
| OpenAPI metadata/wire schema | `test:openapi-contract` + configured HTTP tests |
|
||||
| DB constraint/CAS/transaction/migration | Integration с изолированной реальной DB |
|
||||
| Только DTO declarations/thin wiring | Existing contract/type/build без искусственного unit test |
|
||||
|
||||
@@ -29,7 +29,7 @@ Unit specs colocated в `src/**/*.spec.ts`; HTTP/integration — `test/`.
|
||||
- [BrokerageAccountsService tests](../../src/modules/investments/brokerage-accounts/brokerage-accounts.service.spec.ts): отсутствие connection не вызывает upstream, нормализация и точные суммы.
|
||||
- [AuthService tests](../../src/modules/auth/application/auth.service.spec.ts): invalid/expired/superseded token и concurrent rotation; mock race test не является доказательством DB transaction.
|
||||
- [HTTP filter tests](../../src/common/filters/http-exception.filter.spec.ts): безопасный error envelope.
|
||||
- [OpenAPI integration](../../test/openapi-contract.e2e-spec.ts): configured app + frontend snapshot, без записи snapshot и без T-Bank.
|
||||
- [OpenAPI integration](../../test/openapi-contract.e2e-spec.ts): генератор без сервера + configured app; временный JSON, без versioned snapshot и без T-Bank.
|
||||
|
||||
При bug сначала воспроизведи именно его исход, затем исправь responsible owner.
|
||||
Не создавай tests для каждой декларации, logs строки или поведения Prisma/Nest
|
||||
|
||||
Reference in New Issue
Block a user