Function runAndStringifyTests

  • Run tests in given iterable of urls and test objects and return a string with the results.

    Example

    runAndStringifyTests([
    "file:///tests/example.test.ts",
    {
    given: "🟢",
    must: "🟩",
    received: () => "🟩",
    wanted: () => "🟩",
    },
    ]);
    // [TEST] file:///tests/example.test.ts
    // [PASS] Given 🟢, must 🟩.

    Yields

    Strings to be shown to the consumer.

    Parameters

    • testTuples: AsynchronousIterable<TestTuple<unknown>>

      Iterable of test tuples.

    Returns AsyncGenerator<string, void, unknown>