Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test: reformat test files for consistent object formatting

Steven Enamakelab94d1b74f1a
diff --git a/app/src/components/settings/panels/core/__tests__/GatewaySection.render.test.tsx b/app/src/components/settings/panels/core/__tests__/GatewaySection.render.test.tsx
index aedffeea86..07b2146281 100644
--- a/app/src/components/settings/panels/core/__tests__/GatewaySection.render.test.tsx
+++ b/app/src/components/settings/panels/core/__tests__/GatewaySection.render.test.tsx
@@ -9,6 +9,7 @@ import { fireEvent, screen, waitFor } from '@testing-library/react';
import { beforeEach, describe, expect, test, vi } from 'vitest';
import { renderWithProviders } from '../../../../../test/test-utils';
+import GatewaySection from '../GatewaySection';
const hoisted = vi.hoisted(() => ({
listGateways: vi.fn(),
@@ -39,8 +40,6 @@ vi.mock('../../../../../services/coreRpcClient', () => ({
clearCoreRpcTokenCache: hoisted.clearCoreRpcTokenCache,
}));
-import GatewaySection from '../GatewaySection';
-
const DESKTOP = { id: 'desktop', label: 'This computer', spec: { kind: 'desktop' as const } };
const BUILDER = {
id: 'builder',
@@ -56,7 +55,10 @@ beforeEach(() => {
Object.values(hoisted).forEach(fn => fn.mockReset());
hoisted.listGateways.mockResolvedValue([DESKTOP, BUILDER]);
hoisted.activeGatewayId.mockResolvedValue('desktop');
- hoisted.gatewayStatus.mockResolvedValue({ state: 'connected', endpoint: 'http://127.0.0.1:7788' });
+ hoisted.gatewayStatus.mockResolvedValue({
+ state: 'connected',
+ endpoint: 'http://127.0.0.1:7788',
+ });
hoisted.activateGateway.mockResolvedValue({ id: 'builder', rpcUrl: 'http://127.0.0.1:5/rpc' });
hoisted.saveGateway.mockResolvedValue(undefined);
hoisted.deleteGateway.mockResolvedValue(undefined);
@@ -119,9 +121,7 @@ describe('GatewaySection', () => {
fireEvent.click(await screen.findByTestId('gateway-use-builder'));
- expect(await screen.findByTestId('gateway-error')).toHaveTextContent(
- 'could not reach the box'
- );
+ expect(await screen.findByTestId('gateway-error')).toHaveTextContent('could not reach the box');
});
test('the status line reports the step while a gateway is being provisioned', async () => {
diff --git a/app/src/services/__tests__/gatewayService.test.ts b/app/src/services/__tests__/gatewayService.test.ts
index 8a7468d818..67973c0f90 100644
--- a/app/src/services/__tests__/gatewayService.test.ts
+++ b/app/src/services/__tests__/gatewayService.test.ts
@@ -122,7 +122,11 @@ describe('mutating and activating', () => {
const gateway = {
id: 'builder',
label: 'Build server',
- spec: { kind: 'box' as const, reach: { kind: 'local' as const }, confinement: { kind: 'docker' as const, image: 'openhuman-core:local' } },
+ spec: {
+ kind: 'box' as const,
+ reach: { kind: 'local' as const },
+ confinement: { kind: 'docker' as const, image: 'openhuman-core:local' },
+ },
};
await saveGateway(gateway);
diff --git a/app/src/store/coreModeSlice.test.ts b/app/src/store/coreModeSlice.test.ts
index 193a72209d..636ebfe7c0 100644
--- a/app/src/store/coreModeSlice.test.ts
+++ b/app/src/store/coreModeSlice.test.ts
@@ -196,7 +196,10 @@ describe('coreModeSlice — gateway mode', () => {
openhuman_core_mode: 'gateway',
openhuman_core_gateway_id: 'builder',
});
- const state = mod.default(undefined, mod.setCoreMode({ kind: 'gateway', gatewayId: 'builder' }));
+ const state = mod.default(
+ undefined,
+ mod.setCoreMode({ kind: 'gateway', gatewayId: 'builder' })
+ );
expect(Object.keys(state.mode)).toEqual(['kind', 'gatewayId']);
});