RunOptions
[<Interface>]
type RunOptions =
abstract member argv: string array option with get, set
abstract member branchCoverage: float option with get, set
abstract member concurrency: U2<float,bool> option with get, set
abstract member coverage: bool option with get, set
abstract member coverageExcludeGlobs: U2<string,string array> option with get, set
abstract member coverageIncludeGlobs: U2<string,string array> option with get, set
abstract member execArgv: string array option with get, set
abstract member files: string array option with get, set
abstract member forceExit: bool option with get, set
abstract member functionCoverage: float option with get, set
abstract member globPatterns: string array option with get, set
abstract member inspectPort: U2<float,(unit -> float)> option with get, set
abstract member isolation: Isolation option with get, set
abstract member lineCoverage: float option with get, set
abstract member only: bool option with get, set
abstract member setup: (TestsStream -> Promise<unit> option) option with get, set
abstract member shard: TestShard option with get, set
abstract member signal: AbortSignal option with get, set
abstract member testNamePatterns: U3<string,U2<string,RegExp> array,RegExp> option with get, set
abstract member testSkipPatterns: U3<string,U2<string,RegExp> array,RegExp> option with get, set
abstract member timeout: float option with get, set
abstract member watch: bool option with get, set
static member Create (?concurrency: U2<float,bool>, ?files: string array, ?forceExit: bool, ?globPatterns: string array, ?inspectPort: U2<float,(unit -> float)>, ?isolation: Isolation, ?only: bool, ?setup: (TestsStream -> Promise<unit> option), ?execArgv: string array, ?argv: string array, ?signal: AbortSignal, ?testNamePatterns: U3<string,U2<string,RegExp> array,RegExp>, ?testSkipPatterns: U3<string,U2<string,RegExp> array,RegExp>, ?timeout: float, ?watch: bool, ?shard: TestShard, ?coverage: bool, ?coverageExcludeGlobs: U2<string,string array>, ?coverageIncludeGlobs: U2<string,string array>, ?lineCoverage: float, ?branchCoverage: float, ?functionCoverage: float) : RunOptions| Assembly | Xantham.Fable.Node |
| Attributes | [<Interface>] |
Declared inside
Isolation |
Properties
abstract member argv: string array option with get, set
abstract member argv: string array option with get, setAn array of CLI flags to pass to each test file when spawning the subprocesses. This option has no effect when isolation is 'none'.
@since v22.10.0
abstract member branchCoverage: float option with get, set
abstract member branchCoverage: float option with get, setRequire a minimum percent of covered branches. If code coverage does not reach the threshold specified, the process will exit with code 1.
@since v22.10.0
abstract member concurrency: U2<float,bool> option with get, set
abstract member concurrency: U2<float,bool> option with get, setIf a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file. If true, it would run os.availableParallelism() - 1 test files in parallel. If false, it would only run one test file at a time.
abstract member coverage: bool option with get, set
abstract member coverage: bool option with get, setenable code coverage collection.
@since v22.10.0
abstract member coverageExcludeGlobs: U2<string,string array> option with get, set
abstract member coverageExcludeGlobs: U2<string,string array> option with get, setExcludes specific files from code coverage using a glob pattern, which can match both absolute and relative file paths. This property is only applicable when coverage was set to true. If both coverageExcludeGlobs and coverageIncludeGlobs are provided, files must meet both criteria to be included in the coverage report.
@since v22.10.0
abstract member coverageIncludeGlobs: U2<string,string array> option with get, set
abstract member coverageIncludeGlobs: U2<string,string array> option with get, setIncludes specific files in code coverage using a glob pattern, which can match both absolute and relative file paths. This property is only applicable when coverage was set to true. If both coverageExcludeGlobs and coverageIncludeGlobs are provided, files must meet both criteria to be included in the coverage report.
@since v22.10.0
abstract member execArgv: string array option with get, set
abstract member execArgv: string array option with get, setAn array of CLI flags to pass to the node executable when spawning the subprocesses. This option has no effect when isolation is 'none'.
@since v22.10.0
abstract member files: string array option with get, set
abstract member files: string array option with get, setAn array containing the list of files to run. Default: Same as running tests from the command line.
abstract member forceExit: bool option with get, set
abstract member forceExit: bool option with get, setConfigures the test runner to exit the process once all known tests have finished executing even if the event loop would otherwise remain active.
abstract member functionCoverage: float option with get, set
abstract member functionCoverage: float option with get, setRequire a minimum percent of covered functions. If code coverage does not reach the threshold specified, the process will exit with code 1.
@since v22.10.0
abstract member globPatterns: string array option with get, set
abstract member globPatterns: string array option with get, setAn array containing the list of glob patterns to match test files. This option cannot be used together with files. Default: Same as running tests from the command line.
@since v22.6.0
abstract member inspectPort: U2<float,(unit -> float)> option with get, set
abstract member inspectPort: U2<float,(unit -> float)> option with get, setSets inspector port of test child process. This can be a number, or a function that takes no arguments and returns a number. If a nullish value is provided, each process gets its own port, incremented from the primary's process.debugPort. This option is ignored if the isolation option is set to 'none' as no child processes are spawned.
abstract member isolation: Isolation option with get, set
abstract member isolation: Isolation option with get, setConfigures the type of test isolation. If set to 'process', each test file is run in a separate child process. If set to 'none', all test files run in the current process.
@since v22.8.0
abstract member lineCoverage: float option with get, set
abstract member lineCoverage: float option with get, setRequire a minimum percent of covered lines. If code coverage does not reach the threshold specified, the process will exit with code 1.
@since v22.10.0
abstract member only: bool option with get, set
abstract member only: bool option with get, setIf truthy, the test context will only run tests that have the only option set
abstract member setup: (TestsStream -> Promise<unit> option) option with get, set
abstract member setup: (TestsStream -> Promise<unit> option) option with get, setA function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
abstract member signal: AbortSignal option with get, set
abstract member signal: AbortSignal option with get, setAllows aborting an in-progress test execution.
abstract member testNamePatterns: U3<string,U2<string,RegExp> array,RegExp> option with get, set
abstract member testNamePatterns: U3<string,U2<string,RegExp> array,RegExp> option with get, setIf provided, only run tests whose name matches the provided pattern. Strings are interpreted as JavaScript regular expressions.
abstract member testSkipPatterns: U3<string,U2<string,RegExp> array,RegExp> option with get, set
abstract member testSkipPatterns: U3<string,U2<string,RegExp> array,RegExp> option with get, setA String, RegExp or a RegExp Array, that can be used to exclude running tests whose name matches the provided pattern. Test name patterns are interpreted as JavaScript regular expressions. For each test that is executed, any corresponding test hooks, such as beforeEach(), are also run.
@since v22.1.0
abstract member timeout: float option with get, set
abstract member timeout: float option with get, setThe number of milliseconds after which the test execution will fail. If unspecified, subtests inherit this value from their parent.
abstract member watch: bool option with get, set
abstract member watch: bool option with get, setWhether to run in watch mode or not.
Methods
static member Create (?concurrency: U2<float,bool>, ?files: string array, ?forceExit: bool, ?globPatterns: string array, ?inspectPort: U2<float,(unit -> float)>, ?isolation: Isolation, ?only: bool, ?setup: (TestsStream -> Promise<unit> option), ?execArgv: string array, ?argv: string array, ?signal: AbortSignal, ?testNamePatterns: U3<string,U2<string,RegExp> array,RegExp>, ?testSkipPatterns: U3<string,U2<string,RegExp> array,RegExp>, ?timeout: float, ?watch: bool, ?shard: TestShard, ?coverage: bool, ?coverageExcludeGlobs: U2<string,string array>, ?coverageIncludeGlobs: U2<string,string array>, ?lineCoverage: float, ?branchCoverage: float, ?functionCoverage: float) : RunOptions