diff --git a/tests/cases/fourslash/completionListInNamedFunctionExpression1.ts b/tests/cases/fourslash/completionListInNamedFunctionExpression1.ts new file mode 100644 index 00000000000..bb64e04b93b --- /dev/null +++ b/tests/cases/fourslash/completionListInNamedFunctionExpression1.ts @@ -0,0 +1,8 @@ +/// + +//// var x = function foo() { +//// /*1*/ +//// } + +goTo.marker("1"); +verify.completionListContains("foo", "(local function) foo(): void", /*documentation*/ undefined, "local function"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListInNamedFunctionExpressionWithShadowing.ts b/tests/cases/fourslash/completionListInNamedFunctionExpressionWithShadowing.ts new file mode 100644 index 00000000000..7d441acb7d7 --- /dev/null +++ b/tests/cases/fourslash/completionListInNamedFunctionExpressionWithShadowing.ts @@ -0,0 +1,19 @@ +/// + +//// 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") \ No newline at end of file