Skip to content

expect.soft() is broken #104

@nachooya

Description

@nachooya

Describe the bug

expect.soft() is broken in react-native-harness@1.1.0. Even the exact example from the docs fails with "expect.soft() can only be used inside a test"

System Info

Not needed

React Native Harness Version

1.1.0

Reproduction

https://www.react-native-harness.dev/docs/api/expect

Steps to reproduce

import {describe, expect, test} from 'react-native-harness';

describe('expect.soft smoke test', () => {
  test('soft assertions should collect failures without throwing', () => {
    expect.soft(1 + 1).toBe(3); // This will fail but test continues
    expect.soft(2 + 2).toBe(5); // This will also fail but test continues
    expect(3 + 3).toBe(6); // This passes
    // Test will be marked as failed due to soft assertion failures
  });
});

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