mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 09:24:19 -06:00
Restore single-token tests
This commit is contained in:
parent
74139186ed
commit
abd4f58824
@ -5,7 +5,7 @@
|
||||
|
||||
//// class C {
|
||||
//// static j = /*c*/1 + 1/*d*/;
|
||||
//// constructor(q: string = /*a*/"a" + "b"/*b*/) {
|
||||
//// constructor(q: string = /*a*/"hello"/*b*/) {
|
||||
//// }
|
||||
//// }
|
||||
|
||||
@ -21,7 +21,7 @@ edit.applyRefactor({
|
||||
}
|
||||
|
||||
private static newFunction(): string {
|
||||
return "a" + "b";
|
||||
return "hello";
|
||||
}
|
||||
}`
|
||||
});
|
||||
@ -32,7 +32,7 @@ verify.currentFileContentIs(`class C {
|
||||
}
|
||||
|
||||
private static newFunction(): string {
|
||||
return "a" + "b";
|
||||
return "hello";
|
||||
}
|
||||
}`);
|
||||
|
||||
@ -52,7 +52,7 @@ edit.applyRefactor({
|
||||
}
|
||||
|
||||
private static newFunction(): string {
|
||||
return "a" + "b";
|
||||
return "hello";
|
||||
}
|
||||
}`
|
||||
});
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// You cannot extract a function initializer into the function's body.
|
||||
// The innermost scope (scope_0) is the sibling of the function, not the function itself.
|
||||
|
||||
//// function fn(x = /*a*/1 + 1/*b*/) {
|
||||
//// function fn(x = /*a*/3/*b*/) {
|
||||
//// }
|
||||
|
||||
goTo.select('a', 'b');
|
||||
@ -15,7 +15,7 @@ edit.applyRefactor({
|
||||
`function fn(x = /*RENAME*/newFunction()) {
|
||||
}
|
||||
function newFunction() {
|
||||
return 1 + 1;
|
||||
return 3;
|
||||
}
|
||||
`
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user