Coding task · Vibe coding with Claude Code course · Module 15: Advanced Claude Code

Practice: Tests for files without tests

The for loop from the lesson is your model. Point at the file through a variable, e.g. @$FILE, and save the result with the > "$TEST_FILE" redirect (or add --permission-mode acceptEdits so that Claude writes the file on its own). Lines starting with # are comments.

Task

In commands.sh write the generate-tests.sh script: find the .ts files in src (find), skip those that already have a .test.ts file ([ -f ... ]) and call claude -p for the rest, asking for Jest tests.