]> git.giacomolli.uk - onechat/commit
Move shared test helpers into helper files
authorAnderson A. Giacomolli <redacted>
Sat, 7 Nov 2026 18:14:59 +0000 (15:14 -0300)
committerAnderson A. Giacomolli <redacted>
Sat, 7 Nov 2026 18:14:59 +0000 (15:14 -0300)
commit6b21fcf78372995c6d8130c63f2f8aa2609bf7fe
treebc306fec0df35912db2c79d13ddd2d60ed310576
parentce0eacc2fe5090810cf22e022af3ab83006068a4
Move shared test helpers into helper files

Each helper that more than one test file uses moves out of the test file
that holds it into a file without tests, named for what it holds: the
fake Responses endpoint, the fake ChatGPT login service, the fake Bot
API, the terminal test client, the daemon start with a bot, and the tree
node helpers. A helper that only one test file uses stays in that file.
A reader then finds a shared helper from the file name, and a test file
holds only the tests and the helpers of its own feature.

The code of the helpers does not change.

Issue: 947bddb
12 files changed:
chatgpt_fake_helper_test.go [new file with mode: 0644]
chatgpt_test.go
daemon_start_helper_test.go [new file with mode: 0644]
daemon_test.go
model_fake_helper_test.go [new file with mode: 0644]
model_test.go
telegram_api_test.go
telegram_fake_helper_test.go [new file with mode: 0644]
terminal_client_helper_test.go [new file with mode: 0644]
terminal_test.go
tree_node_helper_test.go [new file with mode: 0644]
tree_test.go