Skip to content

Commit

Permalink
Check whether the code expectation was given
Browse files Browse the repository at this point in the history
  • Loading branch information
novemberborn committed Mar 5, 2019
1 parent b0fadb4 commit 9beb600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/assert.js
Expand Up @@ -215,7 +215,7 @@ function assertExpectations({assertion, actual, expectations, message, prefix, s
});
}

if (actual.code !== expectations.code) {
if (typeof expectations.code !== 'undefined' && actual.code !== expectations.code) {
throw new AssertionError({
assertion,
message,
Expand Down

0 comments on commit 9beb600

Please sign in to comment.