Skip to content

test: relocate remaining Apple-engine unit tests to apple/core (#980)#989

Closed
thymikee wants to merge 1 commit into
mainfrom
phase3-cleanup-tests-980
Closed

test: relocate remaining Apple-engine unit tests to apple/core (#980)#989
thymikee wants to merge 1 commit into
mainfrom
phase3-cleanup-tests-980

Conversation

@thymikee

@thymikee thymikee commented Jul 1, 2026

Copy link
Copy Markdown
Member

What

Finishes the Apple-engine unit-test relocation under Phase-3 umbrella #972. PR #983 moved 19 tests from src/platforms/ios/__tests__/ into src/platforms/apple/core/__tests__/ but deferred 2 files because they compute runtime fs paths to native runner artifacts (not just import re-relativization). This PR moves the last two:

  • recording-scripts.test.ts
  • runner-client.test.ts

Path fixes made

Both files moved one directory level deeper (platforms/ios/__tests__platforms/apple/core/__tests__), so both relative import specifiers and repo-root-relative runtime fs paths gained one ../ level.

Import re-relativization:

  • ../../../<src-dir>/…../../../../<src-dir>/… (utils, kernel, daemon, recording)
  • ../../apple/core/runner/…../runner/… (sibling runner modules)

Runtime fs path fixes (the reason these were deferred): the native ios-runner/ Xcode project and test/integration/support/ still live at the repo root#968 only consolidated the TypeScript engine into platforms/apple/, not the Swift runner sources. So the repo-root-relative paths needed one extra ../:

  • recording-scripts.test.ts: recordingScriptsDir and recordingTestSupportDir (../../../../../../../../../) → resolve to ios-runner/AgentDeviceRunner/RecordingScripts and test/integration/support.
  • runner-client.test.ts: repoRoot (../../../../../../../../../), which feeds the project .tmp dir and the ios-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj path. All other ios-runner string occurrences in this file are synthetic temp-dir fixtures / regex assertions and were left untouched.

Behaviorless move — no test logic changed (oxfmt reflowed the import wrapping).

Verification

  • tsc -p tsconfig.json --noEmit — clean
  • vitest run both moved files — 2 files, 64 tests pass
  • scripts/layering/check.ts — OK (635 files satisfy the DAG)
  • oxfmt --write + oxlint --deny-warnings on changed — clean
  • fallow audit --base origin/main — no issues in changed files

closes #980

Finishes the relocation started in #983, which moved 19 Apple-engine unit
tests into src/platforms/apple/core/__tests__/ but deferred two files that
compute runtime fs paths to native runner artifacts.

Moves the last two:
- recording-scripts.test.ts
- runner-client.test.ts

Both needed the relative import specifiers re-relativized for the deeper
location, plus one extra `../` on the runtime fs paths that resolve against
the repo root (the native ios-runner/ project and test/integration/support
still live at the repo root; #968 only moved the TypeScript engine):

- recording-scripts.test.ts: recordingScriptsDir / recordingTestSupportDir
  (`../../../../` -> `../../../../../`) -> ios-runner/.../RecordingScripts
  and test/integration/support.
- runner-client.test.ts: repoRoot (`../../../../` -> `../../../../../`),
  which feeds the project `.tmp` dir and the ios-runner xcodeproj path.

Behaviorless move. Verified: tsc --noEmit clean, both test files pass
(64 tests), layering check OK, oxfmt/oxlint clean, fallow audit clean.

closes #980
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.4 MB 1.4 MB 0 B
JS gzip 451.9 kB 451.9 kB 0 B
npm tarball 549.9 kB 549.9 kB 0 B
npm unpacked 1.9 MB 1.9 MB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.9 ms 26.2 ms -0.7 ms
CLI --help 45.0 ms 45.5 ms +0.5 ms

Top changed chunks: no changes in the largest emitted chunks.

@thymikee

thymikee commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Closing as duplicate of #988 (same 2 deferred Apple test relocations, +24/-23 identical). Deferring to #988 which is part of the coordinated Phase-3 batch. My launching a #980 agent collided with the swarm's — noted.

@thymikee thymikee closed this Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-01 09:35 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cleanup: relocate Apple unit tests out of src/platforms/ios/__tests__

1 participant