From fa82051a0682cc60a9194e1908f985a8c2f0228f Mon Sep 17 00:00:00 2001 From: Pete Davison Date: Thu, 11 Jan 2024 23:33:36 +0000 Subject: [PATCH] fix: tests --- task_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/task_test.go b/task_test.go index 6be11c6719..a8114965f1 100644 --- a/task_test.go +++ b/task_test.go @@ -7,6 +7,7 @@ import ( "io" "os" "path/filepath" + "regexp" "runtime" "strings" "testing" @@ -1421,7 +1422,7 @@ func TestDisplaysErrorOnVersion1Schema(t *testing.T) { } err := e.Setup() require.Error(t, err) - assert.Equal(t, "task: Taskfile schemas prior to v3 are no longer supported", err.Error()) + assert.Regexp(t, regexp.MustCompile(`task: Invalid schema version in Taskfile \".*testdata\/version\/v1\/Taskfile\.yml\":\nSchema version \(1\.0\.0\) no longer supported\. Please use v3 or above`), err.Error()) } func TestDisplaysErrorOnVersion2Schema(t *testing.T) { @@ -1433,7 +1434,7 @@ func TestDisplaysErrorOnVersion2Schema(t *testing.T) { } err := e.Setup() require.Error(t, err) - assert.Equal(t, "task: Taskfile schemas prior to v3 are no longer supported", err.Error()) + assert.Regexp(t, regexp.MustCompile(`task: Invalid schema version in Taskfile \".*testdata\/version\/v2\/Taskfile\.yml\":\nSchema version \(2\.0\.0\) no longer supported\. Please use v3 or above`), err.Error()) } func TestShortTaskNotation(t *testing.T) {