javascript-jest
Installation
SKILL.md
Test Structure
- Name test files with
.test.tsor.test.jssuffix in the same folder as the file being tested - If any fixture or related support files are required, the should be placed in a dedicated
__tests__directory - Use descriptive test names that explain the expected behavior
- Use nested describe blocks to organize related tests
- Follow the Arrange-Act-Assert (AAA) pattern in each test
Test Structure
- Use descriptive test names that clearly explain expected behavior
- Organize tests using
describeblocks for logical grouping - Keep tests focused on a single behavior or outcome
- Use
toMatchSnapshotsparingly and with meaningful names - Include negative test cases (what should NOT happen)