Skip to main content

NevermoreTestRunnerUtils

Unified test runner utilities for Nevermore packages. Handles both smoke tests (game boot) and Jest unit tests.

  • If a jest.config is found under the given root, runs Jest tests
  • If no jest.config is found, boot success is the test (smoke test)
  • Detects Open Cloud execution via OpenCloudService to control behavior

Functions

isOpenCloud

NevermoreTestRunnerUtils.isOpenCloud() → boolean

Returns true if running inside an Open Cloud Luau Execution context.

runTestsIfNeededAsync

NevermoreTestRunnerUtils.runTestsIfNeededAsync(
rootInstance--

The instance to scan for jest.config (e.g. the package folder in ServerScriptService)

) → ()

Runs Jest tests if a jest.config is found under root. Otherwise treats boot success as the test (smoke test).

In Open Cloud, errors propagate naturally and the session terminates. Outside Open Cloud (e.g. run-in-roblox), we call ProcessService:ExitAsync() so Studio exits with the correct code.

Show raw api
{
    "functions": [
        {
            "name": "isOpenCloud",
            "desc": "Returns true if running inside an Open Cloud Luau Execution context.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/nevermore-test-runner/src/Server/NevermoreTestRunnerUtils.lua"
            }
        },
        {
            "name": "runTestsIfNeededAsync",
            "desc": "Runs Jest tests if a jest.config is found under root. Otherwise treats\nboot success as the test (smoke test).\n\nIn Open Cloud, errors propagate naturally and the session terminates.\nOutside Open Cloud (e.g. run-in-roblox), we call ProcessService:ExitAsync()\nso Studio exits with the correct code.",
            "params": [
                {
                    "name": "root",
                    "desc": "The instance to scan for jest.config (e.g. the package folder in ServerScriptService)",
                    "lua_type": "Instance"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 40,
                "path": "src/nevermore-test-runner/src/Server/NevermoreTestRunnerUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "NevermoreTestRunnerUtils",
    "desc": "Unified test runner utilities for Nevermore packages.\nHandles both smoke tests (game boot) and Jest unit tests.\n\n- If a jest.config is found under the given root, runs Jest tests\n- If no jest.config is found, boot success is the test (smoke test)\n- Detects Open Cloud execution via OpenCloudService to control behavior",
    "source": {
        "line": 12,
        "path": "src/nevermore-test-runner/src/Server/NevermoreTestRunnerUtils.lua"
    }
}