-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e47606a
commit acc32e1
Showing
78 changed files
with
270 additions
and
146 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { printHello3, returnsFoo2, returnsHi } from "./mod1.ts"; | ||
|
||
printHello3(); | ||
|
||
if (returnsHi() !== "Hi") { | ||
throw Error("Unexpected"); | ||
} | ||
|
||
if (returnsFoo2() !== "Foo") { | ||
throw Error("Unexpected"); | ||
} |
9 changes: 9 additions & 0 deletions
9
tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
local: [WILDCARD]005_more_imports.ts | ||
type: TypeScript | ||
dependencies: 3 unique | ||
size: [WILDCARD] | ||
|
||
file://[WILDCARD]/005_more_imports.ts ([WILDCARD]) | ||
└─┬ file://[WILDCARD]/mod1.ts ([WILDCARD]) | ||
└─┬ file://[WILDCARD]/subdir2/mod2.ts ([WILDCARD]) | ||
└── file://[WILDCARD]/print_hello.ts ([WILDCARD]) |
5 changes: 5 additions & 0 deletions
5
tests/specs/info_tests/_054_info_local_imports/__test__.jsonc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"args": "info --quiet 005_more_imports.ts", | ||
"output": "054_info_local_imports.out", | ||
"exitCode": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { printHello2, returnsFoo } from "./subdir2/mod2.ts"; | ||
|
||
export function returnsHi(): string { | ||
return "Hi"; | ||
} | ||
|
||
export function returnsFoo2(): string { | ||
return returnsFoo(); | ||
} | ||
|
||
export function printHello3() { | ||
printHello2(); | ||
} | ||
|
||
export function throwsError() { | ||
throw Error("exception from mod1"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { printHello } from "./print_hello.ts"; |
3 changes: 3 additions & 0 deletions
3
tests/specs/info_tests/_054_info_local_imports/print_hello.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function printHello() { | ||
console.log("Hello"); | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(async () => { | ||
const { printHello } = await import("../mod2.ts"); | ||
printHello(); | ||
})(); |
9 changes: 9 additions & 0 deletions
9
tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { printHello } from "../print_hello.ts"; | ||
|
||
export function returnsFoo(): string { | ||
return "Foo"; | ||
} | ||
|
||
export function printHello2() { | ||
printHello(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info data_null_error/mod.ts", | ||
"output": "data_null_error/data_null_error.out" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"args": "info dynamic_imports_tmp_lit/main.js", | ||
"output": "dynamic_imports_tmp_lit/main.info.out", | ||
"exitCode": 0 | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
local: [WILDCARD]main.js | ||
type: JavaScript | ||
dependencies: 4 unique | ||
size: [WILDCARD] | ||
|
||
file:///[WILDCARD]/dynamic_imports_tmp_lit/main.js ([WILDCARD]) | ||
├── file:///[WILDCARD]/dynamic_imports_tmp_lit/sub/a.js ([WILDCARD]) | ||
├── file:///[WILDCARD]/dynamic_imports_tmp_lit/sub/b.ts ([WILDCARD]) | ||
├── file:///[WILDCARD]/dynamic_imports_tmp_lit/other/data.json ([WILDCARD]) | ||
└── file:///[WILDCARD]/dynamic_imports_tmp_lit/other/sub/data2.json ([WILDCARD]) |
14 changes: 14 additions & 0 deletions
14
tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const fileNames = [ | ||
"a.js", | ||
"b.ts", | ||
]; | ||
|
||
for (const fileName of fileNames) { | ||
await import(`./sub/${fileName}`); | ||
} | ||
|
||
const jsonFileNames = ["data.json", "sub/data2.json"]; | ||
for (const fileName of jsonFileNames) { | ||
const mod = await import(`./other/${fileName}`, { with: { type: "json" } }); | ||
console.log(mod.default); | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"data": 5 | ||
} |
3 changes: 3 additions & 0 deletions
3
...ecs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"data": 1 | ||
} |
1 change: 1 addition & 0 deletions
1
tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log("a"); |
1 change: 1 addition & 0 deletions
1
tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log("b"); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info", | ||
"output": "041_info_flag.out" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info --location https://deno.land", | ||
"output": "041_info_flag_location.out" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info http://127.0.0.1:4545/run/048_media_types_jsx.ts", | ||
"output": "049_info_flag_script_jsx.out" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"args": "info preact/debug", | ||
"output": "with_import_map.out", | ||
"exitCode": 0 | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info --json", | ||
"output": "info_json.out" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info --json 076_info_json_deps_order.ts", | ||
"output": "076_info_json_deps_order.out" | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { B } from "./B.ts"; | ||
import { thing } from "./common.ts"; | ||
|
||
export function A() { | ||
thing(); | ||
B(); | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { C } from "./C.ts"; | ||
import { thing } from "./common.ts"; | ||
|
||
export function B() { | ||
thing(); | ||
C(); | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { A } from "./A.ts"; | ||
import { thing } from "./common.ts"; | ||
|
||
export function C() { | ||
if (A != null) { | ||
thing(); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export function thing() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info --json --location https://deno.land", | ||
"output": "info_json_location.out" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info error_009_missing_js_module.js", | ||
"output": "info_missing_module.out" | ||
} |
1 change: 1 addition & 0 deletions
1
tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "./bad-module.js"; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"args": "info --quiet info_recursive_imports_test.ts", | ||
"output": "info_recursive_imports_test.out", | ||
"exitCode": 0 | ||
} |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { A } from "./recursive_imports/A.ts"; | ||
|
||
export function test() { | ||
A(); | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { B } from "./B.ts"; | ||
import { thing } from "./common.ts"; | ||
|
||
export function A() { | ||
thing(); | ||
B(); | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { C } from "./C.ts"; | ||
import { thing } from "./common.ts"; | ||
|
||
export function B() { | ||
thing(); | ||
C(); | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { A } from "./A.ts"; | ||
import { thing } from "./common.ts"; | ||
|
||
export function C() { | ||
if (A != null) { | ||
thing(); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export function thing() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": "info info_type_import.ts", | ||
"output": "info_type_import.out" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { AnInterface as _, isAnInterface } from "./type_and_code.ts"; | ||
|
||
isAnInterface({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export interface AnInterface { | ||
a: string; | ||
} | ||
|
||
export function isAnInterface(value: unknown): value is AnInterface { | ||
return value && typeof value === "object" && "a" in value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"args": "info --quiet --json json_output/main.ts", | ||
"output": "json_output/main.out", | ||
"exitCode": 0 | ||
} |
Oops, something went wrong.