mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
test also the output from visibility tests
This commit is contained in:
@@ -28,3 +28,12 @@ goTo.select("p", "o");
|
||||
verify.refactorAvailable("Convert string concatenation or template literal", "Convert to string concatenation");
|
||||
verify.not.refactorAvailable("Convert string concatenation or template literal", "Convert to template literal");
|
||||
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert string concatenation or template literal",
|
||||
actionName: "Convert to string concatenation",
|
||||
actionDescription: "Convert to string concatenation",
|
||||
newContent:
|
||||
`const age = 22
|
||||
const name = "Eddy"
|
||||
const foo = "Mr " + name + " is " + (age + 34) + " years old"`,
|
||||
});
|
||||
|
||||
@@ -28,3 +28,12 @@ goTo.select("p", "o");
|
||||
verify.not.refactorAvailable("Convert string concatenation or template literal", "Convert to string concatenation");
|
||||
verify.refactorAvailable("Convert string concatenation or template literal", "Convert to template literal");
|
||||
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert string concatenation or template literal",
|
||||
actionName: "Convert to template literal",
|
||||
actionDescription: "Convert to template literal",
|
||||
newContent:
|
||||
`const age = 22
|
||||
const name = "Eddy"
|
||||
const foo = \`Mr \${name} is \${age * 4 / 2} years old\``,
|
||||
});
|
||||
+8
@@ -23,3 +23,11 @@ goTo.select("r", "q");
|
||||
verify.not.refactorAvailable("Convert string concatenation or template literal", "Convert to string concatenation");
|
||||
verify.refactorAvailable("Convert string concatenation or template literal", "Convert to template literal");
|
||||
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert string concatenation or template literal",
|
||||
actionName: "Convert to template literal",
|
||||
actionDescription: "Convert to template literal",
|
||||
newContent:
|
||||
`const age = 22
|
||||
const foo = \`\${age * 4 - 2 / 4} years old\``,
|
||||
});
|
||||
+8
@@ -15,3 +15,11 @@ goTo.select("v", "u");
|
||||
verify.not.refactorAvailable("Convert string concatenation or template literal", "Convert to string concatenation");
|
||||
verify.refactorAvailable("Convert string concatenation or template literal", "Convert to template literal");
|
||||
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert string concatenation or template literal",
|
||||
actionName: "Convert to template literal",
|
||||
actionDescription: "Convert to template literal",
|
||||
newContent:
|
||||
`let foo = ""
|
||||
foo = \`Mr Bar is\${42} years old\``,
|
||||
});
|
||||
Reference in New Issue
Block a user