From 01f2cce8cf20aa87d8174439a3db3a78ccb186b4 Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Wed, 10 Jun 2015 10:58:57 -0700 Subject: [PATCH] Add fourslash test for in scope completion --- .../completionWithNamespaceInsideFunction.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/cases/fourslash/completionWithNamespaceInsideFunction.ts diff --git a/tests/cases/fourslash/completionWithNamespaceInsideFunction.ts b/tests/cases/fourslash/completionWithNamespaceInsideFunction.ts new file mode 100644 index 0000000000..fb537bca71 --- /dev/null +++ b/tests/cases/fourslash/completionWithNamespaceInsideFunction.ts @@ -0,0 +1,24 @@ +/// + +////function f() { +//// namespace n { +//// interface I { +//// x: number +//// } +//// /*1*/ +//// } +//// /*2*/ +////} +/////*3*/ + +goTo.marker('1'); +verify.completionListContains("f", "function f(): void"); +verify.completionListContains("n", "namespace n"); +verify.completionListContains("I", "interface I"); + +goTo.marker('2'); +verify.completionListContains("f", "function f(): void"); +verify.completionListContains("n", "namespace n"); + +goTo.marker('3'); +verify.completionListContains("f", "function f(): void"); \ No newline at end of file