Clarify testing commands in `CONTRIBUTING.md` (#488)
This should help new contributors to run the test suite locally.
This commit is contained in:
parent
a604ef5269
commit
c0c4534352
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue