From c9cc7b4ba6d2fea40e14a3f84c96f46a56a11ccf Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 18 May 2022 14:46:02 -0400 Subject: [PATCH] test/integration/codelens: fix type error Change-Id: I54fbbeac677e76e5e9fbe2c31cc82900b9d3af5d Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407074 TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- test/integration/codelens.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/codelens.test.ts b/test/integration/codelens.test.ts index f3c07d9792..e3e1b8f159 100644 --- a/test/integration/codelens.test.ts +++ b/test/integration/codelens.test.ts @@ -194,8 +194,8 @@ suite('Code lenses for testing and benchmarking', function () { const found = [] as string[]; for (let i = 0; i < codeLenses.length; i++) { const lens = codeLenses[i]; - if (lens.command.command === 'go.test.cursor') { - found.push(lens.command.arguments[0].functionName); + if (lens.command?.command === 'go.test.cursor') { + found.push(lens.command.arguments?.[0].functionName); } } found.sort();