Skip to content

Commit

Permalink
Improve test performance
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Sep 21, 2024
1 parent f48a1b4 commit c42ac5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions m/textstyles/ansiTokenizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ func TestTokenize(t *testing.T) {
assert.NilError(t, err)

fileScanner := bufio.NewScanner(fileReader)

// Upping the buffer like this (from a default of 64kb) makes the
// tests go faster
fileScanner.Buffer(make([]byte, 1024*1024), 1024*1024)

var lineNumber *linenumbers.LineNumber
for fileScanner.Scan() {
line := fileScanner.Text()
Expand Down

0 comments on commit c42ac5f

Please sign in to comment.