Skip to content

Commit 206d39e

Browse files
Add/convert to failing tests.
1 parent 8ef498f commit 206d39e

4 files changed

+9
-21
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
////import { x } from /*x*/"foo"/*y*/;
4+
5+
goTo.select("x", "y");
6+
verify.not.refactorAvailable(ts.Diagnostics.Convert_to_template_string.message);

tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateBackTick.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,4 @@
33
//// const foo = "/*x*/w/*y*/ith back`tick"
44

55
goTo.select("x", "y");
6-
edit.applyRefactor({
7-
refactorName: "Convert to template string",
8-
actionName: "Convert to template string",
9-
actionDescription: ts.Diagnostics.Convert_to_template_string.message,
10-
newContent:
11-
"const foo = `with back\\`tick`",
12-
});
6+
verify.not.refactorAvailable(ts.Diagnostics.Convert_to_template_string.message);

tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSimple.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,4 @@
33
//// const foo = "/*x*/f/*y*/oobar rocks"
44

55
goTo.select("x", "y");
6-
edit.applyRefactor({
7-
refactorName: "Convert to template string",
8-
actionName: "Convert to template string",
9-
actionDescription: ts.Diagnostics.Convert_to_template_string.message,
10-
newContent:
11-
`const foo = \`foobar rocks\``,
12-
});
6+
verify.not.refactorAvailable(ts.Diagnostics.Convert_to_template_string.message);

tests/cases/fourslash/refactorConvertStringOrTemplateLiteral_ToTemplateSingleQuote.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,4 @@
33
//// const foo = '/*x*/f/*y*/oobar rocks'
44

55
goTo.select("x", "y");
6-
edit.applyRefactor({
7-
refactorName: "Convert to template string",
8-
actionName: "Convert to template string",
9-
actionDescription: ts.Diagnostics.Convert_to_template_string.message,
10-
newContent:
11-
`const foo = \`foobar rocks\``,
12-
});
6+
verify.not.refactorAvailable(ts.Diagnostics.Convert_to_template_string.message);

0 commit comments

Comments
 (0)