Enhancement/expect-to-be-close-to-with-infinity#7444
Conversation
|
Restarted CI for you. Looked intermittent |
|
@SimenB CI still failling yet I do not understand the error message, could you elucidate me please? Thank you in advance |
Co-Authored-By: joao-conde <up201503256@fe.up.pt>
rickhanlonii
left a comment
There was a problem hiding this comment.
LGTM after you fix the changelog 👍
|
|
If there is anything else I can improve please let me know. What would it take for the it to be merged and close the issue #7405 ? |
|
Thanks @joao-conde and congrats on your first Jest PR! |
|
@rickhanlonii the first of hopefully many, thank you! |
* master: (24 commits) Add `jest.isolateModules` for scoped module initialization (jestjs#6701) Migrate to Babel 7 (jestjs#7016) docs: changed "Great Scott!" link (jestjs#7524) Use reduce instead of filter+map in dependency_resolver (jestjs#7522) Update Configuration.md (jestjs#7455) Support dashed args (jestjs#7497) Allow % based configuration of max workers (jestjs#7494) chore: Standardize filenames: jest-runner pkg (jestjs#7464) allow `bail` setting to control when to bail out of a failing test run (jestjs#7335) Add issue template labels (jestjs#7470) chore: standardize filenames in e2e/babel-plugin-jest-hoist (jestjs#7467) Add node worker-thread support to jest-worker (jestjs#7408) Add `testPathIgnorePatterns` to CLI documentation (jestjs#7440) pretty-format: Omit non-enumerable symbol properties (jestjs#7448) Add Jest Architecture overview to docs. (jestjs#7449) chore: run appveyor tests on node 10 chore: fix failures e2e test for node 8 (jestjs#7446) chore: update docusaurus to v1.6.0 (jestjs#7445) Enhancement/expect-to-be-close-to-with-infinity (jestjs#7444) Update CHANGELOG formatting (jestjs#7429) ...
* toBeCloseTo works properly when comparing with Infinity * CHANGELOG update * Linter issue solved * Apply suggestions from code review Co-Authored-By: joao-conde <up201503256@fe.up.pt> * Update matchers.js * Update CHANGELOG * Fixed bug, leftover of old comment * Removed unecessary self-explanatory comments * Updated CHANGELOG * Snapshot updates
* toBeCloseTo works properly when comparing with Infinity * CHANGELOG update * Linter issue solved * Apply suggestions from code review Co-Authored-By: joao-conde <up201503256@fe.up.pt> * Update matchers.js * Update CHANGELOG * Fixed bug, leftover of old comment * Removed unecessary self-explanatory comments * Updated CHANGELOG * Snapshot updates
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |

Summary
For consistency it is desired that .toBeCloseTo can handle tests with Infinity.
As a tester, I want .toBeCloseTo to return true when testing Infinity with Infinity or -Infinity with -Infinity.
As a tester, I want .toBeCloseTo to return false when testing Infinity or -Infinity with any number.
Test plan
Run
and after run the entire test suite with
I also made some unit tests, testing for both Infinity and -Infinity with themselves aswell as both with real numbers.
My unit tests

I ran the linter to make sure the code rules are enforced: