in packages/synthetics-sdk-mocha/src/mocha.ts [59:78]
runtime_metadata: getRuntimeMetadata(),
start_time: startTime,
end_time: new Date().toISOString(),
});
/**
* Runs a mocha spec in a child process, returning a json object that complies
* with the response body required by GCM Synthetics' API contract.
* When cloud monitoring receives data from this function, it will convert
* it to metrics, logs, and traces.
*
* @public
* @param options - Options for running the mocha suite
* @returns Results of the mocha test run, complying with the Synthetics SDK API.
* Errors within this function reolve, with further information within the
* returned object's synthetic_generic_result_v1.
*/
export function runMocha(
options: SyntheticMochaOptions
): Promise<SyntheticResult> {