From e1eecf7c7baa63a5b75ee83a98bbdd3eed166845 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 25 Jun 2023 23:11:47 -0700 Subject: [PATCH] reimplement --- d2compiler/compile_test.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 {