Skip to content

[Bug]: test.failing() does not work with failing snapshot #12825

@mrazauskas

Description

@mrazauskas

Version

28.1.0

Steps to reproduce

Seems like jest.failing() does not work with failing snapshots. Here is a reproduction: https://github.com/mrazauskas/x-jest-failing

Snapshot is failing inside test.failing(), but the output is: "Failing test passed even though it was supposed to fail." And later: "1 snapshot failed".

@michalwarda Would you like to take a look? (;

Expected behavior

Might be I misunderstood something, but it felt like we should see pass instead of fail.

Actual behavior

Screenshot 2022-05-08 at 19 01 08

Additional context

No response

Environment

System:
    OS: macOS 12.3.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 18.0.0 - /opt/homebrew/bin/node
    Yarn: 1.22.18 - ~/.yarn/bin/yarn
    npm: 8.6.0 - /opt/homebrew/bin/npm
  npmPackages:
    jest: ^28.1.0 => 28.1.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions