All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.cldrjs.test.unit.resource.set.js Maven / Gradle / Ivy

There is a newer version: 1.2.2.1-jre17
Show newest version
define([
    "src/resource/set",
], function (resourceSet) {

    var data = {};

    describe("Resource Set", function () {

        it("should set value into new JSON data structure", function () {
            resourceSet(data, ["i"], 1);
            expect(data.i).to.equal(1);

            resourceSet(data, ["a", "b", "c"], 5);
            expect(data.a.b.c).to.equal(5);
        });

        it("should set value into existing JSON data structure", function () {
            resourceSet(data, ["a", "b", "e"], 7);
            expect(data.a.b.e).to.equal(7);
        });

    });

});




© 2015 - 2025 Weber Informatics LLC | Privacy Policy