From 1d901bfa82f7f166ee3779f8541741d6a25dc52d Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 4 Oct 2022 23:34:20 +0000 Subject: [PATCH] Updated test case and baseline. --- .../findAllRefsForStringLiteral2.baseline.jsonc | 11 ++++++++++- tests/cases/fourslash/completionsAtJsDoc.ts | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/findAllRefsForStringLiteral2.baseline.jsonc b/tests/baselines/reference/findAllRefsForStringLiteral2.baseline.jsonc index e316226b879..540fd3534a0 100644 --- a/tests/baselines/reference/findAllRefsForStringLiteral2.baseline.jsonc +++ b/tests/baselines/reference/findAllRefsForStringLiteral2.baseline.jsonc @@ -1,6 +1,6 @@ // === /a.ts === // /** -// * @type {"foo" | "bar"} +// * @type {"[|foo|]" | "bar"} // */ // let x = "[|foo|]"/*FIND ALL REFS*/ @@ -24,6 +24,15 @@ ] }, "references": [ + { + "textSpan": { + "start": 15, + "length": 3 + }, + "fileName": "/a.ts", + "isWriteAccess": false, + "isInString": true + }, { "textSpan": { "start": 42, diff --git a/tests/cases/fourslash/completionsAtJsDoc.ts b/tests/cases/fourslash/completionsAtJsDoc.ts index a83d07ab249..2f7819a7194 100644 --- a/tests/cases/fourslash/completionsAtJsDoc.ts +++ b/tests/cases/fourslash/completionsAtJsDoc.ts @@ -5,4 +5,11 @@ //// * @type {Foo<{/**/}>} //// */ -verify.completions({ marker: "", exact: [], isNewIdentifierLocation: true }); +verify.completions({ + marker: "", + exact: { + name: "readonly", + sortText: completion.SortText.GlobalsOrKeywords + }, + isNewIdentifierLocation: true, +});