diff --git a/src/platforms/ios/__tests__/recording-scripts.test.ts b/src/platforms/apple/core/__tests__/recording-scripts.test.ts similarity index 90% rename from src/platforms/ios/__tests__/recording-scripts.test.ts rename to src/platforms/apple/core/__tests__/recording-scripts.test.ts index 59ef3c296..ad6149b34 100644 --- a/src/platforms/ios/__tests__/recording-scripts.test.ts +++ b/src/platforms/apple/core/__tests__/recording-scripts.test.ts @@ -2,15 +2,15 @@ import { test } from 'vitest'; import assert from 'node:assert/strict'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { runCmd } from '../../../utils/exec.ts'; -import { getRecordingOverlaySupportWarning } from '../../../recording/overlay.ts'; +import { runCmd } from '../../../../utils/exec.ts'; +import { getRecordingOverlaySupportWarning } from '../../../../recording/overlay.ts'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const recordingScriptsDir = path.resolve( __dirname, - '../../../../ios-runner/AgentDeviceRunner/RecordingScripts', + '../../../../../ios-runner/AgentDeviceRunner/RecordingScripts', ); -const recordingTestSupportDir = path.resolve(__dirname, '../../../../test/integration/support'); +const recordingTestSupportDir = path.resolve(__dirname, '../../../../../test/integration/support'); const SWIFT_TYPECHECK_TIMEOUT_MS = 60_000; async function assertSwiftScriptTypechecks(scriptPath: string): Promise { diff --git a/src/platforms/ios/__tests__/runner-client.test.ts b/src/platforms/apple/core/__tests__/runner-client.test.ts similarity index 97% rename from src/platforms/ios/__tests__/runner-client.test.ts rename to src/platforms/apple/core/__tests__/runner-client.test.ts index b8fd46261..af986e9cf 100644 --- a/src/platforms/ios/__tests__/runner-client.test.ts +++ b/src/platforms/apple/core/__tests__/runner-client.test.ts @@ -10,37 +10,38 @@ const { mockRunCmdStreaming, mockRepairMacOsRunnerProductsIfNeeded } = vi.hoiste mockRepairMacOsRunnerProductsIfNeeded: vi.fn(), })); -vi.mock('../../../utils/exec.ts', async () => { - const actual = - await vi.importActual('../../../utils/exec.ts'); +vi.mock('../../../../utils/exec.ts', async () => { + const actual = await vi.importActual( + '../../../../utils/exec.ts', + ); return { ...actual, runCmdStreaming: mockRunCmdStreaming, }; }); -vi.mock('../../apple/core/runner/runner-macos-products.ts', async () => { - const actual = await vi.importActual< - typeof import('../../apple/core/runner/runner-macos-products.ts') - >('../../apple/core/runner/runner-macos-products.ts'); +vi.mock('../runner/runner-macos-products.ts', async () => { + const actual = await vi.importActual( + '../runner/runner-macos-products.ts', + ); return { ...actual, repairMacOsRunnerProductsIfNeeded: mockRepairMacOsRunnerProductsIfNeeded, }; }); -import type { DeviceInfo } from '../../../kernel/device.ts'; +import type { DeviceInfo } from '../../../../kernel/device.ts'; import { type RequestProgressEvent, withRequestProgressSink, -} from '../../../daemon/request-progress.ts'; -import { flushDiagnosticsToSessionFile, withDiagnosticsScope } from '../../../utils/diagnostics.ts'; -import { AppError } from '../../../kernel/errors.ts'; -import { isReadOnlyRunnerCommand } from '../../apple/core/runner/runner-command-traits.ts'; +} from '../../../../daemon/request-progress.ts'; import { - withRunnerCommandId, - type RunnerCommand, -} from '../../apple/core/runner/runner-contract.ts'; + flushDiagnosticsToSessionFile, + withDiagnosticsScope, +} from '../../../../utils/diagnostics.ts'; +import { AppError } from '../../../../kernel/errors.ts'; +import { isReadOnlyRunnerCommand } from '../runner/runner-command-traits.ts'; +import { withRunnerCommandId, type RunnerCommand } from '../runner/runner-contract.ts'; import { assertSafeDerivedCleanup, isRetryableRunnerError, @@ -52,7 +53,7 @@ import { resolveRunnerMaxConcurrentDestinationsFlag, resolveRunnerSigningBuildSettings, shouldRetryRunnerConnectError, -} from '../../apple/core/runner/runner-client.ts'; +} from '../runner/runner-client.ts'; import { acquireRunnerXctestrunCacheLock, ensureXctestrunArtifact, @@ -66,8 +67,8 @@ import { shouldDeleteRunnerDerivedRootEntry, writeRunnerCacheMetadata, xctestrunReferencesProjectRoot, -} from '../../apple/core/runner/runner-xctestrun.ts'; -import { parseRunnerResponse } from '../../apple/core/runner/runner-session.ts'; +} from '../runner/runner-xctestrun.ts'; +import { parseRunnerResponse } from '../runner/runner-session.ts'; const iosSimulator: DeviceInfo = { platform: 'ios', @@ -180,7 +181,7 @@ const runnerProtocolCommandFixtures: Record { const tmpDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), 'agent-device-xctestrun-'));