Stone.js API
    Preparing search index...

    Run the test suite, configured from stone.config.mjs.

    Tests are a context like any other, so they are configured where every other context is: the same file that shapes the build shapes the test run, and a project needs no second config file to keep in sync with the first. The runner is Vitest.

    Two things this does that a bare runner cannot:

    • It loads the env files before the runner starts, so a value read at module load (a @Configuration calling getString) sees it. Loading the same file from inside a test would be too late: the imports have already run.
    • It resolves which files make up the app and hands that to the test process, so createTestApp() discovers the same modules the build does.

    The runner is spawned, not imported. Importing it joined two module graphs: this package is bundled, so a runner it does not depend on was bundled with it and broke in ways that had nothing to do with the project's tests. A child process also owns its own exit code and its own watch loop, which is what a test command actually needs.

    Index
    • Handle the incoming event.

      Parameters

      • event: IncomingEvent

        The incoming event.

      Returns Promise<void>

      When the runner is missing, or when tests fail.