mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 23:11:28 +00:00
34 lines
484 B
Markdown
34 lines
484 B
Markdown
# GO Starter
|
|
|
|
- Run :
|
|
|
|
```shell
|
|
go run texttest_fixture.go gilded-rose.go
|
|
```
|
|
|
|
- Run tests :
|
|
|
|
```shell
|
|
go test
|
|
```
|
|
|
|
- Run tests and coverage :
|
|
|
|
```shell
|
|
go test -coverprofile=coverage.out
|
|
|
|
go tool cover -html=coverage.out
|
|
```
|
|
|
|
- Create golden test file using textest (*nix):
|
|
|
|
```bash
|
|
go run texttest_fixture.go gilded-rose.go > golden_test.txt
|
|
```
|
|
|
|
- Testing changes against the golden test file (*nix):
|
|
|
|
```bash
|
|
diff <(go run texttest_fixture.go gilded-rose.go) golden_test.txt
|
|
```
|