.claude/skills/test-package/SKILL.md
Run tests for an individual Swift package
npx skillsauth add adamayoung/popcorn test-packageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run tests for a single Swift package. Use this when you only need to test a specific package — use /test instead when you need to run the entire app's test suite.
Testing is a two-step process: build with warnings-as-errors first, then run tests with --skip-build.
mcp__xcode__XcodeListWindows to get the tabIdentifier for the Popcorn workspace.mcp__xcode__GetTestList to find test targets for the package.mcp__xcode__RunSomeTests with the relevant test specifiers for the package's test targets.Run via a subagent (Task tool, subagent_type: "general-purpose") to keep large logs out of the main context. The subagent should run the commands from the package directory and report back pass/fail with any errors or test failures.
cd <package-dir> && swift build --build-tests -Xswiftc -warnings-as-errors 2>&1 && swift test --skip-build 2>&1
Note: The build step uses -Xswiftc -warnings-as-errors. The test execution step does not — consistent with how the app-level make test works.
# Context package
cd Contexts/PopcornMovies && swift build --build-tests -Xswiftc -warnings-as-errors 2>&1 && swift test --skip-build 2>&1
# Adapter package
cd Adapters/Contexts/PopcornMoviesAdapters && swift build --build-tests -Xswiftc -warnings-as-errors 2>&1 && swift test --skip-build 2>&1
# Feature package
cd Features/MovieDetailsFeature && swift build --build-tests -Xswiftc -warnings-as-errors 2>&1 && swift test --skip-build 2>&1
| Layer | Path pattern |
|-------|-------------|
| Contexts | Contexts/<PackageName>/ |
| Context Adapters | Adapters/Contexts/<PackageName>/ |
| Platform Adapters | Adapters/Platform/<PackageName>/ |
| Features | Features/<PackageName>/ |
| Core | Core/<PackageName>/ |
| Platform | Platform/<PackageName>/ |
| AppDependencies | AppDependencies/ |
data-ai
Add properties to an existing domain model from TMDb
testing
Run all unit tests
testing
Run UI tests
testing
Run snapshot tests