META-INF.resources.bower_components.cldrjs.test.unit.resource.get.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-globalize Show documentation
Show all versions of jwebmp-globalize Show documentation
The JWebSwing implementation for a full Globalization
The newest version!
define([
"src/resource/get",
], function (resourceGet) {
var data = {a: {b: {c: 5}}};
describe("Data Get", function () {
it("should return existing data value", function () {
expect(resourceGet(data, ["a", "b", "c"])).to.equal(5);
});
it("should return undefined for non-existing data", function () {
expect(resourceGet(data, ["a", "b", "x"])).to.be.undefined;
});
it("should return undefined for non-existing tree", function () {
expect(resourceGet(data, ["x", "y", "z"])).to.be.undefined;
});
});
});