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
Post a Comment