Skip to content

Commit

Permalink
feat(inside): inside assertion more intuitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Simpson committed Jan 6, 2021
1 parent 59d745e commit 9527ec7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/assertions/position.js
Expand Up @@ -50,7 +50,10 @@ export default _chai => {

if (distances === undefined) {
return this.assert(
Object.values(differences).every(v => v >= 0),
source.left >= target.left &&
source.right <= target.right &&
source.top >= target.top &&
source.bottom <= target.bottom,
`expected #{this} to be inside of #{exp}, but the value was #{act}`,
`expected #{this} not to be inside of #{exp}, but the value was #{act}`,
element,
Expand Down

0 comments on commit 9527ec7

Please sign in to comment.