Add incremental test.

This commit is contained in:
Cyrus Najmabadi 2014-12-09 17:34:26 -08:00
parent c436ff47a1
commit c307d306c0

View File

@ -441,6 +441,16 @@ module ts {
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
it('Arrow function to assertion',() => {
var source = "var v = <T>(a) => 1;";
var index = source.indexOf(' =>');
var oldText = ScriptSnapshot.fromString(source);
var newTextAndChange = withDelete(oldText, index, " => 1".length);
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
// Simulated typing tests.
it('Type extends clause 1',() => {