node.js module to compare json in a configurable way -


i working on writing testing suite our rest api in node.js. wondering if there module out there json comparison in configurable way.

for example : { "id":"456", "data":"test_data", "date":"2014-05-19" }

i need able tell module, check not null id since autogenerated, check not null date , check data value.

thanks.

or can use expect.js

var expect = require("expect.js"); var data = {"name":"john", "age":32}; data.tostring = function(){"string"};  expect(data).not.to.be(undefined); expect(data.name).to.be("john"); expect(data.tostring).to.be.a("function"); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -