(&self)
| 3526 | /// Return run snapshots recorded by this session. |
| 3527 | #[napi] |
| 3528 | pub async fn runs(&self) -> napi::Result<serde_json::Value> { |
| 3529 | let session = self.inner.clone(); |
| 3530 | let runs = get_runtime() |
| 3531 | .spawn(async move { session.runs().await }) |
| 3532 | .await |
| 3533 | .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))?; |
| 3534 | serde_json::to_value(runs) |
| 3535 | .map_err(|e| napi::Error::from_reason(format!("Serialization error: {e}"))) |
| 3536 | } |
| 3537 | |
| 3538 | /// Return a run snapshot by ID, or null when it is unknown. |
| 3539 | #[napi(js_name = "runSnapshot")] |
no test coverage detected