diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 9ce23f5bf..1dc1ccc5b 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -3011,7 +3011,7 @@ a run func(t *testing.T) }{ { - name: "connection", + name: "delete-connection", run: func(t *testing.T) { g := assertCompile(t, ` x -> y @@ -3021,6 +3021,17 @@ y: null assert.Equal(t, 0, len(g.Edges)) }, }, + { + name: "no-delete-connection", + run: func(t *testing.T) { + g := assertCompile(t, ` +y: null +x -> y +`, "") + assert.Equal(t, 2, len(g.Objects)) + assert.Equal(t, 1, len(g.Edges)) + }, + }, } for _, tc := range tca {