Update tests

This commit is contained in:
Ryan Cavanaugh 2016-03-21 09:23:41 -07:00
parent c8cd748e48
commit 32b4e46c1d
2 changed files with 23 additions and 2 deletions

View File

@ -8,7 +8,7 @@
//// class Foo {
//// constructor() {
//// this.bar = 'world';
//// this.thing = 42;
//// this.thing = () => 0;
//// this.union = 'foo';
//// this.union = 100;
//// }
@ -25,7 +25,6 @@ verify.completionListContains("union", /*displayText*/ undefined, /*documentatio
edit.insert('bar.');
verify.completionListContains("substr", /*displayText*/ undefined, /*documentation*/ undefined, "method");
edit.backspace('bar.'.length);
edit.insert('union.');

View File

@ -0,0 +1,22 @@
///<reference path="fourslash.ts" />
// Classes have their shape inferred from assignments
// to properties of 'this' in the constructor
// @allowNonTsExtensions: true
// @Filename: Foo.js
//// class Foo {
//// constructor() {
//// /**
//// * @type {string}
//// */
//// this.baz = null;
//// }
//// }
//// var x = new Foo();
//// x/**/
goTo.marker();
edit.insert('.baz.');
verify.completionListContains("substr", /*displayText*/ undefined, /*documentation*/ undefined, "method");