Skip to content

code_test

code_test runs the project’s test suite and maps failures back to named functions in the graph, not just file paths. Use it instead of running the test runner directly.

code_test()
code_test(filter="payment")
code_test(filter="test_knowledge")
ParameterTypeDefaultDescription
filterstringRun only tests whose name or path matches this string
Tests: 142 passed, 2 failed
FAIL PaymentService.charge
payment.test.ts:44
Expected: Receipt { id: "rcpt_123", ... }
Received: null
Function: PaymentService.charge (src/services/payment.ts:18)
FAIL AuthService.validate
auth.test.ts:91
Error: jwt.verify is not a function
Function: AuthService.validate (src/middleware/auth.ts:82)
  • After fixing a bug — confirm the fix and check for regressions
  • During refactoring — run filtered tests for the module being changed
  • As the final step before committing
# Run all tests
code_test()
# Run only payment-related tests
code_test(filter="payment")
# After seeing a failure, read the broken function
code_get(name="PaymentService.charge")