MCPcopy Create free account
hub / github.com/go-task/task / TestIncludesOptionalExplicitFalse

Function TestIncludesOptionalExplicitFalse

task_test.go:1437–1455  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1435}
1436
1437func TestIncludesOptionalExplicitFalse(t *testing.T) {
1438 t.Parallel()
1439
1440 const dir = "testdata/includes_optional_explicit_false"
1441 wd, _ := os.Getwd()
1442
1443 message := "task: No Taskfile found at \"%s/%s/TaskfileOptional.yml\""
1444 expected := fmt.Sprintf(message, filepath.ToSlash(wd), dir)
1445
1446 e := task.NewExecutor(
1447 task.WithDir(dir),
1448 task.WithStdout(io.Discard),
1449 task.WithStderr(io.Discard),
1450 )
1451
1452 err := e.Setup()
1453 require.Error(t, err)
1454 assert.Equal(t, expected, err.Error())
1455}
1456
1457func TestIncludesFromCustomTaskfile(t *testing.T) {
1458 t.Parallel()

Callers

nothing calls this directly

Calls 2

SetupMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…