diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/error_no_check.ts | 1 | ||||
-rw-r--r-- | cli/tests/error_no_check.ts.out | 1 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 15 | ||||
-rw-r--r-- | cli/tests/subdir/type_and_code.ts | 7 |
4 files changed, 24 insertions, 0 deletions
diff --git a/cli/tests/error_no_check.ts b/cli/tests/error_no_check.ts new file mode 100644 index 000000000..db9257a1d --- /dev/null +++ b/cli/tests/error_no_check.ts @@ -0,0 +1 @@ +export { AnInterface, isAnInterface } from "./subdir/type_and_code.ts"; diff --git a/cli/tests/error_no_check.ts.out b/cli/tests/error_no_check.ts.out new file mode 100644 index 000000000..5890d1db8 --- /dev/null +++ b/cli/tests/error_no_check.ts.out @@ -0,0 +1 @@ +error: Uncaught SyntaxError: The requested module './subdir/type_and_code.ts' does not provide an export named 'AnInterface' diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 562c25de2..9acb4ed3f 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -16,6 +16,7 @@ use tempfile::TempDir; fn std_tests() { let dir = TempDir::new().expect("tempdir fail"); let std_path = util::root_path().join("std"); + let std_config = std_path.join("tsconfig_test.json"); let status = util::deno_cmd() .env("DENO_DIR", dir.path()) .current_dir(std_path) // TODO(ry) change this to root_path @@ -23,6 +24,8 @@ fn std_tests() { .arg("--unstable") .arg("--seed=86") // Some tests rely on specific random numbers. .arg("-A") + .arg("--config") + .arg(std_config.to_str().unwrap()) // .arg("-Ldebug") .spawn() .unwrap() @@ -1832,6 +1835,12 @@ itest!(error_025_tab_indent { exit_code: 1, }); +itest!(error_no_check { + args: "run --reload --no-check error_no_check.ts", + output: "error_no_check.ts.out", + exit_code: 1, +}); + itest!(error_syntax { args: "run --reload error_syntax.js", exit_code: 1, @@ -1890,6 +1899,12 @@ itest!(main_module { output: "main_module.ts.out", }); +itest!(no_check { + args: "run --quiet --reload --no-check 006_url_imports.ts", + output: "006_url_imports.ts.out", + http_server: true, +}); + itest!(lib_ref { args: "run --quiet --unstable --reload lib_ref.ts", output: "lib_ref.ts.out", diff --git a/cli/tests/subdir/type_and_code.ts b/cli/tests/subdir/type_and_code.ts new file mode 100644 index 000000000..b14713419 --- /dev/null +++ b/cli/tests/subdir/type_and_code.ts @@ -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; +} |