Skip to content

Overview

Scriptorium.Quill is the test runner for the Scriptorium family.

It provides a DSL for defining sync and async tests, a focus / pending / skip system, per-test configuration, and a pretty-printer that renders results with colour, indentation, and clickable source links in terminal output.

Scriptorium.Quill aims to support all F#/Fable runtimes:

RuntimeSupports
.NET
JavaScript
Python
Rust🚧
Terminal window
dotnet add package Scriptorium.Quill

Scriptorium.Quill depends on Scriptorium.Ink, Scriptorium.Parchment, and Scriptorium.Nib. A single package reference covers the full stack.

  1. Set up your tests

    open Scriptorium.Nib.Assertion
    open type Scriptorium.Quill.Test
    open type Scriptorium.Quill.Runner
    [<EntryPoint>]
    let main _ =
    runTests [
    testList ("My suite", [
    test ("basic equality", fun _ ->
    assertThat 42 (isEqualTo 42)
    )
    testAsync ("async operation", fun _ -> async {
    let! result = computeAsync ()
    assertThat result (isEqualTo 42)
    })
    // ...
    ])
    ]
  2. Use the corresponding command based on your runtime:

    RuntimeCommand
    .NETdotnet run
    JavaScriptdotnet fable --runScript
    Pythondotnet fable --lang py --runScript
  3. You should see an output looking like that

    Example output