1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Test Runner subsystem.
//!
//! Mirrors the worker/drain shape of [`crate::app::git_worker`] and the DAP
//! client in [`crate::dap`]: a background thread spawns the project's test tool
//! (cargo / pytest / vitest / jest / go / codeql — which one a workspace uses is resolved by
//! [`registry`] from `[[test_runners]]` manifest data), streams its output back
//! over an mpsc channel, and the app drains results into the Testing panel each
//! tick. Test-tool output is parsed into [`model::TestCase`]s; the suite tree
//! and the failing-count badge are derived in the UI layer.
/// Status-bar message for a run gesture refused because no enabled runner
/// claims the workspace. One string for both refusal sites: the app's
/// entry-point check and the worker's queued-request refusal.
pub const NO_RUNNER_STATUS: &str =
"No test runner detected in this workspace (is its extension enabled?)";
/// The run pattern for a whole suite. cargo's positional filter and the
/// panel's marking are substring matches, so a bare `parse` would also sweep
/// `parse_utils::b`; anchoring with the `::` separator selects exactly the
/// suite's own cases. One helper so the panel and the worker cannot drift.
/// Escape a string for literal use inside a regex (test titles are arbitrary;
/// an unbalanced bracket would abort the matcher). Shared by the JS runner
/// argv builders and the source locator.
pub