toMatchInlineSnapshot(actual, expected) {
    const test = mochaCurrentTest;
    if (!test.file) throw new Error('unexpected value');

    const title = makeTestTitle(test);
    const snapshotState = getSnapshotState(test.file);
    const context = {snapshotState, currentTestName: title};
    // @ts-expect-error - this is enough for snapshots to work.
    const matcher = toMatchInlineSnapshot.bind(context);
    const result = matcher(actual, expected);
    // @ts-expect-error - not sure why these types are so wrong
    if (!result.pass) snapshotTestFailed = true;
    return result;
  }
@param {any} actual
@param {any} expected