From abd4f58824e2c3b09a486dfcfe2b5f42bc33e938 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Fri, 15 Sep 2017 10:45:15 -0700 Subject: [PATCH] Restore single-token tests --- ...d-not-for-token.ts => extract-method-not-for-empty.ts} | 0 tests/cases/fourslash/extract-method13.ts | 8 ++++---- tests/cases/fourslash/extract-method7.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename tests/cases/fourslash/{extract-method-not-for-token.ts => extract-method-not-for-empty.ts} (100%) diff --git a/tests/cases/fourslash/extract-method-not-for-token.ts b/tests/cases/fourslash/extract-method-not-for-empty.ts similarity index 100% rename from tests/cases/fourslash/extract-method-not-for-token.ts rename to tests/cases/fourslash/extract-method-not-for-empty.ts diff --git a/tests/cases/fourslash/extract-method13.ts b/tests/cases/fourslash/extract-method13.ts index 274753fd5cd..409b5f890ad 100644 --- a/tests/cases/fourslash/extract-method13.ts +++ b/tests/cases/fourslash/extract-method13.ts @@ -5,7 +5,7 @@ //// class C { //// static j = /*c*/1 + 1/*d*/; -//// constructor(q: string = /*a*/"a" + "b"/*b*/) { +//// constructor(q: string = /*a*/"hello"/*b*/) { //// } //// } @@ -21,7 +21,7 @@ edit.applyRefactor({ } private static newFunction(): string { - return "a" + "b"; + return "hello"; } }` }); @@ -32,7 +32,7 @@ verify.currentFileContentIs(`class C { } private static newFunction(): string { - return "a" + "b"; + return "hello"; } }`); @@ -52,7 +52,7 @@ edit.applyRefactor({ } private static newFunction(): string { - return "a" + "b"; + return "hello"; } }` }); diff --git a/tests/cases/fourslash/extract-method7.ts b/tests/cases/fourslash/extract-method7.ts index c28e12dce8c..0ce39c5a309 100644 --- a/tests/cases/fourslash/extract-method7.ts +++ b/tests/cases/fourslash/extract-method7.ts @@ -3,7 +3,7 @@ // You cannot extract a function initializer into the function's body. // The innermost scope (scope_0) is the sibling of the function, not the function itself. -//// function fn(x = /*a*/1 + 1/*b*/) { +//// function fn(x = /*a*/3/*b*/) { //// } goTo.select('a', 'b'); @@ -15,7 +15,7 @@ edit.applyRefactor({ `function fn(x = /*RENAME*/newFunction()) { } function newFunction() { - return 1 + 1; + return 3; } ` });