Skip to content

Commit

Permalink
chore: adding todo to refactor main test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nepo26 committed Sep 10, 2023
1 parent d0e53ef commit b14e524
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/helm-docs/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import (
//
// To run benchmarks, run the command:
//
// go test -run=^$ -bench=. ./cmd/helm-docs
//
// go test -run=^$ -bench=. ./cmd/helm-docs
func BenchmarkHelmDocs(b *testing.B) {
// Copy testdata to a new temporary directory, to keep the working directory clean.
tmp := copyToTempDir(b, os.DirFS(filepath.Join("testdata", "benchmark")))
Expand Down Expand Up @@ -89,6 +88,7 @@ func (v *testFlagValue) ValueType() string {
// copyToTempDir copies the specified readonly filesystem into a new temporary directory and returns
// the path to the temporary directory. It fails the benchmark on any error and handles cleanup when
// the benchmark finishes.
// TODO make use of B.TempDir instead of implementing directly https://pkg.go.dev/testing#B.TempDir
func copyToTempDir(b *testing.B, fsys fs.FS) string {
// Create the temporary directory.
tmp, err := os.MkdirTemp("", "")
Expand Down

0 comments on commit b14e524

Please sign in to comment.