test also the output from visibility tests

This commit is contained in:
BigAru
2019-03-27 14:46:28 +01:00
parent 834c5df7b0
commit 9fa112ee34
4 changed files with 34 additions and 0 deletions
@@ -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\``,
});
@@ -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\``,
});
@@ -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\``,
});