Add test for completion in function expression

This commit is contained in:
Yui T
2015-06-25 18:21:52 -07:00
parent aab210096b
commit 9c9e29877d
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
///<reference path="fourslash.ts" />
//// var x = function foo() {
//// /*1*/
//// }
goTo.marker("1");
verify.completionListContains("foo", "(local function) foo(): void", /*documentation*/ undefined, "local function");

View File

@@ -0,0 +1,19 @@
///<reference path="fourslash.ts" />
//// function foo() {}
//// /*0*/
//// var x = function foo() {
//// /*1*/
//// }
//// var y = function () {
//// /*2*/
//// }
goTo.marker("0");
verify.completionListContains("foo", "function foo(): void", /*documentation*/ undefined, "function");
goTo.marker("1");
verify.completionListContains("foo", "(local function) foo(): void", /*documentation*/ undefined, "local function");
goTo.marker("2");
verify.completionListContains("foo", "function foo(): void", /*documentation*/ undefined, "function")