diff --git a/tests/cases/fourslash/codeFixAwaitInSyncFunction4.ts b/tests/cases/fourslash/codeFixAwaitInSyncFunction4.ts index 24506bb39c..dd123e25d0 100644 --- a/tests/cases/fourslash/codeFixAwaitInSyncFunction4.ts +++ b/tests/cases/fourslash/codeFixAwaitInSyncFunction4.ts @@ -1,7 +1,7 @@ /// ////class Foo { -//// constructor() { +//// constructor { //// await Promise.resolve(); //// } ////} diff --git a/tests/cases/fourslash/codeFixAwaitInSyncFunction7.ts b/tests/cases/fourslash/codeFixAwaitInSyncFunction7.ts index 1d058fe473..a467e9ee0c 100644 --- a/tests/cases/fourslash/codeFixAwaitInSyncFunction7.ts +++ b/tests/cases/fourslash/codeFixAwaitInSyncFunction7.ts @@ -1,7 +1,7 @@ /// ////function f() { -//// for await (const x of []) { +//// for await (const x of g()) { //// console.log(x); //// } ////} @@ -10,7 +10,7 @@ verify.codeFix({ description: "Add async modifier to containing function", newFileContent: `async function f() { - for await (const x of []) { + for await (const x of g()) { console.log(x); } }`, diff --git a/tests/cases/fourslash/codeFixAwaitShouldNotCrashIfNotInFunction.ts b/tests/cases/fourslash/codeFixAwaitShouldNotCrashIfNotInFunction.ts index 4d916fe25b..1ce5c771ed 100644 --- a/tests/cases/fourslash/codeFixAwaitShouldNotCrashIfNotInFunction.ts +++ b/tests/cases/fourslash/codeFixAwaitShouldNotCrashIfNotInFunction.ts @@ -1,6 +1,5 @@ /// -////async function a() {} ////await a verify.not.codeFixAvailable(); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNoFix.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNoFix.ts index 39470dfdd5..07896b4cdb 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNoFix.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNoFix.ts @@ -4,7 +4,7 @@ //// [x: string, y: number]: number; //// } //// -//// class C implements I4 {[| |]} +//// class C implements I {[| |]} verify.not.codeFixAvailable(); diff --git a/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused.ts b/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused.ts index 6f2dc76d0a..4f3f9a3e61 100644 --- a/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused.ts +++ b/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused.ts @@ -4,7 +4,7 @@ // @noUnusedParameters: true ////export {}; -////const { x, y } = {}; +////const { x, y } = o; verify.codeFix({ description: "Remove destructuring", diff --git a/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_all.ts b/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_all.ts index 176f108c51..c9d4f62f2d 100644 --- a/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_all.ts +++ b/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_all.ts @@ -3,8 +3,8 @@ // @noUnusedLocals: true // @noUnusedParameters: true -////const { x, y } = {}; -////const { a, b } = {}; +////const { x, y } = o; +////const { a, b } = o; ////a; ////export function f({ a, b }, { x, y }) { //// a; @@ -14,7 +14,7 @@ verify.codeFixAll({ fixId: "unusedIdentifier_delete", fixAllDescription: "Delete all unused declarations", newFileContent: -`const { a } = {}; +`const { a } = o; a; export function f({ a }) { a; diff --git a/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_for.ts b/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_for.ts index ea94e5275a..27103357d3 100644 --- a/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_for.ts +++ b/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_for.ts @@ -3,10 +3,10 @@ // @noUnusedLocals: true // @noUnusedParameters: true -////for (const { x } of [{}]) {} +////for (const { x } of o) {} verify.codeFix({ description: "Remove destructuring", newFileContent: -`for (const {} of [{}]) {}`, +`for (const {} of o) {}`, }); diff --git a/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_nested.ts b/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_nested.ts index 03a8ff826c..73fca11392 100644 --- a/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_nested.ts +++ b/tests/cases/fourslash/codeFixUnusedIdentifier_destructure_allUnused_nested.ts @@ -4,11 +4,11 @@ // @noUnusedParameters: true ////export {}; -////const { x: { a, b } } = {{}}; +////const { x: { a, b } } = o; verify.codeFix({ description: "Remove destructuring", newFileContent: `export {}; -const { } = {{}};`, +const { } = o;`, });