mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-18 07:51:29 +00:00
Adjusted instruction/procedure for coverage measurements in go
This commit is contained in:
parent
b344bd8e1f
commit
e6e2c62858
1
go/.gitignore
vendored
Normal file
1
go/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
coverage/
|
||||||
@ -15,7 +15,5 @@ go test ./...
|
|||||||
- Run tests and coverage :
|
- Run tests and coverage :
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
go test ./... -coverprofile=coverage.out
|
./test-with-coverage.sh
|
||||||
|
|
||||||
go tool cover -html=coverage.out
|
|
||||||
```
|
```
|
||||||
7
go/test-with-coverage.sh
Executable file
7
go/test-with-coverage.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
[ -d coverage ] || mkdir coverage
|
||||||
|
go test ./... -coverprofile=coverage/coverage.out
|
||||||
|
go tool cover -html=coverage/coverage.out -o coverage/index.html
|
||||||
|
echo "Starting web server to present the coverage report. Visit at http://localhost:8000. Press 'Ctrl' + 'C' to exit."
|
||||||
|
python -m http.server 8000 --bind 127.0.0.1 --directory coverage 2>&1 | grep -v "GET /.* 200 -"
|
||||||
Loading…
Reference in New Issue
Block a user