mirror of
https://github.com/go-task/task.git
synced 2025-06-23 00:38:19 +02:00
chore: replace PPRemoveAbsolutePaths with generic fixture template data
This commit is contained in:
@ -44,7 +44,8 @@ func NewFormatterTest(t *testing.T, opts ...FormatterTestOption) {
|
||||
task: "default",
|
||||
vars: map[string]any{},
|
||||
TaskTest: TaskTest{
|
||||
experiments: map[*experiments.Experiment]int{},
|
||||
experiments: map[*experiments.Experiment]int{},
|
||||
fixtureTemplateData: map[string]any{},
|
||||
},
|
||||
}
|
||||
// Apply the functional options
|
||||
@ -222,8 +223,6 @@ func TestListDescInterpolation(t *testing.T) {
|
||||
func TestJsonListFormat(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
fp, err := filepath.Abs("testdata/json_list_format/Taskfile.yml")
|
||||
require.NoError(t, err)
|
||||
NewFormatterTest(t,
|
||||
WithExecutorOptions(
|
||||
task.WithDir("testdata/json_list_format"),
|
||||
@ -231,10 +230,6 @@ func TestJsonListFormat(t *testing.T) {
|
||||
WithListOptions(task.ListOptions{
|
||||
FormatTaskListAsJSON: true,
|
||||
}),
|
||||
WithFixtureTemplateData(struct {
|
||||
TaskfileLocation string
|
||||
}{
|
||||
TaskfileLocation: fp,
|
||||
}),
|
||||
WithFixtureTemplating(),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user