testing
Installation
SKILL.md
Testing – Contentstack Utils Swift
When to use
- Adding or changing tests under
Tests/ContentstackUtilsTests/. - Debugging flaky tests; improving fixtures or mocks.
Runner and tooling
- 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.
Test naming and layout
- 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.