id = "jest" name = "Jest" description = "A JavaScript testing framework." homepage = "https://jestjs.io" executables = ["jest"] [commands] format = 1 label = "Run tests" description = "Run Jest with common selection, coverage and watch options. Reporters, projects and many advanced flags are left out." quality = "ai-draft" base = "fig:jest" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/jest.ts" license = "MIT" [[commands.field]] id = "patterns" label = "Test path patterns" description = "Regex patterns matched against test file paths." type = "string" position = 0 multiple = true sources = ["src"] [[commands.field]] id = "test_name" label = "Test name pattern" description = "Run only tests whose name matches this regex." type = "string" option = ["--testNamePattern", "-t"] sources = ["src"] [[commands.field]] id = "config" label = "Config file" type = "path" option = ["--config", "-c"] path = { kind = "file", role = "input", must_exist = true } sources = ["src"] [[commands.field]] id = "coverage" label = "Collect coverage" description = "Enable coverage." type = "boolean" option = ["--coverage"] sources = ["src"] [[commands.field]] id = "watch" label = "Watch changed files" description = "Rerun tests related to changed files." type = "boolean" option = ["--watch"] sources = ["src"] [[commands.field]] id = "watch_all" label = "Watch all" description = "Rerun all tests when something changes." type = "boolean" option = ["--watchAll"] sources = ["src"] [[commands.field]] id = "only_changed" label = "Only changed" description = "Run tests based on files changed in the repository." type = "boolean" option = ["--onlyChanged", "-o"] sources = ["src"] [[commands.field]] id = "changed_since" label = "Changed since" description = "Run tests related to changes since this branch or commit." type = "string" option = ["--changedSince"] sources = ["src"] [[commands.field]] id = "run_in_band" label = "Run serially" description = "Run all tests in the current process." type = "boolean" option = ["--runInBand", "-i"] sources = ["src"] [[commands.field]] id = "max_workers" label = "Max workers" description = "Number or percentage of workers." type = "string" option = ["--maxWorkers", "-w"] sources = ["src"] [[commands.field]] id = "update_snapshot" label = "Update snapshots" description = "Re-record every snapshot that fails." type = "boolean" option = ["--updateSnapshot", "-u"] effect = "overwrite" sources = ["src"] [[commands.field]] id = "ci" label = "CI mode" description = "Fail instead of writing new snapshots." type = "boolean" option = ["--ci"] sources = ["src"] [[commands.field]] id = "verbose" label = "Verbose" description = "Display individual test results." type = "boolean" option = ["--verbose"] sources = ["src"] [[commands.field]] id = "silent" label = "Silent" description = "Prevent tests from printing console messages." type = "boolean" option = ["--silent"] sources = ["src"] [[commands.field]] id = "json" label = "JSON output" description = "Print test results as JSON." type = "boolean" option = ["--json"] sources = ["src"] [[commands.field]] id = "pass_no_tests" label = "Pass with no tests" description = "Succeed when no test files are found." type = "boolean" option = ["--passWithNoTests"] sources = ["src"] [[commands.field]] id = "detect_open_handles" label = "Detect open handles" description = "Print open handles preventing a clean exit." type = "boolean" option = ["--detectOpenHandles"] sources = ["src"] [[commands.field]] id = "force_exit" label = "Force exit" description = "Exit after all tests complete." type = "boolean" option = ["--forceExit"] sources = ["src"] [[commands.field]] id = "list_tests" label = "List tests" description = "List the tests Jest would run and exit." type = "boolean" option = ["--listTests"] sources = ["src"] [[commands.field]] id = "test_timeout" label = "Test timeout (ms)" description = "Default timeout of a test in milliseconds." type = "integer" option = ["--testTimeout"] sources = ["src"] [[commands.task]] id = "run" label = "Run tests" fields = ["patterns", "test_name"] required = [] [[commands.task]] id = "coverage" label = "Run with coverage" fields = ["patterns", "coverage"] required = ["coverage"] set = { coverage = [true] } [[commands.task]] id = "watch" label = "Watch mode" fields = ["watch"] required = ["watch"] set = { watch = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["patterns", "test_name", "config", "coverage", "watch", "only_changed", "update_snapshot", "ci"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["watch_all", "changed_since", "run_in_band", "max_workers", "verbose", "silent", "json", "pass_no_tests", "detect_open_handles", "force_exit", "list_tests", "test_timeout"]