mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 21:37:41 -06:00
Add incremental test.
This commit is contained in:
parent
025dd23c1b
commit
197b62e92a
@ -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',() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user