Function test

  • Takes a Test object and returns a promise with a TestResult.

    Example

    test({
    given: "🟢",
    must: "🟩",
    received: "🟩",
    wanted: "🟩",
    }); // Promise<{ given: "🟢", , must: "🟩" }>
    test({
    given: "🟢",
    must: "🟩",
    received: "❌",
    wanted: "🟩",
    }); // Promise<{ differences: [...], given: "🟢", , must: "🟩" }>

    Returns

    A promise with a TestResult object.

    Type Parameters

    • Value

    Parameters

    Returns Promise<TestResult<Value>>