Getting StartedClaude CodeHow-To GuidesWork with Tests

Work with Tests

Suppose you need to add tests for uncovered code.

Identify Untested Code

> find functions in NotificationsService.swift that are not covered by tests

Generate Test Scaffolding

> add tests for the notification service

Add Meaningful Test Cases

> add test cases for edge conditions in the notification service

Run and Verify Tests

> run the new tests and fix any failures

Tips:

  • Request tests that cover edge cases and error conditions
  • Ask for both unit tests and integration tests where appropriate
  • Ask Claude to explain the testing strategy

MIT 2026 © Nextra.
加入社群CC Club返回官网