diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-03-25 19:32:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 21:32:11 +0200 |
commit | 8a4865c3790a6eb93d95189e129b3ee98f349b45 (patch) | |
tree | eb7a7f7a32addcfb49e5814d509c244532e38c2f /cli/tests/integration/test_tests.rs | |
parent | fe88b53e50034e185246e03be586c470ca4fbf78 (diff) |
feat(test): print pending tests on sigint (#18246)
Diffstat (limited to 'cli/tests/integration/test_tests.rs')
-rw-r--r-- | cli/tests/integration/test_tests.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs index 047dcbc7e..107d137e7 100644 --- a/cli/tests/integration/test_tests.rs +++ b/cli/tests/integration/test_tests.rs @@ -4,6 +4,7 @@ use deno_core::url::Url; use test_util as util; use util::assert_contains; use util::env_vars_for_npm_tests; +use util::wildcard_match; use util::TestContext; #[test] @@ -444,6 +445,26 @@ itest!(parallel_output { exit_code: 1, }); +#[test] +fn sigint_with_hanging_test() { + util::with_pty( + &[ + "test", + "--quiet", + "--no-check", + "test/sigint_with_hanging_test.ts", + ], + |mut console| { + std::thread::sleep(std::time::Duration::from_secs(1)); + console.write_line("\x03"); + wildcard_match( + include_str!("../testdata/test/sigint_with_hanging_test.out"), + &console.read_all_output(), + ); + }, + ); +} + itest!(package_json_basic { args: "test", output: "package_json/basic/lib.test.out", |