بنقرة واحدة
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.