From cdd279bb1c7399988a8c3e534b501cf7b3b4dbfc Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 22 Jun 2024 14:59:25 +0200 Subject: [PATCH] Add test to check incorrect indent in suggestions --- .../tests/integration/completion.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/gx-workflow-ls-format2/tests/integration/completion.test.ts b/server/gx-workflow-ls-format2/tests/integration/completion.test.ts index 36c520e..d5b7f16 100644 --- a/server/gx-workflow-ls-format2/tests/integration/completion.test.ts +++ b/server/gx-workflow-ls-format2/tests/integration/completion.test.ts @@ -366,4 +366,18 @@ creator: expect(completions?.items).toHaveLength(0); }); + + it("should not suggest any properties when the indent is not correct", async () => { + const template = ` +class: GalaxyWorkflow +inputs: + My input: + $`; // Incorrect indent + + const { contents, position } = parseTemplate(template); + + const completions = await getCompletions(contents, position); + + expect(completions?.items).toHaveLength(0); + }); });