Remove duplicat es2018 tests

This commit is contained in:
Yui T
2017-03-17 10:54:06 -07:00
parent dbac66c756
commit 804ab2c0df
4 changed files with 37 additions and 47 deletions
@@ -1,10 +1,17 @@
// @module: es2018
// @lib: es2015
// @target: esnext
// @filename: 0.ts
export function foo(){}
export class B {
print() { return "I am B"}
}
// @filename: 1.ts
import * as Zero from "./0" // Should preserve ES2015 module syntax
import("./0");
var p1 = import("./0");
export default p1;
// @filename: 2.ts
// We use Promise<any> for now as there is no way to specify shape of module object
function foo(x: Promise<any>) {
x.then(value => {
let b = new value.B();
b.print();
})
}
foo(import("./0"));
@@ -6,12 +6,9 @@ export class B {
}
// @filename: 2.ts
// We use Promise<any> for now as there is no way to specify shape of module object
function foo(x: Promise<any>) {
x.then(value => {
let b = new value.B();
b.print();
})
async function foo() {
class C extends (await import("./0")).B {}
var c = new C();
c.print();
}
foo(import("./0"));
foo();
@@ -5,10 +5,22 @@ export class B {
print() { return "I am B"}
}
export function foo() { return "foo" }
// @filename: 1.ts
export function backup() { return "backup"; }
// @filename: 2.ts
async function foo() {
class C extends (await import("./0")).B {}
var c = new C();
c.print();
}
foo();
declare var console: any;
class C {
private myModule = import("./0");
method() {
this.myModule.then(Zero => {
console.log(Zero.foo());
}, async err => {
console.log(err);
let one = await import("./1");
console.log(one.backup());
});
}
}
@@ -1,26 +0,0 @@
// @module: es2018
// @target: esnext
// @filename: 0.ts
export class B {
print() { return "I am B"}
}
export function foo() { return "foo" }
// @filename: 1.ts
export function backup() { return "backup"; }
// @filename: 2.ts
declare var console: any;
class C {
private myModule = import("./0");
method() {
this.myModule.then(Zero => {
console.log(Zero.foo());
}, async err => {
console.log(err);
let one = await import("./1");
console.log(one.backup());
});
}
}