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:
@@ -252,5 +252,16 @@ module ts {
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
|
||||
it('Type member 1',() => {
|
||||
// Should be able to reuse most of the type members.
|
||||
var source = "interface I { a: number; b: string; (c): d; new (e): f; g(): h }";
|
||||
|
||||
var index = source.indexOf(": string");
|
||||
var oldText = ScriptSnapshot.fromString(source);
|
||||
var newTextAndChange = withInsert(oldText, index, "?");
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user