mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
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.
This commit is contained in:
parent
686a17fc07
commit
14877f7fe2
7 changed files with 98 additions and 155 deletions
|
@ -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(),
|
||||
}
|
||||
}),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue