From 1464b756a4ef091ef97d1bf7340188ab5fe5492a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 19 Sep 2022 09:32:21 -0500 Subject: refactor: move out test files from root testdata directory into sub directories (#15949) --- cli/tests/testdata/check/check_all.out | 4 ++++ cli/tests/testdata/check/check_all.ts | 3 +++ cli/tests/testdata/check/declaration_header_file_with_no_exports.ts | 2 ++ .../testdata/check/declaration_header_file_with_no_exports_js.d.ts | 0 .../testdata/check/declaration_header_file_with_no_exports_js.js | 1 + cli/tests/testdata/check/module_detection_force.ts | 3 +++ cli/tests/testdata/check/module_detection_force/import.ts | 2 ++ cli/tests/testdata/check/module_detection_force/main.ts | 3 +++ 8 files changed, 18 insertions(+) create mode 100644 cli/tests/testdata/check/check_all.out create mode 100644 cli/tests/testdata/check/check_all.ts create mode 100644 cli/tests/testdata/check/declaration_header_file_with_no_exports.ts create mode 100644 cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts create mode 100644 cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js create mode 100644 cli/tests/testdata/check/module_detection_force.ts create mode 100644 cli/tests/testdata/check/module_detection_force/import.ts create mode 100644 cli/tests/testdata/check/module_detection_force/main.ts (limited to 'cli/tests/testdata/check') diff --git a/cli/tests/testdata/check/check_all.out b/cli/tests/testdata/check/check_all.out new file mode 100644 index 000000000..344264634 --- /dev/null +++ b/cli/tests/testdata/check/check_all.out @@ -0,0 +1,4 @@ +error: TS2322 [ERROR]: Type '12' is not assignable to type '"a"'. +export const a: "a" = 12; + ^ + at http://localhost:4545/subdir/type_error.ts:1:14 diff --git a/cli/tests/testdata/check/check_all.ts b/cli/tests/testdata/check/check_all.ts new file mode 100644 index 000000000..2ae8c2692 --- /dev/null +++ b/cli/tests/testdata/check/check_all.ts @@ -0,0 +1,3 @@ +import * as a from "http://localhost:4545/subdir/type_error.ts"; + +console.log(a.a); diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts b/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts new file mode 100644 index 000000000..ef5da7a38 --- /dev/null +++ b/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts @@ -0,0 +1,2 @@ +import * as foo from "./declaration_header_file_with_no_exports_js.js"; +console.log(foo); diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts new file mode 100644 index 000000000..e69de29bb diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js new file mode 100644 index 000000000..b8ae2bcef --- /dev/null +++ b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js @@ -0,0 +1 @@ +/// diff --git a/cli/tests/testdata/check/module_detection_force.ts b/cli/tests/testdata/check/module_detection_force.ts new file mode 100644 index 000000000..185ceb816 --- /dev/null +++ b/cli/tests/testdata/check/module_detection_force.ts @@ -0,0 +1,3 @@ +const a = 1; +await import("./module_detection_force/import.ts"); +console.log(a); diff --git a/cli/tests/testdata/check/module_detection_force/import.ts b/cli/tests/testdata/check/module_detection_force/import.ts new file mode 100644 index 000000000..66b229870 --- /dev/null +++ b/cli/tests/testdata/check/module_detection_force/import.ts @@ -0,0 +1,2 @@ +const a = 2; +console.log(a); diff --git a/cli/tests/testdata/check/module_detection_force/main.ts b/cli/tests/testdata/check/module_detection_force/main.ts new file mode 100644 index 000000000..a55c9962b --- /dev/null +++ b/cli/tests/testdata/check/module_detection_force/main.ts @@ -0,0 +1,3 @@ +const a = 1; +await import("./import.ts"); +console.log(a); -- cgit v1.2.3