Closed

Description
TypeScript Version: nightly (2.6.0-dev.20170929)
Code
/// <reference path='fourslash.ts' />
////function f() { /*a*/1/*b*/; }
goTo.select("a", "b");
edit.applyRefactor({
refactorName: "?",
actionName: "?",
actionDescription: "?",
newContent: "?",
});
Running this test with the change in #18843 prints:
Error: At line 1, col 15: The expected refactor: ? is not available at the marker location.
Available refactors: Extract Symbol,Extract Symbol
Problem: The way applyRefactor
in fourslash.ts
is written, there's no way we can assert things about the second refactor, since we match them by name and we'll always find the first one first. (Also, this seems to uncover that we have no tests of it.)
Instead of making the test runner more complicated, we should probably have one refactor with multiple actions, or two refactors with different names.