summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/bundle_tests.rs10
-rw-r--r--cli/tests/integration/cache_tests.rs13
-rw-r--r--cli/tests/integration/eval_tests.rs1
-rw-r--r--cli/tests/integration/inspector_tests.rs14
-rw-r--r--cli/tests/integration/install_tests.rs14
-rw-r--r--cli/tests/integration/mod.rs12
-rw-r--r--cli/tests/integration/run_tests.rs99
-rw-r--r--cli/tests/integration/watcher_tests.rs5
-rw-r--r--cli/tests/testdata/cache/check_local_by_default2.out4
-rw-r--r--cli/tests/testdata/eval/check_local_by_default2.out7
-rw-r--r--cli/tests/testdata/future_check1.out1
11 files changed, 36 insertions, 144 deletions
diff --git a/cli/tests/integration/bundle_tests.rs b/cli/tests/integration/bundle_tests.rs
index 9c328abdb..4bd342acd 100644
--- a/cli/tests/integration/bundle_tests.rs
+++ b/cli/tests/integration/bundle_tests.rs
@@ -34,7 +34,6 @@ fn bundle_exports() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&test)
.output()
@@ -77,7 +76,6 @@ fn bundle_exports_no_check() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&test)
.output()
@@ -110,7 +108,6 @@ fn bundle_circular() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&bundle)
.output()
@@ -143,7 +140,6 @@ fn bundle_single_module() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&bundle)
.output()
@@ -186,7 +182,6 @@ fn bundle_tla() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&test)
.output()
@@ -219,7 +214,6 @@ fn bundle_js() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&bundle)
.output()
@@ -294,7 +288,6 @@ fn bundle_import_map() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg(&test)
@@ -340,7 +333,6 @@ fn bundle_import_map_no_check() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&test)
.output()
@@ -373,7 +365,6 @@ fn bundle_json_module() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&bundle)
.output()
@@ -406,7 +397,6 @@ fn bundle_json_module_escape_sub() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&bundle)
.output()
diff --git a/cli/tests/integration/cache_tests.rs b/cli/tests/integration/cache_tests.rs
index bf0233a28..aaae62531 100644
--- a/cli/tests/integration/cache_tests.rs
+++ b/cli/tests/integration/cache_tests.rs
@@ -9,7 +9,7 @@ itest!(_036_import_map_fetch {
});
itest!(_037_fetch_multiple {
- args: "cache --reload fetch/test.ts fetch/other.ts",
+ args: "cache --reload --check=all fetch/test.ts fetch/other.ts",
http_server: true,
output: "037_fetch_multiple.out",
});
@@ -21,25 +21,27 @@ itest!(_095_cache_with_bare_import {
});
itest!(cache_extensionless {
- args: "cache --reload http://localhost:4545/subdir/no_js_ext",
+ args: "cache --reload --check=all http://localhost:4545/subdir/no_js_ext",
output: "cache_extensionless.out",
http_server: true,
});
itest!(cache_random_extension {
- args: "cache --reload http://localhost:4545/subdir/no_js_ext@1.0.0",
+ args:
+ "cache --reload --check=all http://localhost:4545/subdir/no_js_ext@1.0.0",
output: "cache_random_extension.out",
http_server: true,
});
itest!(performance_stats {
- args: "cache --reload --log-level debug 002_hello.ts",
+ args: "cache --reload --check=all --log-level debug 002_hello.ts",
output: "performance_stats.out",
});
itest!(redirect_cache {
http_server: true,
- args: "cache --reload http://localhost:4548/subdir/redirects/a.ts",
+ args:
+ "cache --reload --check=all http://localhost:4548/subdir/redirects/a.ts",
output: "redirect_cache.out",
});
@@ -89,5 +91,4 @@ itest!(check_local_by_default2 {
args: "cache --quiet cache/check_local_by_default2.ts",
output: "cache/check_local_by_default2.out",
http_server: true,
- exit_code: 1,
});
diff --git a/cli/tests/integration/eval_tests.rs b/cli/tests/integration/eval_tests.rs
index a93f85286..892ca7ffd 100644
--- a/cli/tests/integration/eval_tests.rs
+++ b/cli/tests/integration/eval_tests.rs
@@ -77,5 +77,4 @@ itest!(check_local_by_default2 {
args: "eval --quiet import('./eval/check_local_by_default2.ts').then(console.log);",
output: "eval/check_local_by_default2.out",
http_server: true,
- exit_code: 1,
});
diff --git a/cli/tests/integration/inspector_tests.rs b/cli/tests/integration/inspector_tests.rs
index 86a5d4264..f60e870c6 100644
--- a/cli/tests/integration/inspector_tests.rs
+++ b/cli/tests/integration/inspector_tests.rs
@@ -142,7 +142,6 @@ async fn assert_inspector_messages(
async fn inspector_connect() {
let script = util::testdata_path().join("inspector/inspector1.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect"))
.arg(script)
@@ -168,7 +167,6 @@ async fn inspector_connect() {
async fn inspector_break_on_first_line() {
let script = util::testdata_path().join("inspector/inspector2.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect-brk"))
.arg(script)
@@ -259,7 +257,6 @@ async fn inspector_break_on_first_line() {
async fn inspector_pause() {
let script = util::testdata_path().join("inspector/inspector1.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect"))
.arg(script)
@@ -330,7 +327,6 @@ async fn inspector_port_collision() {
let inspect_flag = inspect_flag_with_unique_port("--inspect");
let mut child1 = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&inspect_flag)
.arg(script.clone())
@@ -345,7 +341,6 @@ async fn inspector_port_collision() {
let _ = extract_ws_url_from_stderr(&mut stderr_1_lines);
let mut child2 = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(&inspect_flag)
.arg(script)
@@ -370,7 +365,6 @@ async fn inspector_port_collision() {
async fn inspector_does_not_hang() {
let script = util::testdata_path().join("inspector/inspector3.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect-brk"))
.env("NO_COLOR", "1")
@@ -482,7 +476,6 @@ async fn inspector_does_not_hang() {
async fn inspector_without_brk_runs_code() {
let script = util::testdata_path().join("inspector/inspector4.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect"))
.arg(script)
@@ -610,7 +603,6 @@ async fn inspector_runtime_evaluate_does_not_crash() {
async fn inspector_json() {
let script = util::testdata_path().join("inspector/inspector1.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect"))
.arg(script)
@@ -640,7 +632,6 @@ async fn inspector_json() {
async fn inspector_json_list() {
let script = util::testdata_path().join("inspector/inspector1.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect"))
.arg(script)
@@ -672,7 +663,6 @@ async fn inspector_connect_non_ws() {
// Verify we don't panic if non-WS connection is being established
let script = util::testdata_path().join("inspector/inspector1.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect"))
.arg(script)
@@ -698,7 +688,6 @@ async fn inspector_connect_non_ws() {
async fn inspector_break_on_first_line_in_test() {
let script = util::testdata_path().join("inspector/inspector_test.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("test")
.arg(inspect_flag_with_unique_port("--inspect-brk"))
.arg(script)
@@ -793,7 +782,6 @@ async fn inspector_break_on_first_line_in_test() {
async fn inspector_with_ts_files() {
let script = util::testdata_path().join("inspector/test.ts");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg(inspect_flag_with_unique_port("--inspect-brk"))
@@ -920,7 +908,6 @@ async fn inspector_with_ts_files() {
async fn inspector_memory() {
let script = util::testdata_path().join("inspector/memory.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect-brk"))
.arg(script)
@@ -1035,7 +1022,6 @@ async fn inspector_memory() {
async fn inspector_profile() {
let script = util::testdata_path().join("inspector/memory.js");
let mut child = util::deno_cmd()
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg(inspect_flag_with_unique_port("--inspect-brk"))
.arg(script)
diff --git a/cli/tests/integration/install_tests.rs b/cli/tests/integration/install_tests.rs
index 44b418e10..60bfaf50e 100644
--- a/cli/tests/integration/install_tests.rs
+++ b/cli/tests/integration/install_tests.rs
@@ -14,6 +14,7 @@ fn install_basic() {
let status = util::deno_cmd()
.current_dir(temp_dir.path())
.arg("install")
+ .arg("--check")
.arg("--name")
.arg("echo_test")
.arg("http://localhost:4545/echo.ts")
@@ -58,6 +59,7 @@ fn install_custom_dir_env_var() {
let status = util::deno_cmd()
.current_dir(util::root_path()) // different cwd
.arg("install")
+ .arg("--check")
.arg("--name")
.arg("echo_test")
.arg("http://localhost:4545/echo.ts")
@@ -188,7 +190,7 @@ fn check_local_by_default2() {
let temp_dir = TempDir::new();
let temp_dir_str = temp_dir.path().to_string_lossy().to_string();
- let output = util::deno_cmd()
+ let status = util::deno_cmd()
.current_dir(temp_dir.path())
.arg("install")
.arg(util::testdata_path().join("./install/check_local_by_default2.ts"))
@@ -198,13 +200,7 @@ fn check_local_by_default2() {
("USERPROFILE", temp_dir_str.as_str()),
("DENO_INSTALL_ROOT", ""),
])
- .output()
+ .status()
.unwrap();
- assert!(!output.status.success());
- let stdout = String::from_utf8(output.stdout).unwrap();
- let stderr = String::from_utf8(output.stderr).unwrap();
- assert!(stdout.is_empty());
- assert!(stderr.contains(
- r#"error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'."#
- ));
+ assert!(status.success());
}
diff --git a/cli/tests/integration/mod.rs b/cli/tests/integration/mod.rs
index d0c693a37..42ae24142 100644
--- a/cli/tests/integration/mod.rs
+++ b/cli/tests/integration/mod.rs
@@ -150,6 +150,7 @@ fn cache_test() {
.env("DENO_DIR", deno_dir.path())
.current_dir(util::testdata_path())
.arg("cache")
+ .arg("--check=all")
.arg("-L")
.arg("debug")
.arg(module_url.to_string())
@@ -297,7 +298,6 @@ fn ts_dependency_recompilation() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg(&ats)
@@ -321,7 +321,6 @@ fn ts_dependency_recompilation() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg(&ats)
@@ -346,7 +345,6 @@ fn ts_no_recheck_on_redirect() {
assert!(redirect_ts.is_file());
let mut cmd = Command::new(e.clone());
cmd.env("DENO_DIR", deno_dir.path());
- cmd.env("DENO_FUTURE_CHECK", "1");
let mut initial = cmd
.current_dir(util::testdata_path())
.arg("run")
@@ -360,7 +358,6 @@ fn ts_no_recheck_on_redirect() {
let mut cmd = Command::new(e);
cmd.env("DENO_DIR", deno_dir.path());
- cmd.env("DENO_FUTURE_CHECK", "1");
let output = cmd
.current_dir(util::testdata_path())
.arg("run")
@@ -381,6 +378,7 @@ fn ts_reload() {
let mut initial = util::deno_cmd_with_deno_dir(&deno_dir)
.current_dir(util::testdata_path())
.arg("cache")
+ .arg("--check=all")
.arg(&hello_ts)
.spawn()
.expect("failed to spawn script");
@@ -391,6 +389,7 @@ fn ts_reload() {
let output = util::deno_cmd_with_deno_dir(&deno_dir)
.current_dir(util::testdata_path())
.arg("cache")
+ .arg("--check=all")
.arg("--reload")
.arg("-L")
.arg("debug")
@@ -654,7 +653,6 @@ fn cafile_bundle_remote_exports() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg(&test)
@@ -867,7 +865,6 @@ async fn test_resolve_dns() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg("--allow-net")
@@ -895,7 +892,6 @@ async fn test_resolve_dns() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg("--allow-net=127.0.0.1:4553")
@@ -922,7 +918,6 @@ async fn test_resolve_dns() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg("--allow-net=deno.land")
@@ -946,7 +941,6 @@ async fn test_resolve_dns() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("--check")
.arg("resolve_dns.ts")
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index f5929ee55..7ea95c312 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -13,7 +13,6 @@ itest!(stdout_write_all {
itest!(_001_hello {
args: "run --reload 001_hello.js",
output: "001_hello.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(_002_hello {
@@ -107,7 +106,6 @@ itest!(_021_mjs_modules {
itest!(_023_no_ext {
args: "run --reload --check 023_no_ext",
output: "023_no_ext.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
// TODO(lucacasonato): remove --unstable when permissions goes stable
@@ -161,12 +159,11 @@ itest!(_035_cached_only_flag {
output: "035_cached_only_flag.out",
exit_code: 1,
http_server: true,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(_038_checkjs {
// checking if JS file is run through TS compiler
- args: "run --reload --config checkjs.tsconfig.json 038_checkjs.js",
+ args: "run --reload --config checkjs.tsconfig.json --check 038_checkjs.js",
exit_code: 1,
output: "038_checkjs.js.out",
});
@@ -211,7 +208,6 @@ itest!(_052_no_remote_flag {
output: "052_no_remote_flag.out",
exit_code: 1,
http_server: true,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(_056_make_temp_file_write_perm {
@@ -532,7 +528,7 @@ fn _090_run_permissions_request() {
}
itest!(_091_use_define_for_class_fields {
- args: "run 091_use_define_for_class_fields.ts",
+ args: "run --check 091_use_define_for_class_fields.ts",
output: "091_use_define_for_class_fields.ts.out",
exit_code: 1,
});
@@ -553,7 +549,6 @@ itest!(blob_gc_finalization {
args: "run blob_gc_finalization.js",
output: "blob_gc_finalization.js.out",
exit_code: 0,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(fetch_response_finalization {
@@ -561,7 +556,6 @@ itest!(fetch_response_finalization {
output: "fetch_response_finalization.js.out",
http_server: true,
exit_code: 0,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(import_type {
@@ -650,7 +644,7 @@ itest!(async_error {
});
itest!(config {
- args: "run --reload --config config.tsconfig.json config.ts",
+ args: "run --reload --config config.tsconfig.json --check config.ts",
exit_code: 1,
output: "config.ts.out",
});
@@ -670,7 +664,6 @@ itest!(config_types_remote {
itest!(empty_typescript {
args: "run --reload --check subdir/empty.ts",
output_str: Some("Check file:[WILDCARD]/subdir/empty.ts\n"),
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(error_001 {
@@ -686,7 +679,7 @@ itest!(error_002 {
});
itest!(error_003_typescript {
- args: "run --reload error_003_typescript.ts",
+ args: "run --reload --check error_003_typescript.ts",
exit_code: 1,
output: "error_003_typescript.ts.out",
});
@@ -696,7 +689,7 @@ itest!(error_003_typescript {
// should result in the same output.
// https://github.com/denoland/deno/issues/2436
itest!(error_003_typescript2 {
- args: "run error_003_typescript.ts",
+ args: "run --check error_003_typescript.ts",
exit_code: 1,
output: "error_003_typescript.ts.out",
});
@@ -747,20 +740,17 @@ itest!(error_012_bad_dynamic_import_specifier {
args: "run --reload --check error_012_bad_dynamic_import_specifier.ts",
exit_code: 1,
output: "error_012_bad_dynamic_import_specifier.ts.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(error_013_missing_script {
args: "run --reload missing_file_name",
exit_code: 1,
output: "error_013_missing_script.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(error_014_catch_dynamic_import_error {
args: "run --reload --allow-read error_014_catch_dynamic_import_error.js",
output: "error_014_catch_dynamic_import_error.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(error_015_dynamic_import_permissions {
@@ -779,7 +769,7 @@ itest!(error_016_dynamic_import_permissions2 {
});
itest!(error_017_hide_long_source_ts {
- args: "run --reload error_017_hide_long_source_ts.ts",
+ args: "run --reload --check error_017_hide_long_source_ts.ts",
output: "error_017_hide_long_source_ts.ts.out",
exit_code: 1,
});
@@ -788,7 +778,6 @@ itest!(error_018_hide_long_source_js {
args: "run error_018_hide_long_source_js.js",
output: "error_018_hide_long_source_js.js.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(error_019_stack_function {
@@ -841,7 +830,7 @@ itest!(error_026_remote_import_error {
});
itest!(error_for_await {
- args: "run --reload error_for_await.ts",
+ args: "run --reload --check error_for_await.ts",
output: "error_for_await.ts.out",
exit_code: 1,
});
@@ -862,18 +851,16 @@ itest!(error_syntax {
args: "run --reload error_syntax.js",
exit_code: 1,
output: "error_syntax.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(error_syntax_empty_trailing_line {
args: "run --reload error_syntax_empty_trailing_line.mjs",
exit_code: 1,
output: "error_syntax_empty_trailing_line.mjs.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(error_type_definitions {
- args: "run --reload error_type_definitions.ts",
+ args: "run --reload --check error_type_definitions.ts",
exit_code: 1,
output: "error_type_definitions.ts.out",
});
@@ -992,7 +979,6 @@ itest!(runtime_decorators {
itest!(seed_random {
args: "run --seed=100 seed_random.js",
output: "seed_random.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(type_definitions {
@@ -1004,17 +990,16 @@ itest!(type_definitions_for_export {
args: "run --reload --check type_definitions_for_export.ts",
output: "type_definitions_for_export.ts.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(type_directives_01 {
- args: "run --reload -L debug type_directives_01.ts",
+ args: "run --reload --check=all -L debug type_directives_01.ts",
output: "type_directives_01.ts.out",
http_server: true,
});
itest!(type_directives_02 {
- args: "run --reload -L debug type_directives_02.ts",
+ args: "run --reload --check=all -L debug type_directives_02.ts",
output: "type_directives_02.ts.out",
});
@@ -1028,40 +1013,34 @@ itest!(type_directives_redirect {
args: "run --reload --check type_directives_redirect.ts",
output: "type_directives_redirect.ts.out",
http_server: true,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(type_headers_deno_types {
args: "run --reload --check type_headers_deno_types.ts",
output: "type_headers_deno_types.ts.out",
http_server: true,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(ts_type_imports {
args: "run --reload --check ts_type_imports.ts",
output: "ts_type_imports.ts.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(ts_decorators {
args: "run --reload -c tsconfig.decorators.json --check ts_decorators.ts",
output: "ts_decorators.ts.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(ts_type_only_import {
args: "run --reload --check ts_type_only_import.ts",
output: "ts_type_only_import.ts.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(swc_syntax_error {
args: "run --reload --check swc_syntax_error.ts",
output: "swc_syntax_error.ts.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unbuffered_stderr {
@@ -1077,7 +1056,6 @@ itest!(unbuffered_stdout {
itest!(v8_flags_run {
args: "run --v8-flags=--expose-gc v8_flags.js",
output: "v8_flags.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(v8_flags_unrecognized {
@@ -1110,14 +1088,12 @@ itest!(wasm_shared {
itest!(wasm_async {
args: "run wasm_async.js",
output: "wasm_async.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(wasm_unreachable {
args: "run --allow-read wasm_unreachable.js",
output: "wasm_unreachable.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(wasm_url {
@@ -1135,40 +1111,34 @@ itest!(weakref {
itest!(top_level_await_order {
args: "run --allow-read top_level_await_order.js",
output: "top_level_await_order.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(top_level_await_loop {
args: "run --allow-read top_level_await_loop.js",
output: "top_level_await_loop.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(top_level_await_circular {
args: "run --allow-read top_level_await_circular.js",
output: "top_level_await_circular.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
// Regression test for https://github.com/denoland/deno/issues/11238.
itest!(top_level_await_nested {
args: "run --allow-read top_level_await_nested/main.js",
output: "top_level_await_nested.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(top_level_await_unresolved {
args: "run top_level_await_unresolved.js",
output: "top_level_await_unresolved.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(top_level_await {
args: "run --allow-read top_level_await.js",
output: "top_level_await.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(top_level_await_ts {
@@ -1187,7 +1157,7 @@ itest!(top_level_for_await_ts {
});
itest!(unstable_disabled {
- args: "run --reload unstable.ts",
+ args: "run --reload --check unstable.ts",
exit_code: 1,
output: "unstable_disabled.out",
});
@@ -1200,7 +1170,6 @@ itest!(unstable_enabled {
itest!(unstable_disabled_js {
args: "run --reload unstable.js",
output: "unstable_disabled_js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_enabled_js {
@@ -1241,13 +1210,11 @@ itest!(dynamic_import_conditional {
itest!(tsx_imports {
args: "run --reload --check tsx_imports.ts",
output: "tsx_imports.ts.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(fix_dynamic_import_errors {
args: "run --reload fix_dynamic_import_errors.js",
output: "fix_dynamic_import_errors.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(fix_emittable_skipped {
@@ -1422,7 +1389,6 @@ itest!(jsx_import_source_import_map_no_check {
itest!(proto_exploit {
args: "run proto_exploit.js",
output: "proto_exploit.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(reference_types {
@@ -1519,7 +1485,6 @@ itest!(classic_workers_event_loop {
args:
"run --enable-testing-features-do-not-use classic_workers_event_loop.js",
output: "classic_workers_event_loop.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
// FIXME(bartlomieju): disabled, because this test is very flaky on CI
@@ -1571,7 +1536,6 @@ itest!(error_import_map_unable_to_load {
args: "run --import-map=import_maps/does_not_exist.json import_maps/test.ts",
output: "error_import_map_unable_to_load.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
// Test that setting `self` in the main thread to some other value doesn't break
@@ -1579,7 +1543,6 @@ itest!(error_import_map_unable_to_load {
itest!(replace_self {
args: "run replace_self.js",
output: "replace_self.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(worker_event_handler_test {
@@ -1622,7 +1585,6 @@ itest!(reference_types_error {
args: "run --config checkjs.tsconfig.json --check reference_types_error.js",
output: "reference_types_error.js.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(reference_types_error_no_check {
@@ -1634,7 +1596,6 @@ itest!(jsx_import_source_error {
args: "run --config jsx/deno-jsx-error.jsonc --check jsx_import_source_no_pragma.tsx",
output: "jsx_import_source_error.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(shebang_tsc {
@@ -1663,7 +1624,6 @@ itest!(shebang_with_json_imports_swc {
fn no_validate_asm() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("no_validate_asm.js")
.stderr(std::process::Stdio::piped())
@@ -1808,7 +1768,6 @@ fn rust_log() {
// Without RUST_LOG the stderr is empty.
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("001_hello.js")
.stderr(std::process::Stdio::piped())
@@ -1822,7 +1781,6 @@ fn rust_log() {
// With RUST_LOG the stderr is not empty.
let output = util::deno_cmd()
.current_dir(util::testdata_path())
- .env("DENO_FUTURE_CHECK", "1")
.arg("run")
.arg("001_hello.js")
.env("RUST_LOG", "debug")
@@ -1843,6 +1801,7 @@ fn dont_cache_on_check_fail() {
let output = deno_cmd
.current_dir(util::testdata_path())
.arg("run")
+ .arg("--check=all")
.arg("--reload")
.arg("error_003_typescript.ts")
.stderr(std::process::Stdio::piped())
@@ -1857,6 +1816,7 @@ fn dont_cache_on_check_fail() {
let output = deno_cmd
.current_dir(util::testdata_path())
.arg("run")
+ .arg("--check=all")
.arg("error_003_typescript.ts")
.stderr(std::process::Stdio::piped())
.spawn()
@@ -2400,7 +2360,6 @@ itest!(eval_context_throw_with_conflicting_source {
itest!(eval_context_throw_dom_exception {
args: "run eval_context_throw_dom_exception.js",
output: "eval_context_throw_dom_exception.js.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
/// Regression test for https://github.com/denoland/deno/issues/12740.
@@ -2450,6 +2409,7 @@ fn issue12807() {
let status = deno_cmd
.current_dir(util::testdata_path())
.arg("run")
+ .arg("--check")
.arg(&mod1_path)
.stderr(std::process::Stdio::null())
.stdout(std::process::Stdio::null())
@@ -2463,6 +2423,7 @@ fn issue12807() {
let status = deno_cmd
.current_dir(util::testdata_path())
.arg("run")
+ .arg("--check")
.arg(&mod1_path)
.stderr(std::process::Stdio::null())
.stdout(std::process::Stdio::null())
@@ -2506,7 +2467,7 @@ itest!(import_assertions_dynamic_error {
});
itest!(import_assertions_type_check {
- args: "run --allow-read import_assertions/type_check.ts",
+ args: "run --allow-read --check import_assertions/type_check.ts",
output: "import_assertions/type_check.out",
exit_code: 1,
});
@@ -2514,13 +2475,11 @@ itest!(import_assertions_type_check {
itest!(delete_window {
args: "run delete_window.js",
output_str: Some("true\n"),
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(colors_without_global_this {
args: "run colors_without_globalThis.js",
output_str: Some("true\n"),
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(config_auto_discovered_for_local_script {
@@ -2529,7 +2488,7 @@ itest!(config_auto_discovered_for_local_script {
});
itest!(no_config_auto_discovery_for_local_script {
- args: "run --quiet --no-config run/with_config/frontend_work.ts",
+ args: "run --quiet --no-config --check run/with_config/frontend_work.ts",
output: "run/with_config/no_auto_discovery.out",
exit_code: 1,
});
@@ -2544,7 +2503,6 @@ itest!(wasm_streaming_panic_test {
args: "run wasm_streaming_panic_test.js",
output: "wasm_streaming_panic_test.js.out",
exit_code: 1,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
// Regression test for https://github.com/denoland/deno/issues/13897.
@@ -2558,116 +2516,95 @@ itest!(unstable_ffi_1 {
args: "run unstable_ffi_1.js",
output: "unstable_ffi_1.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_2 {
args: "run unstable_ffi_2.js",
output: "unstable_ffi_2.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_3 {
args: "run unstable_ffi_3.js",
output: "unstable_ffi_3.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_4 {
args: "run unstable_ffi_4.js",
output: "unstable_ffi_4.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_5 {
args: "run unstable_ffi_5.js",
output: "unstable_ffi_5.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_6 {
args: "run unstable_ffi_6.js",
output: "unstable_ffi_6.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_7 {
args: "run unstable_ffi_7.js",
output: "unstable_ffi_7.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_8 {
args: "run unstable_ffi_8.js",
output: "unstable_ffi_8.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_9 {
args: "run unstable_ffi_9.js",
output: "unstable_ffi_9.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_10 {
args: "run unstable_ffi_10.js",
output: "unstable_ffi_10.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_11 {
args: "run unstable_ffi_11.js",
output: "unstable_ffi_11.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_12 {
args: "run unstable_ffi_12.js",
output: "unstable_ffi_12.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_13 {
args: "run unstable_ffi_13.js",
output: "unstable_ffi_13.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_14 {
args: "run unstable_ffi_14.js",
output: "unstable_ffi_14.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(unstable_ffi_15 {
args: "run unstable_ffi_15.js",
output: "unstable_ffi_15.js.out",
exit_code: 70,
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
-});
-
-itest!(future_check1 {
- args: "run future_check.ts",
- output: "future_check1.out",
});
itest!(future_check2 {
args: "run --check future_check.ts",
output: "future_check2.out",
- envs: vec![("DENO_FUTURE_CHECK".to_string(), "1".to_string())],
});
itest!(event_listener_error {
@@ -2721,7 +2658,7 @@ itest!(complex_error {
// Regression test for https://github.com/denoland/deno/issues/12143.
itest!(js_root_with_ts_check {
- args: "run --quiet js_root_with_ts_check.js",
+ args: "run --quiet --check js_root_with_ts_check.js",
output: "js_root_with_ts_check.js.out",
exit_code: 1,
});
diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs
index ec2588911..cff0e8f44 100644
--- a/cli/tests/integration/watcher_tests.rs
+++ b/cli/tests/integration/watcher_tests.rs
@@ -666,7 +666,6 @@ fn run_watch_load_unload_events() {
.arg("debug")
.arg(&file_to_watch)
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.spawn()
@@ -725,7 +724,6 @@ fn run_watch_not_exit() {
.arg("debug")
.arg(&file_to_watch)
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.spawn()
@@ -785,7 +783,6 @@ fn run_watch_with_import_map_and_relative_paths() {
.arg(&import_map_path)
.arg(&file_to_watch)
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.spawn()
@@ -1008,7 +1005,6 @@ fn test_watch_module_graph_error_referrer() {
.arg("--unstable")
.arg(&file_to_watch)
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.spawn()
@@ -1066,7 +1062,6 @@ fn run_watch_dynamic_imports() {
.arg("debug")
.arg(&file_to_watch)
.env("NO_COLOR", "1")
- .env("DENO_FUTURE_CHECK", "1")
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.spawn()
diff --git a/cli/tests/testdata/cache/check_local_by_default2.out b/cli/tests/testdata/cache/check_local_by_default2.out
index 1367dc70e..e69de29bb 100644
--- a/cli/tests/testdata/cache/check_local_by_default2.out
+++ b/cli/tests/testdata/cache/check_local_by_default2.out
@@ -1,4 +0,0 @@
-error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'.
-const b: "b" = 12;
- ^
- at [WILDCARD]cache/check_local_by_default2.ts:3:7
diff --git a/cli/tests/testdata/eval/check_local_by_default2.out b/cli/tests/testdata/eval/check_local_by_default2.out
index 072068827..086d4bb34 100644
--- a/cli/tests/testdata/eval/check_local_by_default2.out
+++ b/cli/tests/testdata/eval/check_local_by_default2.out
@@ -1,4 +1,3 @@
-error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'.
-const b: "b" = 12;
- ^
- at [WILDCARD]eval/check_local_by_default2.ts:3:7
+12
+12
+Module {}
diff --git a/cli/tests/testdata/future_check1.out b/cli/tests/testdata/future_check1.out
deleted file mode 100644
index c626a5485..000000000
--- a/cli/tests/testdata/future_check1.out
+++ /dev/null
@@ -1 +0,0 @@
-Check [WILDCARD]/future_check.ts