원클릭으로
write-test
Write tests for ink-cartridge. Use when the user wants to write tests, add tests, or create test files.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Write tests for ink-cartridge. Use when the user wants to write tests, add tests, or create test files.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Write demo/example files for ink-cartridge components and APIs. Use when the user wants to create a demo, write an example, or add a showcase for a component or API.
Write, update, sync, or fix documentation for ink-cartridge. Use when the user wants to write docs, update API docs, sync docs with source changes, or fix documentation errors.
| name | write-test |
| description | Write tests for ink-cartridge. Use when the user wants to write tests, add tests, or create test files. |
Must first ask the user to choose an interaction mode:
tests/<subsystem>/base/*.test.* and tests/<subsystem>/*.test.*)npx tsc -p tests/tsconfig.json --noEmit and ensure it passesnpm test after tsc passesIf tsc reports any type errors, must fix them and re-run until clean. Must not run tests while type errors remain.
When npm test fails, must not auto-fix. Must report the failure and let the user decide next steps.
npx tsc -p tests/tsconfig.json --noEmitnpm test after tsc passesNo fast-exit shortcut.
Must ask the user where to place the new test file. Must not decide on its own.
_helpers.tsxWhen the target subsystem has no _helpers.tsx and the test file needs helpers, must auto-generate one. Only include helpers the test actually uses. Must not pre-guess future needs.
If the target module's source file does not exist yet, must ask: TDD (tests first) or source at a different path? Must not error out directly.
tests/, never in src/__tests__/tests/<subsystem>/base/; complex/multi-system tests → tests/<subsystem>/ink-testing-library's render(); environment is nodeclearRegistry() and clearDispatchers() in beforeEachflush() (50ms setTimeout) before simulating key pressesstdin.write() must be wrapped in act()\x1b) is unreliable; must not test it via stdinScenarioManagementProvider → KeyboardProvider (reversed breaks silently)After all tests pass, must remind the user: verify each test locks down a behavior that could realistically break — not just passes.