i want to compare 2 API requests on postman. Both APIs give same request and the same schema is added in both APIs:
schema = {
"properties": {
"errors": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"item_favorites":{
"type": "array",
"items" : [
{"type": "object",
"properties":{
"id": {"type":"number"},}}]}}}}}
I added in request A :
pm.globals.set("Storeschema", pm.response.json());
and in request B, i added the following script:
pm.test("compare responses", () =>
pm.expect(pm.response.json()).to.equal(pm.globals.get("Storeschema")));
i got the following error message
compare responses | AssertionError: expected { Object (errors, data) } to equal { Object (data, errors) }