From c4f4e787cfc84c28e5e1448f84c2f085ba510cee Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 3 Dec 2014 12:41:32 -0800 Subject: [PATCH] Add test cases for external module reference of the alias --- .../quickInfoDisplayPartsExternalModuleAlias.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts b/tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts index a9e0be3fa02..2c43326469c 100644 --- a/tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts +++ b/tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias.ts @@ -7,9 +7,9 @@ ////} // @Filename: quickInfoDisplayPartsExternalModuleAlias_file1.ts -////import /*1*/a1 = require("quickInfoDisplayPartsExternalModuleAlias_file0"); +////import /*1*/a1 = require(/*mod1*/"quickInfoDisplayPartsExternalModuleAlias_file0"); ////new /*2*/a1.m1.c(); -////export import /*3*/a2 = require("quickInfoDisplayPartsExternalModuleAlias_file0"); +////export import /*3*/a2 = require(/*mod2*/"quickInfoDisplayPartsExternalModuleAlias_file0"); ////new /*4*/a2.m1.c(); var marker = 0; @@ -31,4 +31,14 @@ function verifyImport(name: string, isExported: boolean) { verifyImport("a1", /*isExported*/false); verifyImport("a1", /*isExported*/false); verifyImport("a2", /*isExported*/true); -verifyImport("a2", /*isExported*/true); \ No newline at end of file +verifyImport("a2", /*isExported*/true); + +function verifyExternalModuleStringLiteral(marker: string) { + goTo.marker(marker); + verify.verifyQuickInfoDisplayParts("module", "", { start: test.markerByName(marker).position, length: "\"quickInfoDisplayPartsExternalModuleAlias_file0\"".length }, + [{ text: "module", kind: "keyword" }, { text: " ", kind: "space" }, { text: "a1", kind: "aliasName" }], + []); +} + +verifyExternalModuleStringLiteral("mod1"); +verifyExternalModuleStringLiteral("mod2"); \ No newline at end of file