BE-SPAN/node_modules/dottie/test/find.test.js
githubna-ilham 722cd440e8 first commit
2024-10-20 22:04:16 +07:00

19 lines
403 B
JavaScript

var expect = require("expect.js"),
dottie = require('../dottie');
describe("dottie.find", function () {
var data = {
'foo': {
'bar': 'baz'
},
'zoo': 'lander'
};
it("should get first-level values", function () {
expect(dottie.find('zoo', data)).to.equal('lander');
});
it("should get nested-level values", function () {
expect(dottie.find('foo.bar', data)).to.equal('baz');
});
});