added tests

This commit is contained in:
Vladimir Matveev 2016-02-03 21:43:31 -08:00
parent b033693947
commit 2c24f81561
20 changed files with 164 additions and 37 deletions

View file

@ -0,0 +1,16 @@
//// [tests/cases/compiler/keepImportsInDts1.ts] ////
//// [test.d.ts]
export {};
//// [main.ts]
import "test"
//// [main.js]
define(["require", "exports", "test"], function (require, exports) {
"use strict";
});
//// [main.d.ts]
import "test";

View file

@ -0,0 +1,6 @@
=== c:/test.d.ts ===
No type information for this code.export {};
No type information for this code.=== c:/app/main.ts ===
import "test"
No type information for this code.

View file

@ -0,0 +1,6 @@
=== c:/test.d.ts ===
No type information for this code.export {};
No type information for this code.=== c:/app/main.ts ===
import "test"
No type information for this code.

View file

@ -0,0 +1,22 @@
//// [tests/cases/compiler/keepImportsInDts2.ts] ////
//// [test.ts]
export {};
//// [main.ts]
import "./folder/test"
//// [test.js]
define(["require", "exports"], function (require, exports) {
"use strict";
});
//// [main.js]
define(["require", "exports", "./folder/test"], function (require, exports) {
"use strict";
});
//// [test.d.ts]
export { };
//// [main.d.ts]
import "./folder/test";

View file

@ -0,0 +1,6 @@
=== tests/cases/compiler/folder/test.ts ===
No type information for this code.export {};
No type information for this code.=== tests/cases/compiler/main.ts ===
import "./folder/test"
No type information for this code.

View file

@ -0,0 +1,6 @@
=== tests/cases/compiler/folder/test.ts ===
No type information for this code.export {};
No type information for this code.=== tests/cases/compiler/main.ts ===
import "./folder/test"
No type information for this code.

View file

@ -0,0 +1,24 @@
//// [tests/cases/compiler/keepImportsInDts3.ts] ////
//// [test.ts]
export {};
//// [main.ts]
import "test"
//// [outputfile.js]
define("test", ["require", "exports"], function (require, exports) {
"use strict";
});
define("app/main", ["require", "exports", "test"], function (require, exports) {
"use strict";
});
//// [outputfile.d.ts]
declare module "test" {
export { };
}
declare module "app/main" {
import "test";
}

View file

@ -0,0 +1,6 @@
=== c:/test.ts ===
No type information for this code.export {};
No type information for this code.=== c:/app/main.ts ===
import "test"
No type information for this code.

View file

@ -0,0 +1,6 @@
=== c:/test.ts ===
No type information for this code.export {};
No type information for this code.=== c:/app/main.ts ===
import "test"
No type information for this code.

View file

@ -0,0 +1,24 @@
//// [tests/cases/compiler/keepImportsInDts4.ts] ////
//// [test.ts]
export {};
//// [main.ts]
import "./folder/test"
//// [outputfile.js]
define("folder/test", ["require", "exports"], function (require, exports) {
"use strict";
});
define("main", ["require", "exports", "folder/test"], function (require, exports) {
"use strict";
});
//// [outputfile.d.ts]
declare module "folder/test" {
export { };
}
declare module "main" {
import "folder/test";
}

View file

@ -0,0 +1,6 @@
=== tests/cases/compiler/folder/test.ts ===
No type information for this code.export {};
No type information for this code.=== tests/cases/compiler/main.ts ===
import "./folder/test"
No type information for this code.

View file

@ -0,0 +1,6 @@
=== tests/cases/compiler/folder/test.ts ===
No type information for this code.export {};
No type information for this code.=== tests/cases/compiler/main.ts ===
import "./folder/test"
No type information for this code.

View file

@ -1,13 +0,0 @@
//// [tests/cases/compiler/noErrorOnEmptyDts.ts] ////
//// [test.d.ts]
// comment
//// [main.ts]
import "test"
//// [main.js]
"use strict";
require("test");

View file

@ -1,8 +0,0 @@
=== c:/node_modules/test.d.ts ===
No type information for this code.
No type information for this code.// comment
No type information for this code.
No type information for this code.=== c:/app/main.ts ===
import "test"
No type information for this code.

View file

@ -1,8 +0,0 @@
=== c:/node_modules/test.d.ts ===
No type information for this code.
No type information for this code.// comment
No type information for this code.
No type information for this code.=== c:/app/main.ts ===
import "test"
No type information for this code.

View file

@ -0,0 +1,7 @@
// @module: amd
// @declaration: true
// @filename: c:/test.d.ts
export {};
// @filename: c:/app/main.ts
import "test"

View file

@ -0,0 +1,7 @@
// @module: amd
// @declaration: true
// @filename: folder/test.ts
export {};
// @filename: main.ts
import "./folder/test"

View file

@ -0,0 +1,8 @@
// @module: amd
// @declaration: true
// @out: outputfile.js
// @filename: c:/test.ts
export {};
// @filename: c:/app/main.ts
import "test"

View file

@ -0,0 +1,8 @@
// @module: amd
// @declaration: true
// @out: outputfile.js
// @filename: folder/test.ts
export {};
// @filename: main.ts
import "./folder/test"

View file

@ -1,8 +0,0 @@
// @module: commonjs
// @filename: c:/node_modules/test.d.ts
// comment
// @filename: c:/app/main.ts
import "test"