summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-07-27 02:11:38 +0200
committerGitHub <noreply@github.com>2021-07-27 02:11:38 +0200
commitf47c550100a2c5cc2c419548df15948a1be28649 (patch)
treef4be43feba9d6947c8b6ac52973bf8ecd7a38a95
parenta05bb3924a6128cd3f8c41440a617ba6952bcbcb (diff)
test: make integration::workers::workers test inspectable (#11524)
-rw-r--r--cli/tests/integration/worker_tests.rs25
-rw-r--r--cli/tests/workers/test.ts.out3
2 files changed, 8 insertions, 20 deletions
diff --git a/cli/tests/integration/worker_tests.rs b/cli/tests/integration/worker_tests.rs
index 45727813c..2340fa705 100644
--- a/cli/tests/integration/worker_tests.rs
+++ b/cli/tests/integration/worker_tests.rs
@@ -1,27 +1,12 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
use crate::itest;
-use test_util as util;
-#[test]
-fn workers() {
- let _g = util::http_server();
- let status = util::deno_cmd()
- .current_dir(util::tests_path())
- .arg("test")
- .arg("--reload")
- .arg("--location")
- .arg("http://127.0.0.1:4545/cli/tests/")
- .arg("--allow-net")
- .arg("--allow-read")
- .arg("--unstable")
- .arg("workers/test.ts")
- .spawn()
- .unwrap()
- .wait()
- .unwrap();
- assert!(status.success());
-}
+itest!(workers {
+ args: "test --reload --location http://127.0.0.1:4545/cli/tests/ --allow-net --allow-read --unstable workers/test.ts",
+ output: "workers/test.ts.out",
+ http_server: true,
+});
itest!(worker_error {
args: "run -A workers/worker_error.ts",
diff --git a/cli/tests/workers/test.ts.out b/cli/tests/workers/test.ts.out
new file mode 100644
index 000000000..1b4238a9b
--- /dev/null
+++ b/cli/tests/workers/test.ts.out
@@ -0,0 +1,3 @@
+[WILDCARD]
+test result: ok. [WILDCARD] passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms)
+