Skip to content

test: relocate Apple engine unit tests into platforms/apple/core (#980)#983

Merged
thymikee merged 1 commit into
mainfrom
apple-consolidation-test-relocation
Jul 1, 2026
Merged

test: relocate Apple engine unit tests into platforms/apple/core (#980)#983
thymikee merged 1 commit into
mainfrom
apple-consolidation-test-relocation

Conversation

@thymikee

@thymikee thymikee commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #968 (cleanup issue #980): after the Apple engine moved to src/platforms/apple/core/, its unit tests still lived in src/platforms/ios/__tests__/. This relocates the tests beside their source.

  • Moved 19 test files src/platforms/ios/__tests__/ → src/platforms/apple/core/__tests__/ (the runner stack, discovery, tool-provider, screenshot/perf, debug-symbols, plist/xml, apple-runner-platform, launch-diagnostics, simctl, the mixed index.test.ts, and the macos-helper-test-utils helper).
  • Re-relativized every from / import / dynamic import() / vi.mock / vi.importActual specifier to the new depth (including the vi.importActual<typeof import('…')>('…') runtime args).

Deferred (still in src/platforms/ios/__tests__/)

recording-scripts.test.ts and runner-client.test.ts — both compute runtime fs paths (__dirname / fileURLToPath) to ios-runner artifacts, so they need path-string fixes, not just specifier re-relativization. Left for a focused follow-up under #980.

Verification

Pure test relocation — no source or behavior change. Local: tsc clean, oxlint --deny-warnings clean, oxfmt --check clean; the moved suites pass (384 tests across the apple/core + deferred dirs). The 3 Android fillAndroid full-suite failures are the pre-existing CPU-contention flake (pass in isolation; this PR does not touch Android).

Part of #980.

…s/apple/core (#980)

After #968 moved the OS-agnostic Apple engine to src/platforms/apple/core/, its
tests still lived in src/platforms/ios/__tests__/. Move the 19 that test Apple
engine code into src/platforms/apple/core/__tests__/ so tests sit beside their
source, re-relativizing every import / dynamic import / vi.mock / vi.importActual
specifier to the new depth.

Deferred (still in src/platforms/ios/__tests__/): recording-scripts.test.ts and
runner-client.test.ts — both compute runtime fs paths (__dirname / fileURLToPath)
to ios-runner artifacts, so they need path-string fixes, not just specifier
re-relativization. Tracked under #980.

Pure test relocation — no source or behavior change. tsc + oxlint + oxfmt green;
the moved suites pass (384 tests across the apple + deferred dirs).
@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 450.5 kB 450.5 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 20.6 ms 20.6 ms -0.0 ms
CLI --help 34.4 ms 35.2 ms +0.8 ms

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

@thymikee

thymikee commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Review pass for head 5060630 found no actionable blockers.

Checked against cleanup issue #980: this PR mechanically relocates the Apple engine unit tests beside src/platforms/apple/core and re-relativizes static imports, dynamic imports, vi.mock, and vi.importActual specifiers. It intentionally leaves the fs-path-sensitive deferred tests in src/platforms/ios/tests, matching the issue notes. All reported checks are green.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 1, 2026
@thymikee thymikee merged commit 6cd0ec3 into main Jul 1, 2026
21 checks passed
@thymikee thymikee deleted the apple-consolidation-test-relocation branch July 1, 2026 07:16
@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 07:16 UTC

thymikee added a commit that referenced this pull request Jul 1, 2026
…) (#988)

Completes the #983 relocation. The 2 files deferred there compute runtime fs
paths (fileURLToPath/__dirname), so they needed path-depth fixes on top of import
re-relativization:

- runner-client.test.ts -> src/platforms/apple/core/__tests__/ (joins the rest of
  the Apple engine tests); repoRoot recomputed one level deeper.
- recording-scripts.test.ts -> src/recording/__tests__/ (beside the overlay.ts it
  tests); ios-runner RecordingScripts + test/integration/support paths recomputed
  one level shallower.

src/platforms/ios/__tests__/ is now empty (all Apple-engine tests live beside
their source under apple/core and recording). Pure test relocation — tsc, oxlint,
oxfmt, layering guard, fallow green; full unit suite passes (2883).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant