Closed Beutlin closed 5 years ago
Describe the bug After the request the validation of json data is in some cases wrong.
To Reproduce
Call some page which returns this simple JSON: { a: false, b: 0, c: null }
Validate a, b, c in your config with: {jsonpath: content.a, expect: false, jsonpath: content.b, expect: 0, jsonpath: content.c, expect: null }
Result: Schema Validation failed: "\"expect\" must be a boolean"
Expected behavior No errors, as the returned value and the expected value are the same.
Additional context Have a look at https://dorey.github.io/JavaScript-Equality-Table/. Here are some corner cases which value of variables might be compared to the corresponded value.
Oh, I've just seen that this issue is already fixed on the master branch. Maybe you can update the version of your software, thus that users who install strest with npm also benefit from it.
Describe the bug After the request the validation of json data is in some cases wrong.
To Reproduce
Call some page which returns this simple JSON: { a: false, b: 0, c: null }
Validate a, b, c in your config with: {jsonpath: content.a, expect: false, jsonpath: content.b, expect: 0, jsonpath: content.c, expect: null }
Result: Schema Validation failed: "\"expect\" must be a boolean"
Expected behavior No errors, as the returned value and the expected value are the same.
Additional context Have a look at https://dorey.github.io/JavaScript-Equality-Table/. Here are some corner cases which value of variables might be compared to the corresponded value.