chore: simplify naming

This commit is contained in:
Jack Wotherspoon
2026-03-09 13:48:57 +01:00
parent 0d2ad092ec
commit a45e42cf30
4 changed files with 7 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ describe('processUtils', () => {
expect(handleAutoUpdate.waitForUpdateCompletion).toHaveBeenCalledTimes(1);
expect(runExitCleanup).toHaveBeenCalledTimes(1);
expect(process.send).toHaveBeenCalledWith({
type: 'relaunch-resume-session',
type: 'relaunch-session',
sessionId: expect.any(String),
});
expect(processExit).toHaveBeenCalledWith(RELAUNCH_EXIT_CODE);
@@ -53,7 +53,7 @@ describe('processUtils', () => {
expect(handleAutoUpdate.waitForUpdateCompletion).toHaveBeenCalledTimes(1);
expect(runExitCleanup).toHaveBeenCalledTimes(1);
expect(process.send).toHaveBeenCalledWith({
type: 'relaunch-resume-session',
type: 'relaunch-session',
sessionId: 'custom-session-id',
});
expect(processExit).toHaveBeenCalledWith(RELAUNCH_EXIT_CODE);

View File

@@ -31,7 +31,7 @@ export async function relaunchApp(sessionIdOverride?: string): Promise<void> {
if (process.send) {
process.send({
type: 'relaunch-resume-session',
type: 'relaunch-session',
sessionId: sessionIdOverride ?? sessionId,
});
}

View File

@@ -316,7 +316,7 @@ describe('relaunchAppInChildProcess', () => {
expect(processExitSpy).toHaveBeenCalledWith(1);
});
it('should append --resume <sessionId> on the next spawn if relaunch-resume-session message is received', async () => {
it('should append --resume <sessionId> on the next spawn if relaunch-session message is received', async () => {
process.argv = ['/usr/bin/node', '/app/cli.js', '--some-flag'];
let spawnCount = 0;
@@ -328,7 +328,7 @@ describe('relaunchAppInChildProcess', () => {
// First run: send the resume session ID, then exit with RELAUNCH_EXIT_CODE
setImmediate(() => {
mockChild.emit('message', {
type: 'relaunch-resume-session',
type: 'relaunch-session',
sessionId: 'test-session-123',
});
mockChild.emit('close', RELAUNCH_EXIT_CODE);
@@ -378,7 +378,7 @@ describe('relaunchAppInChildProcess', () => {
if (spawnCount === 1) {
setImmediate(() => {
mockChild.emit('message', {
type: 'relaunch-resume-session',
type: 'relaunch-session',
sessionId: 'new-session-456',
});
mockChild.emit('close', RELAUNCH_EXIT_CODE);

View File

@@ -90,7 +90,7 @@ export async function relaunchAppInChildProcess(
(msg: { type?: string; settings?: unknown; sessionId?: string }) => {
if (msg.type === 'admin-settings-update' && msg.settings) {
latestAdminSettings = msg.settings as AdminControlsSettings;
} else if (msg.type === 'relaunch-resume-session' && msg.sessionId) {
} else if (msg.type === 'relaunch-session' && msg.sessionId) {
resumeSessionId = msg.sessionId;
}
},