Header menu logo testify

TestifyExpecto Module

Functions and values

Function or value Description

TestifyExpecto.runTestsInAssemblyWithCLIArgs config args

Full Usage: TestifyExpecto.runTestsInAssemblyWithCLIArgs config args

Parameters:
    config : TestifyExpectoConfig - The integration configuration controlling rendering and execution behavior.
    args : string array - The CLI arguments passed to the Expecto runner.

Returns: int The resulting process exit code.

Discovers tests from the current assembly and runs them through the Testify-aware Expecto runner.

config : TestifyExpectoConfig

The integration configuration controlling rendering and execution behavior.

args : string array

The CLI arguments passed to the Expecto runner.

Returns: int

The resulting process exit code.

TestifyExpecto.runTestsWithCLIArgs config args tests

Full Usage: TestifyExpecto.runTestsWithCLIArgs config args tests

Parameters:
    config : TestifyExpectoConfig - The integration configuration controlling rendering and execution behavior.
    args : string array - The CLI arguments passed to the Expecto runner.
    tests : Test - The Expecto test tree to execute.

Returns: int The resulting process exit code, with Testify failures forcing a non-zero result.

Runs an explicit Expecto test tree with Testify-aware result recording and CLI argument handling.

config : TestifyExpectoConfig

The integration configuration controlling rendering and execution behavior.

args : string array

The CLI arguments passed to the Expecto runner.

tests : Test

The Expecto test tree to execute.

Returns: int

The resulting process exit code, with Testify failures forcing a non-zero result.

TestifyExpecto.testCase name code

Full Usage: TestifyExpecto.testCase name code

Parameters:
    name : string - The Expecto test name.
    code : unit -> unit - The synchronous test body.

Returns: Test An Expecto Test node that records Testify failures in the current run context.

Creates one synchronous Expecto test case that records Testify output.

name : string

The Expecto test name.

code : unit -> unit

The synchronous test body.

Returns: Test

An Expecto Test node that records Testify failures in the current run context.

Example

 let tests =
     TestifyExpecto.testCase "reverse is involutive" (fun () ->
         <@ List.rev (List.rev [1; 2; 3]) @>
         |> Assert.should (AssertExpectation.equalTo [1; 2; 3]))
val tests: obj
Multiple items
module List from Microsoft.FSharp.Collections

--------------------
type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T with get member IsEmpty: bool with get member Item: index: int -> 'T with get ...
val rev: list: 'T list -> 'T list

TestifyExpecto.testCaseAsync name code

Full Usage: TestifyExpecto.testCaseAsync name code

Parameters:
    name : string - The Expecto test name.
    code : Async<unit> - The asynchronous test body.

Returns: Test An asynchronous Expecto Test node.

Creates one asynchronous Expecto test case that records Testify output.

name : string

The Expecto test name.

code : Async<unit>

The asynchronous test body.

Returns: Test

An asynchronous Expecto Test node.

TestifyExpecto.testCaseTask name code

Full Usage: TestifyExpecto.testCaseTask name code

Parameters:
    name : string - The Expecto test name.
    code : unit -> Task<unit> - The task-returning test body.

Returns: Test A task-based Expecto Test node.

Creates one task-based Expecto test case that records Testify output.

name : string

The Expecto test name.

code : unit -> Task<unit>

The task-returning test body.

Returns: Test

A task-based Expecto Test node.

TestifyExpecto.testFixture name

Full Usage: TestifyExpecto.testFixture name

Parameters:
    name : string - The displayed group name for the fixture.

Returns: Test An Expecto Test list that runs public parameterless methods marked with TestifyMethodAttribute.

Discovers MSTest-style Testify methods on a fixture type and exposes them as an Expecto test list.

name : string

The displayed group name for the fixture.

Returns: Test

An Expecto Test list that runs public parameterless methods marked with TestifyMethodAttribute.

TestifyExpecto.testList name tests

Full Usage: TestifyExpecto.testList name tests

Parameters:
    name : string - The group label.
    tests : Test list - The child tests that belong to the group.

Returns: Test An Expecto Test list with the supplied label.

Creates an Expecto test list while preserving Testify path metadata.

name : string

The group label.

tests : Test list

The child tests that belong to the group.

Returns: Test

An Expecto Test list with the supplied label.

Type something to start searching.