From 4461b00dc77c5f5025803936275a7ce397f71343 Mon Sep 17 00:00:00 2001 From: oleiade Date: Thu, 3 Aug 2023 15:05:16 +0200 Subject: [PATCH] Use bytes.Equal to assert fileRegistry returns consistent []byte slices --- js/modules/k6/experimental/fs/registry_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/modules/k6/experimental/fs/registry_test.go b/js/modules/k6/experimental/fs/registry_test.go index a39004b54e7e..00ef40b5836e 100644 --- a/js/modules/k6/experimental/fs/registry_test.go +++ b/js/modules/k6/experimental/fs/registry_test.go @@ -1,6 +1,7 @@ package fs import ( + "bytes" "testing" "github.com/spf13/afero" @@ -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) }) }