diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2022-09-19 09:32:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-19 10:32:21 -0400 |
| commit | 1464b756a4ef091ef97d1bf7340188ab5fe5492a (patch) | |
| tree | 2eff346ccf5782c501460aec63a5028742066fa6 /cli/tests/testdata/info/json_output | |
| parent | 8d50c09c0db4e9b0644263cde3f7ff990ec75259 (diff) | |
refactor: move out test files from root testdata directory into sub directories (#15949)
Diffstat (limited to 'cli/tests/testdata/info/json_output')
| -rw-r--r-- | cli/tests/testdata/info/json_output/main.out | 90 | ||||
| -rw-r--r-- | cli/tests/testdata/info/json_output/main.ts | 11 |
2 files changed, 101 insertions, 0 deletions
diff --git a/cli/tests/testdata/info/json_output/main.out b/cli/tests/testdata/info/json_output/main.out new file mode 100644 index 000000000..124fc7351 --- /dev/null +++ b/cli/tests/testdata/info/json_output/main.out @@ -0,0 +1,90 @@ +{ + "roots": [ + "file://[WILDCARD]/info/json_output/main.ts" + ], + "modules": [ + { + "dependencies": [ + { + "specifier": "../../subdir/mod1.ts", + "code": { + "specifier": "file://[WILDCARD]/subdir/mod1.ts", + "span": { + "start": { + "line": 0, + "character": 52 + }, + "end": { + "line": 0, + "character": 74 + } + } + } + } + ], + "kind": "esm", + "local": "[WILDCARD]main.ts", + [WILDCARD] + "mediaType": "TypeScript", + "specifier": "file://[WILDCARD]/json_output/main.ts" + }, + { + "dependencies": [ + { + "specifier": "./subdir2/mod2.ts", + "code": { + "specifier": "file://[WILDCARD]/subdir/subdir2/mod2.ts", + "span": { + "start": { + "line": 0, + "character": 40 + }, + "end": { + "line": 0, + "character": 59 + } + } + } + } + ], + "kind": "esm", + "local": "[WILDCARD]mod1.ts", + [WILDCARD] + "mediaType": "TypeScript", + "specifier": "file://[WILDCARD]/subdir/mod1.ts" + }, + { + "kind": "esm", + "local": "[WILDCARD]print_hello.ts", + [WILDCARD] + "mediaType": "TypeScript", + "specifier": "file://[WILDCARD]/subdir/print_hello.ts" + }, + { + "dependencies": [ + { + "specifier": "../print_hello.ts", + "code": { + "specifier": "file://[WILDCARD]/subdir/print_hello.ts", + "span": { + "start": { + "line": 0, + "character": 27 + }, + "end": { + "line": 0, + "character": 46 + } + } + } + } + ], + "kind": "esm", + "local": "[WILDCARD]mod2.ts", + [WILDCARD] + "mediaType": "TypeScript", + "specifier": "file://[WILDCARD]/subdir/subdir2/mod2.ts" + } + ], + "redirects": {} +} diff --git a/cli/tests/testdata/info/json_output/main.ts b/cli/tests/testdata/info/json_output/main.ts new file mode 100644 index 000000000..927bc55ed --- /dev/null +++ b/cli/tests/testdata/info/json_output/main.ts @@ -0,0 +1,11 @@ +import { printHello3, returnsFoo2, returnsHi } from "../../subdir/mod1.ts"; + +printHello3(); + +if (returnsHi() !== "Hi") { + throw Error("Unexpected"); +} + +if (returnsFoo2() !== "Foo") { + throw Error("Unexpected"); +} |
