-
Just started to use chai via postman tests. I wonder if I can get chai to print the missing keys. For the following test pm.test("Have all mentioned fiels", () => {
const obj = {"hello": "world"};
pm.expect(obj).to.have.all.keys("hello", "goodbye");
}) The result is:
Which is correct, but does not tell me: 'hey, goodbye is the key, which is missing. Any way to get chai print just the missing keys? |
Beta Was this translation helpful? Give feedback.
Answered by
keithamus
Sep 20, 2022
Replies: 1 comment
-
Right now this is not possible, it would require us to change the error message generated (which is definitely possible)! It's something we're aware of and are working on. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pihentagy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now this is not possible, it would require us to change the error message generated (which is definitely possible)! It's something we're aware of and are working on.