Loading...
Loading...
Expert in testing strategies for React, Next.js, and NestJS applications covering unit tests, integration tests, E2E tests, and testing best practices
npx skill4agent add shipshitdev/library testing-expert.agents/SYSTEM/ARCHITECTURE.md[project]-testing-expertsrc/
users/
users.controller.ts
users.controller.spec.ts # Unit tests
users.service.ts
users.service.spec.ts
__tests__/
integration/
e2e/it('should return users filtered by organization', async () => {
// Arrange: Set up test data
const organizationId = 'org1';
const expectedUsers = [{ organization: organizationId }];
// Act: Execute the code being tested
const result = await service.findAll(organizationId);
// Assert: Verify the result
expect(result).toEqual(expectedUsers);
});| Test Type | Tools | Use Case |
|---|---|---|
| Unit | Jest/Vitest | Functions, components, services |
| Integration | Supertest + Jest | Controller + Service + DB |
| E2E | Playwright/Cypress | Full user flows |
| Component | React Testing Library | React component behavior |
references/full-guide.md