chore(formatting): Fix formatting on main (#10464)

This commit is contained in:
Abhi
2025-10-02 23:28:49 -04:00
committed by GitHub
parent 2ab61dd16a
commit 93c7378d3b
2 changed files with 17 additions and 20 deletions
+14 -15
View File
@@ -123,23 +123,22 @@ describe('handleAutoUpdate', () => {
expect(mockSpawn).not.toHaveBeenCalled(); expect(mockSpawn).not.toHaveBeenCalled();
}); });
it.each([ it.each([PackageManager.NPX, PackageManager.PNPX, PackageManager.BUNX])(
PackageManager.NPX, 'should suppress update notifications when running via %s',
PackageManager.PNPX, (packageManager) => {
PackageManager.BUNX, mockGetInstallationInfo.mockReturnValue({
])('should suppress update notifications when running via %s', (packageManager) => { updateCommand: undefined,
mockGetInstallationInfo.mockReturnValue({ updateMessage: `Running via ${packageManager}, update not applicable.`,
updateCommand: undefined, isGlobal: false,
updateMessage: `Running via ${packageManager}, update not applicable.`, packageManager,
isGlobal: false, });
packageManager,
});
handleAutoUpdate(mockUpdateInfo, mockSettings, '/root', mockSpawn); handleAutoUpdate(mockUpdateInfo, mockSettings, '/root', mockSpawn);
expect(mockUpdateEventEmitter.emit).not.toHaveBeenCalled(); expect(mockUpdateEventEmitter.emit).not.toHaveBeenCalled();
expect(mockSpawn).not.toHaveBeenCalled(); expect(mockSpawn).not.toHaveBeenCalled();
}); },
);
it('should emit "update-received" but not update if no update command is found', () => { it('should emit "update-received" but not update if no update command is found', () => {
mockGetInstallationInfo.mockReturnValue({ mockGetInstallationInfo.mockReturnValue({
+3 -5
View File
@@ -33,11 +33,9 @@ export function handleAutoUpdate(
); );
if ( if (
[ [PackageManager.NPX, PackageManager.PNPX, PackageManager.BUNX].includes(
PackageManager.NPX, installationInfo.packageManager,
PackageManager.PNPX, )
PackageManager.BUNX
].includes(installationInfo.packageManager)
) { ) {
return; return;
} }