1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 07:44:48 -05:00

chore: capture stderr in integration tests (#5549)

This commit removes "check_stderr" setting from itest! macro used
to generate integration tests. Without this setting on tests discarded
output of stderr making it very hard to debug the problem in test.

Numerous tests were changed by adding "--quiet" flag to not display
"Compile"/"Download" prompts.
This commit is contained in:
Bartek Iwańczuk 2020-05-17 17:42:39 +02:00 committed by GitHub
parent 63bc468365
commit e16eb9e108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 100 deletions

View file

@ -1,3 +1,4 @@
[WILDCARD]
running 7 tests running 7 tests
test runGranted ... ok [WILDCARD] test runGranted ... ok [WILDCARD]
test readGranted ... ok [WILDCARD] test readGranted ... ok [WILDCARD]

View file

@ -1,3 +1,4 @@
[WILDCARD]
running 4 tests running 4 tests
test fail1 ... FAILED [WILDCARD] test fail1 ... FAILED [WILDCARD]
test fail2 ... FAILED [WILDCARD] test fail2 ... FAILED [WILDCARD]

View file

@ -1,3 +1,4 @@
[WILDCARD]
running 4 tests running 4 tests
test fail1 ... FAILED [WILDCARD] test fail1 ... FAILED [WILDCARD]

View file

@ -0,0 +1 @@
Unstable API '--importmap'. The --unstable flag must be provided.

View file

@ -926,63 +926,63 @@ itest!(_001_hello {
}); });
itest!(_002_hello { itest!(_002_hello {
args: "run --reload 002_hello.ts", args: "run --quiet --reload 002_hello.ts",
output: "002_hello.ts.out", output: "002_hello.ts.out",
}); });
itest!(_003_relative_import { itest!(_003_relative_import {
args: "run --reload 003_relative_import.ts", args: "run --quiet --reload 003_relative_import.ts",
output: "003_relative_import.ts.out", output: "003_relative_import.ts.out",
}); });
itest!(_004_set_timeout { itest!(_004_set_timeout {
args: "run --reload 004_set_timeout.ts", args: "run --quiet --reload 004_set_timeout.ts",
output: "004_set_timeout.ts.out", output: "004_set_timeout.ts.out",
}); });
itest!(_005_more_imports { itest!(_005_more_imports {
args: "run --reload 005_more_imports.ts", args: "run --quiet --reload 005_more_imports.ts",
output: "005_more_imports.ts.out", output: "005_more_imports.ts.out",
}); });
itest!(_006_url_imports { itest!(_006_url_imports {
args: "run --reload 006_url_imports.ts", args: "run --quiet --reload 006_url_imports.ts",
output: "006_url_imports.ts.out", output: "006_url_imports.ts.out",
http_server: true, http_server: true,
}); });
itest!(_012_async { itest!(_012_async {
args: "run --reload 012_async.ts", args: "run --quiet --reload 012_async.ts",
output: "012_async.ts.out", output: "012_async.ts.out",
}); });
itest!(_013_dynamic_import { itest!(_013_dynamic_import {
args: "run --reload --allow-read 013_dynamic_import.ts", args: "run --quiet --reload --allow-read 013_dynamic_import.ts",
output: "013_dynamic_import.ts.out", output: "013_dynamic_import.ts.out",
}); });
itest!(_014_duplicate_import { itest!(_014_duplicate_import {
args: "run --reload --allow-read 014_duplicate_import.ts ", args: "run --quiet --reload --allow-read 014_duplicate_import.ts ",
output: "014_duplicate_import.ts.out", output: "014_duplicate_import.ts.out",
}); });
itest!(_015_duplicate_parallel_import { itest!(_015_duplicate_parallel_import {
args: "run --reload --allow-read 015_duplicate_parallel_import.js", args: "run --quiet --reload --allow-read 015_duplicate_parallel_import.js",
output: "015_duplicate_parallel_import.js.out", output: "015_duplicate_parallel_import.js.out",
}); });
itest!(_016_double_await { itest!(_016_double_await {
args: "run --allow-read --reload 016_double_await.ts", args: "run --quiet --allow-read --reload 016_double_await.ts",
output: "016_double_await.ts.out", output: "016_double_await.ts.out",
}); });
itest!(_017_import_redirect { itest!(_017_import_redirect {
args: "run --reload 017_import_redirect.ts", args: "run --quiet --reload 017_import_redirect.ts",
output: "017_import_redirect.ts.out", output: "017_import_redirect.ts.out",
}); });
itest!(_018_async_catch { itest!(_018_async_catch {
args: "run --reload 018_async_catch.ts", args: "run --quiet --reload 018_async_catch.ts",
output: "018_async_catch.ts.out", output: "018_async_catch.ts.out",
}); });
@ -995,13 +995,12 @@ itest_ignore!(_019_media_types {
itest!(_020_json_modules { itest!(_020_json_modules {
args: "run --reload 020_json_modules.ts", args: "run --reload 020_json_modules.ts",
check_stderr: true,
output: "020_json_modules.ts.out", output: "020_json_modules.ts.out",
exit_code: 1, exit_code: 1,
}); });
itest!(_021_mjs_modules { itest!(_021_mjs_modules {
args: "run --reload 021_mjs_modules.ts", args: "run --quiet --reload 021_mjs_modules.ts",
output: "021_mjs_modules.ts.out", output: "021_mjs_modules.ts.out",
}); });
@ -1025,17 +1024,17 @@ itest_ignore!(_024_import_no_ext_with_headers {
// TODO(lucacasonato): remove --unstable when permissions goes stable // TODO(lucacasonato): remove --unstable when permissions goes stable
itest!(_025_hrtime { itest!(_025_hrtime {
args: "run --allow-hrtime --unstable --reload 025_hrtime.ts", args: "run --quiet --allow-hrtime --unstable --reload 025_hrtime.ts",
output: "025_hrtime.ts.out", output: "025_hrtime.ts.out",
}); });
itest!(_025_reload_js_type_error { itest!(_025_reload_js_type_error {
args: "run --reload 025_reload_js_type_error.js", args: "run --quiet --reload 025_reload_js_type_error.js",
output: "025_reload_js_type_error.js.out", output: "025_reload_js_type_error.js.out",
}); });
itest!(_026_redirect_javascript { itest!(_026_redirect_javascript {
args: "run --reload 026_redirect_javascript.js", args: "run --quiet --reload 026_redirect_javascript.js",
output: "026_redirect_javascript.js.out", output: "026_redirect_javascript.js.out",
http_server: true, http_server: true,
}); });
@ -1088,13 +1087,13 @@ fn compiler_api() {
} }
itest!(_027_redirect_typescript { itest!(_027_redirect_typescript {
args: "run --reload 027_redirect_typescript.ts", args: "run --quiet --reload 027_redirect_typescript.ts",
output: "027_redirect_typescript.ts.out", output: "027_redirect_typescript.ts.out",
http_server: true, http_server: true,
}); });
itest!(_028_args { itest!(_028_args {
args: "run --reload 028_args.ts --arg1 val1 --arg2=val2 -- arg3 arg4", args: "run --quiet --reload 028_args.ts --arg1 val1 --arg2=val2 -- arg3 arg4",
output: "028_args.ts.out", output: "028_args.ts.out",
}); });
@ -1105,25 +1104,25 @@ itest!(_029_eval {
// Ugly parentheses due to whitespace delimiting problem. // Ugly parentheses due to whitespace delimiting problem.
itest!(_030_eval_ts { itest!(_030_eval_ts {
args: "eval -T console.log((123)as(number))", // 'as' is a TS keyword only args: "eval --quiet -T console.log((123)as(number))", // 'as' is a TS keyword only
output: "030_eval_ts.out", output: "030_eval_ts.out",
}); });
itest!(_033_import_map { itest!(_033_import_map {
args: args:
"run --reload --importmap=importmaps/import_map.json --unstable importmaps/test.ts", "run --quiet --reload --importmap=importmaps/import_map.json --unstable importmaps/test.ts",
output: "033_import_map.out", output: "033_import_map.out",
}); });
itest!(import_map_no_unstable { itest!(import_map_no_unstable {
args: args:
"run --reload --importmap=importmaps/import_map.json importmaps/test.ts", "run --quiet --reload --importmap=importmaps/import_map.json importmaps/test.ts",
output: "import_map_no_unstable.out", output: "import_map_no_unstable.out",
exit_code: 70, exit_code: 70,
}); });
itest!(_034_onload { itest!(_034_onload {
args: "run --reload 034_onload/main.ts", args: "run --quiet --reload 034_onload/main.ts",
output: "034_onload.out", output: "034_onload.out",
}); });
@ -1133,19 +1132,17 @@ itest_ignore!(_035_cached_only_flag {
"--reload --cached-only http://127.0.0.1:4545/cli/tests/019_media_types.ts", "--reload --cached-only http://127.0.0.1:4545/cli/tests/019_media_types.ts",
output: "035_cached_only_flag.out", output: "035_cached_only_flag.out",
exit_code: 1, exit_code: 1,
check_stderr: true,
http_server: true, http_server: true,
}); });
itest!(_036_import_map_fetch { itest!(_036_import_map_fetch {
args: args:
"cache --reload --importmap=importmaps/import_map.json --unstable importmaps/test.ts", "cache --quiet --reload --importmap=importmaps/import_map.json --unstable importmaps/test.ts",
output: "036_import_map_fetch.out", output: "036_import_map_fetch.out",
}); });
itest!(_037_fetch_multiple { itest!(_037_fetch_multiple {
args: "cache --reload fetch/test.ts fetch/other.ts", args: "cache --reload fetch/test.ts fetch/other.ts",
check_stderr: true,
http_server: true, http_server: true,
output: "037_fetch_multiple.out", output: "037_fetch_multiple.out",
}); });
@ -1153,7 +1150,6 @@ itest!(_037_fetch_multiple {
itest!(_038_checkjs { itest!(_038_checkjs {
// checking if JS file is run through TS compiler // checking if JS file is run through TS compiler
args: "run --reload --config 038_checkjs.tsconfig.json 038_checkjs.js", args: "run --reload --config 038_checkjs.tsconfig.json 038_checkjs.js",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "038_checkjs.js.out", output: "038_checkjs.js.out",
}); });
@ -1169,14 +1165,13 @@ itest!(_041_info_flag {
}); });
itest!(_042_dyn_import_evalcontext { itest!(_042_dyn_import_evalcontext {
args: "run --allow-read --reload 042_dyn_import_evalcontext.ts", args: "run --quiet --allow-read --reload 042_dyn_import_evalcontext.ts",
output: "042_dyn_import_evalcontext.ts.out", output: "042_dyn_import_evalcontext.ts.out",
}); });
itest!(_044_bad_resource { itest!(_044_bad_resource {
args: "run --reload --allow-read 044_bad_resource.ts", args: "run --quiet --reload --allow-read 044_bad_resource.ts",
output: "044_bad_resource.ts.out", output: "044_bad_resource.ts.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
@ -1187,12 +1182,12 @@ itest_ignore!(_045_proxy {
}); });
itest!(_046_tsx { itest!(_046_tsx {
args: "run --reload 046_jsx_test.tsx", args: "run --quiet --reload 046_jsx_test.tsx",
output: "046_jsx_test.tsx.out", output: "046_jsx_test.tsx.out",
}); });
itest!(_047_jsx { itest!(_047_jsx {
args: "run --reload 047_jsx_test.jsx", args: "run --quiet --reload 047_jsx_test.jsx",
output: "047_jsx_test.jsx.out", output: "047_jsx_test.jsx.out",
}); });
@ -1216,19 +1211,18 @@ itest_ignore!(_052_no_remote_flag {
"--reload --no-remote http://127.0.0.1:4545/cli/tests/019_media_types.ts", "--reload --no-remote http://127.0.0.1:4545/cli/tests/019_media_types.ts",
output: "052_no_remote_flag.out", output: "052_no_remote_flag.out",
exit_code: 1, exit_code: 1,
check_stderr: true,
http_server: true, http_server: true,
}); });
itest!(_054_info_local_imports { itest!(_054_info_local_imports {
args: "info 005_more_imports.ts", args: "info --quiet 005_more_imports.ts",
output: "054_info_local_imports.out", output: "054_info_local_imports.out",
exit_code: 0, exit_code: 0,
}); });
itest!(_056_make_temp_file_write_perm { itest!(_056_make_temp_file_write_perm {
args: args:
"run --allow-read --allow-write=./subdir/ 056_make_temp_file_write_perm.ts", "run --quiet --allow-read --allow-write=./subdir/ 056_make_temp_file_write_perm.ts",
output: "056_make_temp_file_write_perm.out", output: "056_make_temp_file_write_perm.out",
}); });
@ -1239,19 +1233,19 @@ itest!(_057_revoke_permissions {
}); });
itest!(_058_tasks_microtasks_close { itest!(_058_tasks_microtasks_close {
args: "run 058_tasks_microtasks_close.ts", args: "run --quiet 058_tasks_microtasks_close.ts",
output: "058_tasks_microtasks_close.ts.out", output: "058_tasks_microtasks_close.ts.out",
}); });
itest!(js_import_detect { itest!(js_import_detect {
args: "run --reload js_import_detect.ts", args: "run --quiet --reload js_import_detect.ts",
output: "js_import_detect.ts.out", output: "js_import_detect.ts.out",
exit_code: 0, exit_code: 0,
}); });
itest!(lock_write_fetch { itest!(lock_write_fetch {
args: args:
"run --allow-read --allow-write --allow-env --allow-run lock_write_fetch.ts", "run --quiet --allow-read --allow-write --allow-env --allow-run lock_write_fetch.ts",
output: "lock_write_fetch.ts.out", output: "lock_write_fetch.ts.out",
exit_code: 0, exit_code: 0,
}); });
@ -1272,7 +1266,6 @@ itest_ignore!(lock_check_ok2 {
itest!(lock_check_err { itest!(lock_check_err {
args: "run --lock=lock_check_err.json http://127.0.0.1:4545/cli/tests/003_relative_import.ts", args: "run --lock=lock_check_err.json http://127.0.0.1:4545/cli/tests/003_relative_import.ts",
output: "lock_check_err.out", output: "lock_check_err.out",
check_stderr: true,
exit_code: 10, exit_code: 10,
http_server: true, http_server: true,
}); });
@ -1281,7 +1274,6 @@ itest!(lock_check_err {
itest_ignore!(lock_check_err2 { itest_ignore!(lock_check_err2 {
args: "run --lock=lock_check_err2.json 019_media_types.ts", args: "run --lock=lock_check_err2.json 019_media_types.ts",
output: "lock_check_err2.out", output: "lock_check_err2.out",
check_stderr: true,
exit_code: 10, exit_code: 10,
http_server: true, http_server: true,
}); });
@ -1289,7 +1281,6 @@ itest_ignore!(lock_check_err2 {
itest!(async_error { itest!(async_error {
exit_code: 1, exit_code: 1,
args: "run --reload async_error.ts", args: "run --reload async_error.ts",
check_stderr: true,
output: "async_error.ts.out", output: "async_error.ts.out",
}); });
@ -1323,28 +1314,24 @@ itest!(circular1 {
itest!(config { itest!(config {
args: "run --reload --config config.tsconfig.json config.ts", args: "run --reload --config config.tsconfig.json config.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "config.ts.out", output: "config.ts.out",
}); });
itest!(error_001 { itest!(error_001 {
args: "run --reload error_001.ts", args: "run --reload error_001.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_001.ts.out", output: "error_001.ts.out",
}); });
itest!(error_002 { itest!(error_002 {
args: "run --reload error_002.ts", args: "run --reload error_002.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_002.ts.out", output: "error_002.ts.out",
}); });
itest!(error_003_typescript { itest!(error_003_typescript {
args: "run --reload error_003_typescript.ts", args: "run --reload error_003_typescript.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_003_typescript.ts.out", output: "error_003_typescript.ts.out",
}); });
@ -1355,63 +1342,54 @@ itest!(error_003_typescript {
// https://github.com/denoland/deno/issues/2436 // https://github.com/denoland/deno/issues/2436
itest!(error_003_typescript2 { itest!(error_003_typescript2 {
args: "run error_003_typescript.ts", args: "run error_003_typescript.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_003_typescript.ts.out", output: "error_003_typescript.ts.out",
}); });
itest!(error_004_missing_module { itest!(error_004_missing_module {
args: "run --reload error_004_missing_module.ts", args: "run --reload error_004_missing_module.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_004_missing_module.ts.out", output: "error_004_missing_module.ts.out",
}); });
itest!(error_005_missing_dynamic_import { itest!(error_005_missing_dynamic_import {
args: "run --reload error_005_missing_dynamic_import.ts", args: "run --reload error_005_missing_dynamic_import.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_005_missing_dynamic_import.ts.out", output: "error_005_missing_dynamic_import.ts.out",
}); });
itest!(error_006_import_ext_failure { itest!(error_006_import_ext_failure {
args: "run --reload error_006_import_ext_failure.ts", args: "run --reload error_006_import_ext_failure.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_006_import_ext_failure.ts.out", output: "error_006_import_ext_failure.ts.out",
}); });
itest!(error_007_any { itest!(error_007_any {
args: "run --reload error_007_any.ts", args: "run --reload error_007_any.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_007_any.ts.out", output: "error_007_any.ts.out",
}); });
itest!(error_008_checkjs { itest!(error_008_checkjs {
args: "run --reload error_008_checkjs.js", args: "run --reload error_008_checkjs.js",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_008_checkjs.js.out", output: "error_008_checkjs.js.out",
}); });
itest!(error_011_bad_module_specifier { itest!(error_011_bad_module_specifier {
args: "run --reload error_011_bad_module_specifier.ts", args: "run --reload error_011_bad_module_specifier.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_011_bad_module_specifier.ts.out", output: "error_011_bad_module_specifier.ts.out",
}); });
itest!(error_012_bad_dynamic_import_specifier { itest!(error_012_bad_dynamic_import_specifier {
args: "run --reload error_012_bad_dynamic_import_specifier.ts", args: "run --reload error_012_bad_dynamic_import_specifier.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_012_bad_dynamic_import_specifier.ts.out", output: "error_012_bad_dynamic_import_specifier.ts.out",
}); });
itest!(error_013_missing_script { itest!(error_013_missing_script {
args: "run --reload missing_file_name", args: "run --reload missing_file_name",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_013_missing_script.out", output: "error_013_missing_script.out",
}); });
@ -1424,7 +1402,6 @@ itest!(error_014_catch_dynamic_import_error {
itest!(error_015_dynamic_import_permissions { itest!(error_015_dynamic_import_permissions {
args: "run --reload error_015_dynamic_import_permissions.js", args: "run --reload error_015_dynamic_import_permissions.js",
output: "error_015_dynamic_import_permissions.out", output: "error_015_dynamic_import_permissions.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
http_server: true, http_server: true,
}); });
@ -1433,7 +1410,6 @@ itest!(error_015_dynamic_import_permissions {
itest!(error_016_dynamic_import_permissions2 { itest!(error_016_dynamic_import_permissions2 {
args: "run --reload --allow-net error_016_dynamic_import_permissions2.js", args: "run --reload --allow-net error_016_dynamic_import_permissions2.js",
output: "error_016_dynamic_import_permissions2.out", output: "error_016_dynamic_import_permissions2.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
http_server: true, http_server: true,
}); });
@ -1441,90 +1417,77 @@ itest!(error_016_dynamic_import_permissions2 {
itest!(error_017_hide_long_source_ts { itest!(error_017_hide_long_source_ts {
args: "run --reload error_017_hide_long_source_ts.ts", args: "run --reload error_017_hide_long_source_ts.ts",
output: "error_017_hide_long_source_ts.ts.out", output: "error_017_hide_long_source_ts.ts.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_018_hide_long_source_js { itest!(error_018_hide_long_source_js {
args: "run error_018_hide_long_source_js.js", args: "run error_018_hide_long_source_js.js",
output: "error_018_hide_long_source_js.js.out", output: "error_018_hide_long_source_js.js.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_019_stack_function { itest!(error_019_stack_function {
args: "run error_019_stack_function.ts", args: "run error_019_stack_function.ts",
output: "error_019_stack_function.ts.out", output: "error_019_stack_function.ts.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_020_stack_constructor { itest!(error_020_stack_constructor {
args: "run error_020_stack_constructor.ts", args: "run error_020_stack_constructor.ts",
output: "error_020_stack_constructor.ts.out", output: "error_020_stack_constructor.ts.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_021_stack_method { itest!(error_021_stack_method {
args: "run error_021_stack_method.ts", args: "run error_021_stack_method.ts",
output: "error_021_stack_method.ts.out", output: "error_021_stack_method.ts.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_022_stack_custom_error { itest!(error_022_stack_custom_error {
args: "run error_022_stack_custom_error.ts", args: "run error_022_stack_custom_error.ts",
output: "error_022_stack_custom_error.ts.out", output: "error_022_stack_custom_error.ts.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_023_stack_async { itest!(error_023_stack_async {
args: "run error_023_stack_async.ts", args: "run error_023_stack_async.ts",
output: "error_023_stack_async.ts.out", output: "error_023_stack_async.ts.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_024_stack_promise_all { itest!(error_024_stack_promise_all {
args: "run error_024_stack_promise_all.ts", args: "run error_024_stack_promise_all.ts",
output: "error_024_stack_promise_all.ts.out", output: "error_024_stack_promise_all.ts.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_025_tab_indent { itest!(error_025_tab_indent {
args: "run error_025_tab_indent", args: "run error_025_tab_indent",
output: "error_025_tab_indent.out", output: "error_025_tab_indent.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(error_syntax { itest!(error_syntax {
args: "run --reload error_syntax.js", args: "run --reload error_syntax.js",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_syntax.js.out", output: "error_syntax.js.out",
}); });
itest!(error_syntax_empty_trailing_line { itest!(error_syntax_empty_trailing_line {
args: "run --reload error_syntax_empty_trailing_line.mjs", args: "run --reload error_syntax_empty_trailing_line.mjs",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_syntax_empty_trailing_line.mjs.out", output: "error_syntax_empty_trailing_line.mjs.out",
}); });
itest!(error_type_definitions { itest!(error_type_definitions {
args: "run --reload error_type_definitions.ts", args: "run --reload error_type_definitions.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "error_type_definitions.ts.out", output: "error_type_definitions.ts.out",
}); });
itest!(error_local_static_import_from_remote_ts { itest!(error_local_static_import_from_remote_ts {
args: "run --reload http://localhost:4545/cli/tests/error_local_static_import_from_remote.ts", args: "run --reload http://localhost:4545/cli/tests/error_local_static_import_from_remote.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
http_server: true, http_server: true,
output: "error_local_static_import_from_remote.ts.out", output: "error_local_static_import_from_remote.ts.out",
@ -1532,7 +1495,6 @@ itest!(error_local_static_import_from_remote_ts {
itest!(error_local_static_import_from_remote_js { itest!(error_local_static_import_from_remote_js {
args: "run --reload http://localhost:4545/cli/tests/error_local_static_import_from_remote.js", args: "run --reload http://localhost:4545/cli/tests/error_local_static_import_from_remote.js",
check_stderr: true,
exit_code: 1, exit_code: 1,
http_server: true, http_server: true,
output: "error_local_static_import_from_remote.js.out", output: "error_local_static_import_from_remote.js.out",
@ -1540,32 +1502,32 @@ itest!(error_local_static_import_from_remote_js {
itest!(exit_error42 { itest!(exit_error42 {
exit_code: 42, exit_code: 42,
args: "run --reload exit_error42.ts", args: "run --quiet --reload exit_error42.ts",
output: "exit_error42.ts.out", output: "exit_error42.ts.out",
}); });
itest!(https_import { itest!(https_import {
args: "run --reload https_import.ts", args: "run --quiet --reload https_import.ts",
output: "https_import.ts.out", output: "https_import.ts.out",
}); });
itest!(if_main { itest!(if_main {
args: "run --reload if_main.ts", args: "run --quiet --reload if_main.ts",
output: "if_main.ts.out", output: "if_main.ts.out",
}); });
itest!(import_meta { itest!(import_meta {
args: "run --reload import_meta.ts", args: "run --quiet --reload import_meta.ts",
output: "import_meta.ts.out", output: "import_meta.ts.out",
}); });
itest!(lib_ref { itest!(lib_ref {
args: "run --unstable --reload lib_ref.ts", args: "run --quiet --unstable --reload lib_ref.ts",
output: "lib_ref.ts.out", output: "lib_ref.ts.out",
}); });
itest!(lib_runtime_api { itest!(lib_runtime_api {
args: "run --unstable --reload lib_runtime_api.ts", args: "run --quiet --unstable --reload lib_runtime_api.ts",
output: "lib_runtime_api.ts.out", output: "lib_runtime_api.ts.out",
}); });
@ -1593,7 +1555,6 @@ itest!(type_directives_02 {
itest!(type_directives_js_main { itest!(type_directives_js_main {
args: "run --reload -L debug type_directives_js_main.js", args: "run --reload -L debug type_directives_js_main.js",
output: "type_directives_js_main.js.out", output: "type_directives_js_main.js.out",
check_stderr: true,
exit_code: 0, exit_code: 0,
}); });
@ -1604,12 +1565,11 @@ itest!(types {
itest!(unbuffered_stderr { itest!(unbuffered_stderr {
args: "run --reload unbuffered_stderr.ts", args: "run --reload unbuffered_stderr.ts",
check_stderr: true,
output: "unbuffered_stderr.ts.out", output: "unbuffered_stderr.ts.out",
}); });
itest!(unbuffered_stdout { itest!(unbuffered_stdout {
args: "run --reload unbuffered_stdout.ts", args: "run --quiet --reload unbuffered_stdout.ts",
output: "unbuffered_stdout.ts.out", output: "unbuffered_stdout.ts.out",
}); });
@ -1633,12 +1593,11 @@ itest!(run_v8_help {
itest!(unsupported_dynamic_import_scheme { itest!(unsupported_dynamic_import_scheme {
args: "eval import('xxx:')", args: "eval import('xxx:')",
output: "unsupported_dynamic_import_scheme.out", output: "unsupported_dynamic_import_scheme.out",
check_stderr: true,
exit_code: 1, exit_code: 1,
}); });
itest!(wasm { itest!(wasm {
args: "run wasm.ts", args: "run --quiet wasm.ts",
output: "wasm.ts.out", output: "wasm.ts.out",
}); });
@ -1653,29 +1612,28 @@ itest!(top_level_await {
}); });
itest!(top_level_await_ts { itest!(top_level_await_ts {
args: "run --allow-read top_level_await.ts", args: "run --quiet --allow-read top_level_await.ts",
output: "top_level_await.out", output: "top_level_await.out",
}); });
itest!(top_level_for_await { itest!(top_level_for_await {
args: "run top_level_for_await.js", args: "run --quiet top_level_for_await.js",
output: "top_level_for_await.out", output: "top_level_for_await.out",
}); });
itest!(top_level_for_await_ts { itest!(top_level_for_await_ts {
args: "run top_level_for_await.ts", args: "run --quiet top_level_for_await.ts",
output: "top_level_for_await.out", output: "top_level_for_await.out",
}); });
itest!(unstable_disabled { itest!(unstable_disabled {
args: "run --reload unstable.ts", args: "run --reload unstable.ts",
check_stderr: true,
exit_code: 1, exit_code: 1,
output: "unstable_disabled.out", output: "unstable_disabled.out",
}); });
itest!(unstable_enabled { itest!(unstable_enabled {
args: "run --reload --unstable unstable.ts", args: "run --quiet --reload --unstable unstable.ts",
output: "unstable_enabled.out", output: "unstable_enabled.out",
}); });
@ -1685,24 +1643,25 @@ itest!(unstable_disabled_js {
}); });
itest!(unstable_enabled_js { itest!(unstable_enabled_js {
args: "run --reload --unstable unstable.ts", args: "run --quiet --reload --unstable unstable.ts",
output: "unstable_enabled_js.out", output: "unstable_enabled_js.out",
}); });
itest!(_053_import_compression { itest!(_053_import_compression {
args: "run --reload --allow-net 053_import_compression/main.ts", args: "run --quiet --reload --allow-net 053_import_compression/main.ts",
output: "053_import_compression.out", output: "053_import_compression.out",
http_server: true, http_server: true,
}); });
itest!(cafile_url_imports { itest!(cafile_url_imports {
args: "run --reload --cert tls/RootCA.pem cafile_url_imports.ts", args: "run --quiet --reload --cert tls/RootCA.pem cafile_url_imports.ts",
output: "cafile_url_imports.ts.out", output: "cafile_url_imports.ts.out",
http_server: true, http_server: true,
}); });
itest!(cafile_ts_fetch { itest!(cafile_ts_fetch {
args: "run --reload --allow-net --cert tls/RootCA.pem cafile_ts_fetch.ts", args:
"run --quiet --reload --allow-net --cert tls/RootCA.pem cafile_ts_fetch.ts",
output: "cafile_ts_fetch.ts.out", output: "cafile_ts_fetch.ts.out",
http_server: true, http_server: true,
}); });
@ -1721,12 +1680,12 @@ itest_ignore!(cafile_info {
}); });
itest!(fix_js_import_js { itest!(fix_js_import_js {
args: "run --reload fix_js_import_js.ts", args: "run --quiet --reload fix_js_import_js.ts",
output: "fix_js_import_js.ts.out", output: "fix_js_import_js.ts.out",
}); });
itest!(fix_js_imports { itest!(fix_js_imports {
args: "run --reload fix_js_imports.ts", args: "run --quiet --reload fix_js_imports.ts",
output: "fix_js_imports.ts.out", output: "fix_js_imports.ts.out",
}); });
@ -2695,7 +2654,6 @@ mod util {
pub input: Option<&'static str>, pub input: Option<&'static str>,
pub output_str: Option<&'static str>, pub output_str: Option<&'static str>,
pub exit_code: i32, pub exit_code: i32,
pub check_stderr: bool,
pub http_server: bool, pub http_server: bool,
} }
@ -2719,13 +2677,8 @@ mod util {
command.args(args); command.args(args);
command.current_dir(&tests_dir); command.current_dir(&tests_dir);
command.stdin(Stdio::piped()); command.stdin(Stdio::piped());
command.stderr(Stdio::null());
if self.check_stderr {
let writer_clone = writer.try_clone().unwrap(); let writer_clone = writer.try_clone().unwrap();
command.stderr(writer_clone); command.stderr(writer_clone);
}
command.stdout(writer); command.stdout(writer);
let mut process = command.spawn().expect("failed to execute process"); let mut process = command.spawn().expect("failed to execute process");