diff --git a/internal/seclang/parser_test.go b/internal/seclang/parser_test.go index ed907cbfc..d2a0c5fe0 100644 --- a/internal/seclang/parser_test.go +++ b/internal/seclang/parser_test.go @@ -6,7 +6,6 @@ package seclang import ( "bufio" "embed" - "errors" "fmt" "io/fs" "os" @@ -119,12 +118,13 @@ func TestLoadConfigurationFileWithMultiFs(t *testing.T) { } err = p.FromFile("../doesnotexist.conf") - if !strings.Contains(err.Error(), "no such file or directory") && !errors.Is(err, fs.ErrNotExist) { + // Go and TinyGo have different error messages + if !strings.Contains(err.Error(), "no such file or directory") && !strings.Contains(err.Error(), "file does not exist") { t.Errorf("expected not found error. Got: %s", err.Error()) } err = p.FromFile("/tmp/doesnotexist.conf") - if !strings.Contains(err.Error(), "no such file or directory") && !errors.Is(err, fs.ErrNotExist) { + if !strings.Contains(err.Error(), "no such file or directory") && !strings.Contains(err.Error(), "file does not exist") { t.Errorf("expected not found error. Got: %s", err.Error()) }