From b2ed4ecbc4c5a7f0ead12215bdece19b35eaaadf Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Fri, 29 Sep 2017 10:20:23 -0700 Subject: [PATCH] Print list of available refactors when we can't find one --- src/harness/fourslash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index c2bab0a5a6963..e84d8c609500f 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2824,7 +2824,7 @@ Actual: ${stringify(fullActual)}`); const refactors = this.languageService.getApplicableRefactors(this.activeFile.fileName, range); const refactor = refactors.find(r => r.name === refactorName); if (!refactor) { - this.raiseError(`The expected refactor: ${refactorName} is not available at the marker location.`); + this.raiseError(`The expected refactor: ${refactorName} is not available at the marker location.\nAvailable refactors: ${refactors.map(r => r.name)}`); } const action = refactor.actions.find(a => a.name === actionName);