Add incremental test.

This commit is contained in:
Cyrus Najmabadi 2014-12-09 18:13:09 -08:00
parent 025dd23c1b
commit 197b62e92a

View File

@ -563,6 +563,17 @@ module ts {
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
it('Yield context 2',() => {
// We're changing from a generator to a non-genarator. We can't reuse statement nodes.
var source = "function *foo() {\r\nyield(foo1);\r\n}";
var oldText = ScriptSnapshot.fromString(source);
var index = source.indexOf("*");
var newTextAndChange = withDelete(oldText, index, "*".length);
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
// Simulated typing tests.
it('Type extends clause 1',() => {