What is the expected behavior?
To not crash on message body matching if body doesn't match.
What is the actual behavior?
Crashing on message body matching if message body has same count of keys, but different keys.
Possible solution
Go back to using deep-equal npm package. There was a PR here that introduced custom deepEqual logic that is not good enough.
If two objects have the same count of keys but not the same keys, it tries to extract the keys on undefined and crashes, making debugging hard to impossible.
How to reproduce the issue
Runkit: Link
Having problem producing a test case? Try and ask the community for help. If the test case cannot be reproduced, the Nock community might not be able to help you.
Does the bug have a test case?
Versions
| Software |
Version(s) |
| Nock |
11.3.2 |
| Node |
10.15.3 |
What is the expected behavior?
To not crash on message body matching if body doesn't match.
What is the actual behavior?
Crashing on message body matching if message body has same count of keys, but different keys.
Possible solution
Go back to using
deep-equalnpm package. There was a PR here that introduced custom deepEqual logic that is not good enough.If two objects have the same count of keys but not the same keys, it tries to extract the keys on
undefinedand crashes, making debugging hard to impossible.How to reproduce the issue
Runkit: Link
Having problem producing a test case? Try and ask the community for help. If the test case cannot be reproduced, the Nock community might not be able to help you.
Does the bug have a test case?
Versions