toThrowErrorMatchingSnapshot
does not work with promises
#4946
Labels
toThrowErrorMatchingSnapshot
does not work with promises
#4946
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
One cannot use
.rejects.toThrowErrorMatchingSnapshot()
on a rejected promise. This means there's not the same parity between synchronous and asynchronustoThrow
introduced in #4884.If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can
yarn install
andyarn test
.This test passes, but the snapshot is actually this:
What is the expected behavior?
Snapshot should be
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Jest@c760ae869372950ecd05a1c79eb9b918abf70e82 (curren master), node 8.9.1, yarn 1.3.1, macOS
The text was updated successfully, but these errors were encountered: