Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pd93 authored and andreynering committed Jan 26, 2024
1 parent 90a56df commit fa82051
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"os"
"path/filepath"
"regexp"
"runtime"
"strings"
"testing"
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit fa82051

Please sign in to comment.