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
A run reports itself by returning NevermoreTestResults.TestRunResults, not by throwing. The engine truncates a long run's log output, so counts scraped back out of that text are exactly what goes missing on the runs where they matter most. A test script hands the table straight out of its top level:
local results = NevermoreTestRunnerUtils.runTestsIfNeededAsync(root)
if results then
return results
end
Reading Jest's result into that table is NevermoreTestResults's job, which is a separate module so it can be unit tested without Jest present.
Properties
RESULTS_FORMAT
NevermoreTestRunnerUtils.RESULTS_FORMAT: stringTag identifying a results table to whatever reads a run's return values.
Functions
isOpenCloud
NevermoreTestRunnerUtils.isOpenCloud() → booleanReturns true if running inside an Open Cloud Luau Execution context.
runTestsIfNeededAsync
NevermoreTestRunnerUtils.runTestsIfNeededAsync(root: Instance--
The instance to scan for jest.config (e.g. the package folder in ServerScriptService)
) → NevermoreTestResults.TestRunResults?Runs Jest tests if a jest.config is found under root. Otherwise treats boot success as the test (smoke test).
Returns nil when no test run was attempted, which is how a real game server tells itself apart from a test place: script sources are unreadable there, so the caller falls through to its normal boot instead.
Outside Open Cloud (e.g. Studio via studio-bridge) nothing reads the returned results, so ProcessService:ExitAsync() carries the verdict out instead.