| name | testing |
|---|---|
| description | XCTest—layout, mocks, fixtures, SwiftLint/Slather, offline tests, Linux manifests. |
- Adding or changing tests under
Tests/ContentstackUtilsTests/. - Debugging flaky tests; improving fixtures or mocks.
- XCTest via
swift test(SPM) and/or Xcode schemeContentstackUtils-Package(ContentstackUtils.xcodeproj), matching.github/workflows/ci.yml. - SwiftLint:
.swiftlint.yml;Tests/ContentstackUtilsTests/Constants.swiftis excluded—other test files are linted. - Slather:
.slather.ymlignoresTests/*in coverage reports; still add tests for new production code inSources/ContentstackUtils/when practical.
- Target:
ContentstackUtilsTests; pathTests/ContentstackUtilsTests/. - File names:
*Tests.swift,*Test.swift, or feature-oriented names (GQLJsonToHtml.swift,JsonNodes.swift,VariantUtilityTests.swift). - Fixtures and mocks: Prefer
JsonNodes.swift,JsonNodesHtmlResults.swift,EmbededModelMock.swift,CustomRenderOptionMock.swift,TestClient.swift, etc., before adding parallel helpers.
- No separate integration tree: tests live in
ContentstackUtilsTestswith mocks for API-shaped payloads—no live network or credentials in CI.
- Maintain
XCTestManifests.swiftif your workflow requires explicit Linux test discovery.
- Tests are offline; do not commit API keys or real tokens.
skills/dev-workflow/SKILL.mdskills/code-review/SKILL.md