summaryrefslogtreecommitdiff
path: root/cli/ops
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-11-22 13:06:51 +0000
committerGitHub <noreply@github.com>2020-11-22 14:06:51 +0100
commit14877f7fe21573e1ed0ce696a107543bbba995b2 (patch)
treeaf260fdab14b2afac2400341c536ea7d2dca0570 /cli/ops
parent686a17fc075ead774f5b692329d11e72139e3f02 (diff)
feat(unstable): Add deno test --no-run (#8093)
This commit adds new flag to "deno test" subcommand called "--no-run" that allows to preload, cache an type check.
Diffstat (limited to 'cli/ops')
-rw-r--r--cli/ops/worker_host.rs68
1 files changed, 30 insertions, 38 deletions
diff --git a/cli/ops/worker_host.rs b/cli/ops/worker_host.rs
index e4e0d84a4..f2e936ef2 100644
--- a/cli/ops/worker_host.rs
+++ b/cli/ops/worker_host.rs
@@ -294,46 +294,38 @@ fn serialize_worker_event(event: WorkerEvent) -> Value {
match event {
WorkerEvent::Message(buf) => json!({ "type": "msg", "data": buf }),
WorkerEvent::TerminalError(error) => match error.downcast::<JsError>() {
- Ok(js_error) => {
- json!({
- "type": "terminalError",
- "error": {
- "message": js_error.message,
- "fileName": js_error.script_resource_name,
- "lineNumber": js_error.line_number,
- "columnNumber": js_error.start_column,
- }
- })
- }
- Err(error) => {
- json!({
- "type": "terminalError",
- "error": {
- "message": error.to_string(),
- }
- })
- }
+ Ok(js_error) => json!({
+ "type": "terminalError",
+ "error": {
+ "message": js_error.message,
+ "fileName": js_error.script_resource_name,
+ "lineNumber": js_error.line_number,
+ "columnNumber": js_error.start_column,
+ }
+ }),
+ Err(error) => json!({
+ "type": "terminalError",
+ "error": {
+ "message": error.to_string(),
+ }
+ }),
},
WorkerEvent::Error(error) => match error.downcast::<JsError>() {
- Ok(js_error) => {
- json!({
- "type": "error",
- "error": {
- "message": js_error.message,
- "fileName": js_error.script_resource_name,
- "lineNumber": js_error.line_number,
- "columnNumber": js_error.start_column,
- }
- })
- }
- Err(error) => {
- json!({
- "type": "error",
- "error": {
- "message": error.to_string(),
- }
- })
- }
+ Ok(js_error) => json!({
+ "type": "error",
+ "error": {
+ "message": js_error.message,
+ "fileName": js_error.script_resource_name,
+ "lineNumber": js_error.line_number,
+ "columnNumber": js_error.start_column,
+ }
+ }),
+ Err(error) => json!({
+ "type": "error",
+ "error": {
+ "message": error.to_string(),
+ }
+ }),
},
}
}