CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
processUtils.test.ts23 linesDownload Raw Back to utils
1/**2 * @license3 * Copyright 2025 Google LLC4 * SPDX-License-Identifier: Apache-2.05 */6 7import { vi } from 'vitest';8import { RELAUNCH_EXIT_CODE, relaunchApp } from './processUtils.js';9import * as cleanup from './cleanup.js';10 11describe('processUtils', () => {12  const processExit = vi13    .spyOn(process, 'exit')14    .mockReturnValue(undefined as never);15  const runExitCleanup = vi.spyOn(cleanup, 'runExitCleanup');16 17  it('should run cleanup and exit with the relaunch code', async () => {18    await relaunchApp();19    expect(runExitCleanup).toHaveBeenCalledTimes(1);20    expect(processExit).toHaveBeenCalledWith(RELAUNCH_EXIT_CODE);21  });22});23 
basant307/AI_Governance_Project · CoolFace