diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5AMD.ts b/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5AMD.ts new file mode 100644 index 00000000000..f44ce0e6e13 --- /dev/null +++ b/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5AMD.ts @@ -0,0 +1,15 @@ +// @module: amd +// @target: es5 +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5CJS.ts b/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5CJS.ts new file mode 100644 index 00000000000..e1457017552 --- /dev/null +++ b/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5CJS.ts @@ -0,0 +1,15 @@ +// @module: commonjs +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5System.ts b/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5System.ts new file mode 100644 index 00000000000..a69e844c7a7 --- /dev/null +++ b/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5System.ts @@ -0,0 +1,15 @@ +// @module: system +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5UMD.ts b/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5UMD.ts new file mode 100644 index 00000000000..05c4d699104 --- /dev/null +++ b/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5UMD.ts @@ -0,0 +1,15 @@ +// @module: umd +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file