function persist
persist(
fileTimes: Map<string, number>,
projectRoot: string
): Promise<void>

Writes the merged per-file timings back to tmp/test-timings.json for the next run to pack with.

import * as Timings from './timings.ts';

// Defined, not invoked: writes tmp/test-timings.json under projectRoot.
async function saveTimings(fileTimes: Map<string, number>) {
  await Timings.persist(fileTimes, '/proj'); // next run's splitIntoGroups packs with these
}

Parameters

fileTimes: Map<string, number>
projectRoot: string

Return Type

Promise<void>

Usage

import { persist } from "lib/commands/test/timings.ts";