Skip to content

failing toMatch(Inline)Snapshot does not abort test #10888

@eps1lon

Description

@eps1lon

🐛 Bug Report

A failing toMatch(Inline)Snapshot will not stop the test.

To Reproduce

Steps to reproduce the behavior:

  • Put any statement behind a failing expect(...).toMatchSnapshot()

Expected behavior

Test aborts on the failing line just like other matchers (e.g. toEqual) behave.

Link to repl or repo (highly encouraged)

https://github.com/eps1lon/jest-repro-inline-snapshot-bail

envinfo

  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (6) x64 Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz
  Binaries:
    Node: 14.14.0 - ~/.nvm/versions/node/v14.14.0/bin/node
    Yarn: 1.22.5 - /usr/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v14.14.0/bin/npm
  npmPackages:
    jest: ^26.6.3 => 26.6.3

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