zuke.tools.jest
@zuke/jest 1.1.0: @zuke/jest — typed jest task wrappers for Zuke builds.
zuke on PyPI ↗ 2 symbols
Symbols
class JestSettings(ToolSettings) Settings for a jest run.
-
paths(*values: str) -> SelfRegex patterns matched against test paths (positional); repeatable.
-
config(path: str) -> SelfUse an explicit config file (
-c/--config). -
coverage() -> SelfCollect test coverage (
--coverage). -
watch() -> SelfWatch files related to changed files (
--watch). -
watch_all() -> SelfWatch all files (
--watchAll). -
ci() -> SelfRun in CI mode, failing on new snapshots (
--ci). -
run_in_band() -> SelfRun all tests serially in the current process (
-i/--runInBand). -
max_workers(value: str | float) -> SelfLimit worker count, e.g.
2or50%(--maxWorkers). -
update_snapshot() -> SelfRe-record snapshots (
-u/--updateSnapshot). -
bail(suites: float | None=None) -> SelfStop after N failing test suites (
--bail). -
verbose() -> SelfReport each individual test (
--verbose). -
silent() -> SelfPrevent tests from printing to the console (
--silent). -
test_name_pattern(pattern: str) -> SelfRun only tests whose name matches the pattern (
-t/--testNamePattern). -
only_changed() -> SelfRun only tests affected by changed files (
-o/--onlyChanged). -
pass_with_no_tests() -> SelfPass when no tests are found (
--passWithNoTests). -
detect_open_handles() -> SelfDetect handles keeping the process open (
--detectOpenHandles). -
select_projects(*names: str) -> SelfRestrict to named projects (
--selectProjects); repeatable. -
reporters(*names: str) -> SelfUse the named reporters (
--reporters); repeatable.
class JestTasks Typed task functions for the jest test runner.
-
static async run(ctx: ServiceContext, configure: Callable[[JestSettings], JestSettings] | None=None) -> ExecResultRun tests with
jest.