Asserts that a function throws an error matching the most recent snapshot.
Symbol
Matchers.toThrowErrorMatchingSnapshot
function fail() {
throw new Error("Oops!");
}
expect(fail).toThrowErrorMatchingSnapshot();
expect(fail).toThrowErrorMatchingSnapshot("This one should say Oops!");