Skip to content

Commit beeb9bf

Browse files
committed
. t parallelize tests, clear testcache between runs
1 parent f0c6c6c commit beeb9bf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

date_scrubber_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
)
1010

1111
func TestSupportedFormatWorksForExamples(t *testing.T) {
12+
t.Parallel()
1213
for _, supportedFormat := range approvals.GetSupportedFormats() {
1314
dateScrubber := approvals.NewDateScrubber(supportedFormat.Regex)
1415
for _, example := range supportedFormat.Examples {
@@ -21,6 +22,7 @@ func TestSupportedFormatWorksForExamples(t *testing.T) {
2122
}
2223

2324
func TestGetDateScrubber(t *testing.T) {
25+
t.Parallel()
2426
formats := approvals.GetSupportedFormats()
2527
output := ""
2628
for _, format := range formats {
@@ -39,6 +41,7 @@ func TestGetDateScrubber(t *testing.T) {
3941
}
4042

4143
func TestExampleForDocumentation(t *testing.T) {
44+
t.Parallel()
4245
// begin-snippet: scrub_date_example
4346
scrubber, err := approvals.GetDateScrubberFor("00:00:00")
4447
if err != nil {
@@ -49,6 +52,7 @@ func TestExampleForDocumentation(t *testing.T) {
4952
}
5053

5154
func TestSupportedFormats(t *testing.T) {
55+
t.Parallel()
5256
formats := approvals.GetSupportedFormats()
5357

5458
table := "| Example Date | RegEx Pattern |\n"

run_tests.sh

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
set -euo pipefail
33

44
go build -v ./...
5+
go clean -testcache
56
go test ./... -race -coverprofile=coverage.txt -covermode=atomic

0 commit comments

Comments
 (0)