mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2025-08-27 13:09:22 +00:00
Merge branch 'running-tests' into 'main'
CONTEXT.md: clarify writing tests vs running tests See merge request soapbox-pub/mkstack!12
This commit is contained in:
commit
c5dabfdb3a
17
CONTEXT.md
17
CONTEXT.md
@ -928,8 +928,11 @@ When users specify color schemes:
|
||||
- Implement responsive design with Tailwind breakpoints
|
||||
- Add hover and focus states for interactive elements
|
||||
|
||||
## Writing Tests
|
||||
## Writing Tests vs Running Tests
|
||||
|
||||
There is an important distinction between **writing new tests** and **running existing tests**:
|
||||
|
||||
### Writing Tests (Creating New Test Files)
|
||||
**Do not write tests** unless the user explicitly requests them in plain language. Writing unnecessary tests wastes significant time and money. Only create tests when:
|
||||
|
||||
1. **The user explicitly asks for tests** to be written in their message
|
||||
@ -942,6 +945,14 @@ When users specify color schemes:
|
||||
- New features or components are created
|
||||
- Existing functionality needs verification
|
||||
|
||||
### Running Tests (Executing the Test Suite)
|
||||
**ALWAYS run the test script** after making any code changes. This is mandatory regardless of whether you wrote new tests or not.
|
||||
|
||||
- **You must run the test script** using `js-dev__run_script` tool with the "test" parameter
|
||||
- **Your task is not complete** until the test script passes without errors
|
||||
- **This applies to all changes** - bug fixes, new features, refactoring, or any code modifications
|
||||
- **The test script includes** TypeScript compilation, ESLint checks, and existing test validation
|
||||
|
||||
### Test Setup
|
||||
|
||||
The project uses Vitest with jsdom environment and includes comprehensive test setup:
|
||||
@ -973,6 +984,8 @@ describe('MyComponent', () => {
|
||||
|
||||
## Testing Your Changes
|
||||
|
||||
Whenever you are finished modifying code, you must run the **test** script using the **js-dev__run_script** tool.
|
||||
**CRITICAL**: Whenever you are finished modifying code, you must run the **test** script using the **js-dev__run_script** tool.
|
||||
|
||||
**Your task is not considered finished until this test passes without errors.**
|
||||
|
||||
**This requirement applies regardless of whether you wrote new tests or not.** The test script validates the entire codebase, including TypeScript compilation, ESLint rules, and existing test suite.
|
Loading…
x
Reference in New Issue
Block a user