From 8e45b2a08de07d2da9f6b009f1111352555cb9e0 Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 28 Mar 2026 19:51:20 +0000 Subject: [PATCH] storkit: done 444_refactor_extract_shared_test_helpers_test_ctx_write_story_file_make_api --- ...pers_test_ctx_write_story_file_make_api.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .storkit/work/5_done/444_refactor_extract_shared_test_helpers_test_ctx_write_story_file_make_api.md diff --git a/.storkit/work/5_done/444_refactor_extract_shared_test_helpers_test_ctx_write_story_file_make_api.md b/.storkit/work/5_done/444_refactor_extract_shared_test_helpers_test_ctx_write_story_file_make_api.md new file mode 100644 index 00000000..fd541485 --- /dev/null +++ b/.storkit/work/5_done/444_refactor_extract_shared_test_helpers_test_ctx_write_story_file_make_api.md @@ -0,0 +1,26 @@ +--- +name: "Extract shared test helpers (test_ctx, write_story_file, make_api)" +agent: "coder-opus" +--- + +# Refactor 444: Extract shared test helpers (test_ctx, write_story_file, make_api) + +## Current State + +- TBD + +## Desired State + +Several test helper functions are copy-pasted across many test modules: `test_ctx` (10 copies across http/ modules), `write_story_file` (5 copies across chat/commands/ and matrix/), `make_api` (5 copies across http/ modules), `setup_project` (3 copies in io/). Extract each into a shared `#[cfg(test)]` utility module so test scaffolding is maintained in one place. + +## Acceptance Criteria + +- [ ] test_ctx has a single shared definition used by all 10 http test modules +- [ ] write_story_file has a single shared definition used by all 5 callers +- [ ] make_api has a single shared definition used by all 5 callers +- [ ] setup_project has a single shared definition used by all 3 callers +- [ ] All private copies in individual test modules are removed + +## Out of Scope + +- TBD