Function runAndStringifyTests

  • Run tests in given TestsRecord 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 🟩."

    Returns

    Promise with a readable strings of the test results.

    Parameters

    • testsRecord: Readonly<Record<string, Tests<unknown>>>

      Object with paths and array of tests.

    Returns Promise<void>