MCPcopy Create free account
hub / github.com/github/gh-aw / TestOptimizeDisjunction_NoTerms

Function TestOptimizeDisjunction_NoTerms

pkg/workflow/expression_optimizer_test.go:313–318  ·  view source on GitHub ↗

--------------------------------------------------------------------------- DisjunctionNode optimisations ---------------------------------------------------------------------------

(t *testing.T)

Source from the content-addressed store, hash-verified

311// ---------------------------------------------------------------------------
312
313func TestOptimizeDisjunction_NoTerms(t *testing.T) {
314 node := &DisjunctionNode{Terms: nil}
315 result := OptimizeExpression(node)
316 require.NotNil(t, result, "empty disjunction must not be nil")
317 assert.IsType(t, &DisjunctionNode{}, result, "empty disjunction stays DisjunctionNode")
318}
319
320func TestOptimizeDisjunction_SingleTerm(t *testing.T) {
321 e := expr("github.event_name == 'issues'")

Callers

nothing calls this directly

Calls 1

OptimizeExpressionFunction · 0.85

Tested by

no test coverage detected