Skip to content

Commit

Permalink
Use bytes.Equal to assert fileRegistry returns consistent []byte slices
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Aug 3, 2023
1 parent dc78ead commit 4461b00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/modules/k6/experimental/fs/registry_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fs

import (
"bytes"
"testing"

"github.com/spf13/afero"
Expand Down Expand Up @@ -46,7 +47,7 @@ func TestFileRegistryOpen(t *testing.T) {
assert.Equal(t, []byte("Bonjour, le monde"), firstData)
assert.True(t, gotSecondOk)
assert.NoError(t, secondErr)
assert.Same(t, firstData, secondData)
assert.True(t, bytes.Equal(firstData, secondData))
assert.Equal(t, []byte("Bonjour, le monde"), secondData)
})
}

0 comments on commit 4461b00

Please sign in to comment.