mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Add incremental test.
This commit is contained in:
@@ -237,5 +237,20 @@ module ts {
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
|
||||
it('Parameter 1',() => {
|
||||
// Should be able to reuse all the parameters.
|
||||
var source = "class C {\r\n" +
|
||||
" public foo2(a, b, c, d) {\r\n" +
|
||||
" return 1;\r\n" +
|
||||
" }\r\n" +
|
||||
"}";
|
||||
|
||||
var semicolonIndex = source.indexOf(";");
|
||||
var oldText = ScriptSnapshot.fromString(source);
|
||||
var newTextAndChange = withInsert(oldText, semicolonIndex, " + 1");
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user