mgw / tests-prompts /js-tests-rules.mdc
alessandro trinca tornidor
test: update playwright e2e tests because of the new /thesaurus-inflated-phrase agnostic response structure
7149fa6
---
description: Use the rule when agent need to write test suites.
globs:
alwaysApply: false
---
- Follow the AAA (Arrange-Act-Assert) pattern.
- Implement beforeEach/afterEach hooks for test setup and cleanup.
- Include positive and negative test cases, edge cases, and error handling scenarios.
- Group related tests into logical describe blocks.
- Implement Jest for testing with TypeScript
- Use Jest's expect assertions with clear error messages.
- Use descriptive test names with lowerCamelCase
- Organize tests in describe blocks for logical grouping
- Apply dependency injection patterns where applicable
- Use comments to tag tests with categories:
- Duration: `// @category DURATION: FAST | NORMAL | SLOW`
- Kind: `// @category KIND: UNIT_TEST | SMOKE_TEST | REGRESSION_TEST | PERFORMANCE_TEST`
- Purpose: `// @category PURPOSE: POSITIVE_SCENARIO | NEGATIVE_SCENARIO | PARAMETERS_CHECKING`