Skip to content

Commit

Permalink
test: Updated match to fail if you pass in an object that lacks the…
Browse files Browse the repository at this point in the history
… expected keys (newrelic#2843)
  • Loading branch information
bizob2828 authored Dec 18, 2024
1 parent 972b59d commit a3db8bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/lib/custom-assertions/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ module.exports = function match(actual, expected, { assert = require('node:asser
} else {
assert.equal(actual[key], expected[key])
}
} else {
assert.fail(`Missing ${key} in ${JSON.stringify(actual)}`)
}
}
}

0 comments on commit a3db8bd

Please sign in to comment.