Skip to content

platform-ios's crash diagnostics test fails on Windows because it expects forward slashes #261

Closed

Description

@V3RON

Describe the bug

On Windows, packages/platform-ios/src/__tests__/crash-diagnostics.test.ts fails. The test builds the crash report directory with path.join(sourceRoot, '.harness', 'crash-reports'), so the artifact path uses backslashes, but it then checks for the POSIX form:

expect(artifacts[0]?.artifactPath).toContain('/.harness/crash-reports/');

On Windows the path contains \.harness\crash-reports\, so the assertion fails. The pre-push hook runs this test (#241), so pushing from a Windows machine fails.

This was reported after #242 made the iOS package's tests run: #242 (comment).

System Info

System:
  OS: Windows 11

React Native Harness Version

main after #242

Reproduction

https://github.com/callstackincubator/react-native-harness/blob/main/packages/platform-ios/src/__tests__/crash-diagnostics.test.ts

Steps to reproduce

  1. On Windows, run pnpm nx test platform-ios.
  2. The crash diagnostics test fails on the '/.harness/crash-reports/' assertion.

Part of #247.

Activity

  1. added a commit that references this issue on Oct 25, 2026
    c0e29c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions