Add incremental test.

This commit is contained in:
Cyrus Najmabadi 2014-12-09 17:12:44 -08:00
parent 22f39c5f99
commit 7f605332fc

View File

@ -328,5 +328,15 @@ module ts {
// Note the decreased reuse of nodes compared to testStrictMode3
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
it('Strict mode 5',() => {
var source = "'use blahhh';\r\nfoo1();\r\nfoo2();\r\nfoo3();\r\nfoo4();\r\nfoo4();\r\nfoo6();\r\nfoo7();\r\nfoo8();\r\nfoo9();\r\n";
var index = source.indexOf('b');
var oldText = ScriptSnapshot.fromString(source);
var newTextAndChange = withChange(oldText, index, 6, "strict");
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
});
}