pub struct TestArgs {Show 13 fields
pub input: PathBuf,
pub output: Option<PathBuf>,
pub no_run: bool,
pub format: TestFormat,
pub inspect: bool,
pub seed: Option<String>,
pub case: Vec<String>,
pub suite: Vec<String>,
pub partial_selection: bool,
pub coverage: bool,
pub against: Option<String>,
pub skip_unsupported: bool,
pub settle: Option<String>,
}Expand description
The test subcommand’s flags — the one contract bynkc test and bynk test both #[command(flatten)] (review findings #40/#72/#20/#21
remainder), replacing four independent hand-spellings (bynkc::cli,
bynk::cli, bynk::test::TestArgs, and the argv-literal rebuild that
turned the latter back into flags for the bynkc shell-out) with one.
Field docs here are the CLI help text for both commands’ flags.
Fields§
§input: PathBufInput project root directory. Defaults to the current directory.
output: Option<PathBuf>Where to write compiled TypeScript test runner modules.
Defaults to <input>/out.
no_run: boolSkip the runner invocation. With --format rich this emits the
generated test files (for CI flows that drive the runner separately);
with --format json it emits a discovery document listing every
suite and case (each outcome: "discovered") without running them —
a pure compile, no tsc/Node.
format: TestFormatOutput format. rich (default) is the grouped ✓ / ✗ human output;
json is a single pinned JSON document of results, for tooling;
ndjson is the same results as one JSON event per line, written as
each suite finishes. ndjson cannot be combined with --coverage or
--no-run.
inspect: boolCompile a debug build and launch the test runner under Node’s
inspector (node --inspect-brk), printing the inspector URL for a
JavaScript debugger to attach. The emitted .ts runs directly under
Node’s line-preserving type-stripping, so source maps resolve
breakpoints back to .bynk. Requires Node ≥ 22.18 (or ≥ 23.6
unflagged). Does not run tsc.
seed: Option<String>The root seed for generative property tests, as hex (e.g. 0x5f3a).
A failing property prints the seed it used; re-running with --seed <hex> reproduces that run byte-for-byte. Omitted, each run draws a
fresh random seed.
case: Vec<String>Run only the test cases named <name>, skipping the rest — the filter
behind the editor’s per-case ▷ Run Test lens. Matches by exact case
name across suites. Repeat the flag to run several cases in one
process; values of the same flag combine as “or”, and with --suite
as “and”. A name that selects no case fails the run. Omitted, every
case runs. No effect with --no-run (discovery lists all cases
regardless).
suite: Vec<String>Run only the cases of the suite named <name>, as the JSON document
reports it (suites[].name, without an integration suite’s prefix);
any suite kind matches. Repeat the flag to select several suites. A
suite that is not selected is left out of the output entirely. A name
that selects no suite fails the run. No effect with --no-run.
partial_selection: boolFor a caller that runs one selection as several processes (bynk test
across a workspace’s members, --against dev across env groups): this
run sees only part of the --case/--suite selection, so a value it
selects nothing for is not an error here. The caller judges the values.
coverage: boolAfter the suite runs, report statement/line coverage attributed to
.bynk source (a rich summary table, or a coverage block in
--format json). Requires the tsc → node path: incompatible with
--inspect and --no-run, and errors if only tsx is available.
against: Option<String>Run the system suites against a real runtime instead of in process:
dev, a local bynk dev the runner starts itself (through bynk test only), or a target named under [test.targets] in bynk.toml.
A bare URL is refused, and so is a target marked production = true.
A named target’s secrets are read from the environment. Only the
system suites run, and a case that uses what a real runtime can’t
honour (an on call address, advance Clock, a cron or queue address,
an asset fetch) is refused unless --skip-unsupported is passed.
skip_unsupported: boolWith --against, skip each system case a real runtime can’t
honour, naming it and why, instead of refusing the run.
settle: Option<String>With --against, how long a failing expect is retried before it
fails, for each retried stretch: the addresses since the last unsafe one (anything but GET,
HEAD or OPTIONS) are re-run before each retry, so a real system’s
latency doesn’t fail a case. A duration such as 5s, 500ms or 0
(no retry).
Trait Implementations§
Source§impl Args for TestArgs
impl Args for TestArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for TestArgs
impl FromArgMatches for TestArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for TestArgs
impl RefUnwindSafe for TestArgs
impl Send for TestArgs
impl Sync for TestArgs
impl Unpin for TestArgs
impl UnsafeUnpin for TestArgs
impl UnwindSafe for TestArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);