home/lifestyle/clean-tests-prompt

Clean Tests.prompt

GPTClaudeGemini··756 copies·updated 2026-07-14
clean-tests-prompt.prompt
Make a final improvement focused on professional project presentation, without changing functional behavior or breaking tests.

OBJECTIVE 1: Clean noisy logs in tests / CI
- Identify any unnecessary `console.error` / `console.log` / logger output during test execution.
- Especially review the case where an error related to `toFixed` on `undefined` appears during sync.
- Keep the test validating expected behavior, but avoid console noise.
- If a log is useful in production, mock or silence it only in tests.
- Do not globally hide real errors.

OBJECTIVE 2: Improve presentation and leave clear evidence of quality
After cleaning logs:

1. Run:
- npm run test
- npm run test:coverage

2. Provide a professional Markdown summary ready for README named `TESTING_SUMMARY.md` with this structure:

# Testing Summary

## General Status
- Test suites executed:
- Test suites passing:
- Total tests:
- Passing tests:
- Total runtime:
- Final result:

## Coverage
- Statements:
- Branches:
- Functions:
- Lines:

## Testing Strategy

### Unit Tests
Describe which services/classes were tested and which business rules they validate.

### Integration Tests
Describe real endpoints tested with Nest + DB and full flows.

### Resilience / External Service Tests
Describe tests against mock HCM:
- timeout
- retries
- 422
- 503
- fallback
- sync behavior

### Concurrency Tests
Describe simultaneous scenarios:
- requests concurrentes
- race conditions
- optimistic locking
- final balance consistency

## Critical Cases Covered
List bullets such as:
- idempotency
- insufficient balance
- duplicate requests
- webhook signature validation
- stale data recovery
- approval/rejection flows
- cancellation rules

## Final Findings
Brief professional assessment of the current project state.

## Validation Commands

when to use it

Community prompt sourced from the open-source GitHub repo JuniRanger/time-off-microservice (no explicit license). A "Clean Tests.prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

lifestylecommunitygeneral

source

JuniRanger/time-off-microservice · no explicit license