mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
Add incremental test.
This commit is contained in:
parent
18f9acb7fc
commit
3e70073211
@ -371,14 +371,24 @@ module ts {
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
|
||||
it('Parenthesized expression to arrow function',() => {
|
||||
it('Parenthesized expression to arrow function 1',() => {
|
||||
var source = "var v = (a, b, c, d, e)";
|
||||
|
||||
var index = source.indexOf('a');
|
||||
var oldText = ScriptSnapshot.fromString(source);
|
||||
var newTextAndChange = withInsert(oldText, index + 1, ":");
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1);
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
|
||||
it('Parenthesized expression to arrow function 2',() => {
|
||||
var source = "var v = (a, b) = c";
|
||||
|
||||
var index = source.indexOf("= c") + 1;
|
||||
var oldText = ScriptSnapshot.fromString(source);
|
||||
var newTextAndChange = withInsert(oldText, index, ">");
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
|
||||
it('Arrow function to parenthesized expression',() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user