Skip to content

Commit

Permalink
Update wrapped matcher to return result of original matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
mattphillips committed Oct 3, 2018
1 parent dffbeaf commit 10b76f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/withMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class JestAssertionError extends Error {
const wrapMatcher = (matcher, customMessage) => {
const newMatcher = (...args) => {
try {
matcher(...args);
return matcher(...args);
} catch (error) {
if (typeof customMessage !== 'string' || customMessage.length < 1 || !error.matcherResult) {
throw error;
Expand Down

0 comments on commit 10b76f1

Please sign in to comment.