Skip to content

Commit

Permalink
Loose tests to allow decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Zivolo committed Apr 14, 2017
1 parent c3dd750 commit 09d2dc2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/popper/utils/getReferenceOffsets.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ import getOffsetRectRelativeToArbitraryNode
*/
export default function getReferenceOffsets(state, popper, reference) {
const commonOffsetParent = findCommonOffsetParent(popper, reference);
console.log(getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent));
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);
}
2 changes: 1 addition & 1 deletion tests/functional/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ describe('[core]', () => {
simulateScroll(s2, { scrollTop: 50 });
},
onUpdate(data) {
expect(getRect(reference).bottom).toBe(getRect(popper).top);
expect(getRect(reference).bottom).toBeApprox(getRect(popper).top);
data.instance.destroy();
done();
},
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/flips.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ describe('[flipping]', () => {
simulateScroll(document.body, { scrollTop: 200, delay: 50 });
},
onUpdate(data) {
expect(getRect(popper).top).toBe(getRect(reference).bottom);
expect(getRect(popper).top).toBeApprox(getRect(reference).bottom);
data.instance.destroy();
done();
},
Expand Down

0 comments on commit 09d2dc2

Please sign in to comment.