Skip to content

Commit 9beb600

Browse files
committed
Check whether the code expectation was given
1 parent b0fadb4 commit 9beb600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/assert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function assertExpectations({assertion, actual, expectations, message, prefix, s
215215
});
216216
}
217217

218-
if (actual.code !== expectations.code) {
218+
if (typeof expectations.code !== 'undefined' && actual.code !== expectations.code) {
219219
throw new AssertionError({
220220
assertion,
221221
message,

0 commit comments

Comments
 (0)