fix(processes): fix multiple clawx processes running concurently (#589)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Haze <hazeone@users.noreply.github.com> Co-authored-by: paisley <8197966+su8su@users.noreply.github.com> Co-authored-by: Felix <24791380+vcfgv@users.noreply.github.com>
This commit is contained in:
15
tests/unit/signal-quit.test.ts
Normal file
15
tests/unit/signal-quit.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { createSignalQuitHandler } from '@electron/main/signal-quit';
|
||||
|
||||
describe('signal quit handler', () => {
|
||||
it('logs and requests quit when signal is received', () => {
|
||||
const logInfo = vi.fn();
|
||||
const requestQuit = vi.fn();
|
||||
const handler = createSignalQuitHandler({ logInfo, requestQuit });
|
||||
|
||||
handler('SIGTERM');
|
||||
|
||||
expect(logInfo).toHaveBeenCalledWith('Received SIGTERM; requesting app quit');
|
||||
expect(requestQuit).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user