2016-02-26 02:06:31 +01:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
// @allowJs: true
|
|
|
|
|
|
|
|
// @Filename: mod.js
|
|
|
|
//// function foo() { return {a: "hello, world"}; }
|
|
|
|
//// module.exports = foo();
|
|
|
|
|
2016-02-29 03:25:04 +01:00
|
|
|
// @Filename: mod2.js
|
|
|
|
//// var x = {name: 'test'};
|
|
|
|
//// (function createExport(obj){
|
|
|
|
//// module.exports = {
|
|
|
|
//// "default": x,
|
|
|
|
//// "sausages": {eggs: 2}
|
|
|
|
//// };
|
|
|
|
//// })();
|
|
|
|
|
2016-02-26 02:06:31 +01:00
|
|
|
// @Filename: app.js
|
|
|
|
//// import {a} from "./mod"
|
2016-02-29 03:25:04 +01:00
|
|
|
//// import def, {sausages} from "./mod2"
|
2016-02-26 02:06:31 +01:00
|
|
|
//// a./**/
|
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({ marker: "", includes: "toString" });
|
2016-02-29 03:25:04 +01:00
|
|
|
|
|
|
|
edit.backspace(2);
|
|
|
|
edit.insert("def.");
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({ includes: "name" });
|
2016-02-29 03:25:04 +01:00
|
|
|
|
|
|
|
edit.insert("name;\nsausages.");
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({ includes: "eggs" });
|
2016-02-29 03:25:04 +01:00
|
|
|
edit.insert("eggs;");
|
2017-01-26 20:02:08 +01:00
|
|
|
verify.noErrors();
|