diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ac33346..c903a20b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,6 +29,19 @@ only `TokamakStaticHTML`, single-page apps would use `TokamakDOM`, maybe in conj Android at some point, probably in a separate `TokamakAndroid` module, Android apps would use `TokamakAndroid` with no need to be aware of any of the web modules. +### Testing + +Tokamak uses [SnapshotTesting](https://github.com/pointfreeco/swift-snapshot-testing) library to +make sure that HTML and layout generated by renderers stay consistent. To run the test suite on macOS +you should use this command: + +```sh +swift build --product TokamakPackageTests && `xcrun --find xctest` .build/debug/TokamakPackageTests.xctest +``` + +Unfortunately, plain `swift test` won't work as it tries to build targets that aren't related to +the test suite. + ### Coding Style This project uses [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) and