diff options
Diffstat (limited to 'node_modules/utila/scripts/js/test/object.js')
-rw-r--r-- | node_modules/utila/scripts/js/test/object.js | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/node_modules/utila/scripts/js/test/object.js b/node_modules/utila/scripts/js/test/object.js new file mode 100644 index 000000000..a430c616d --- /dev/null +++ b/node_modules/utila/scripts/js/test/object.js @@ -0,0 +1,220 @@ +var object; + +require('./_prepare'); + +object = mod('object'); + +test('isBareObject', function() { + object.isBareObject('a').should.equal(false); + return object.isBareObject({ + 'a': 'a' + }).should.equal(true); +}); + +test('typeOf', function() { + object.typeOf('s').should.equal('string'); + object.typeOf(0).should.equal('number'); + object.typeOf(false).should.equal('boolean'); + object.typeOf({}).should.equal('object'); + object.typeOf(arguments).should.equal('arguments'); + return object.typeOf([]).should.equal('array'); +}); + +test('empty', function() { + var o; + o = { + a: 1, + b: 2 + }; + object.empty(o); + o.should.not.have.property('a'); + return o.should.not.have.property('b'); +}); + +test('fastEmpty', function() { + var o; + o = { + a: 1, + b: 2 + }; + object.fastEmpty(o); + o.should.not.have.property('a'); + return o.should.not.have.property('b'); +}); + +test('clone', function() { + var o; + object.clone([1])[0].should.equal(1); + object.clone({ + a: 1 + }).a.should.equal(1); + o = { + a: 1 + }; + return object.clone(o).should.not.equal(o); +}); + +test('clone [include prototype]', function() { + var C, a, b; + C = (function() { + function C(a) { + this.a = a; + } + + C.prototype.sayA = function() { + return this.a + 'a'; + }; + + return C; + + })(); + a = new C('a'); + a.sayA().should.equal('aa'); + b = object.clone(a, true); + b.should.not.equal(a); + b.constructor.should.equal(C); + b.a.should.equal('a'); + b.a = 'a2'; + return b.sayA().should.equal('a2a'); +}); + +test('clone [without prototype]', function() { + var C, a, b; + C = (function() { + function C(a) { + this.a = a; + } + + C.prototype.sayA = function() { + return this.a + 'a'; + }; + + return C; + + })(); + a = new C('a'); + a.sayA().should.equal('aa'); + b = object.clone(a, false); + return b.should.equal(a); +}); + +test('overrideOnto [basic]', function() { + var onto, what; + onto = { + a: 'a', + b: { + c: 'c', + d: { + e: 'e' + } + } + }; + what = { + a: 'a2', + b: { + c: 'c2', + d: { + f: 'f2' + } + } + }; + object.overrideOnto(onto, what); + onto.a.should.equal('a2'); + onto.b.should.have.property('c'); + onto.b.c.should.equal('c2'); + onto.b.d.should.not.have.property('f'); + return onto.b.d.e.should.equal('e'); +}); + +test('override', function() { + var onto, onto2, what; + onto = { + a: 'a', + b: { + c: 'c', + d: { + e: 'e' + } + } + }; + what = { + a: 'a2', + b: { + c: 'c2', + d: { + f: 'f2' + } + } + }; + onto2 = object.override(onto, what); + onto2.a.should.equal('a2'); + onto2.b.should.have.property('c'); + onto2.b.c.should.equal('c2'); + onto2.b.d.should.not.have.property('f'); + onto2.b.d.e.should.equal('e'); + return onto.should.not.equal(onto2); +}); + +(function() { + var onto, what; + what = { + a: 'a2', + c: function() {}, + z: 'z', + y: { + a: 'a' + } + }; + onto = { + a: 'a', + b: 'b' + }; + test('appendOnto [basic]', function() { + object.appendOnto(onto, what); + onto.a.should.equal('a2'); + onto.b.should.equal('b'); + return onto.z.should.equal('z'); + }); + test("appendOnto [shallow copies instances]", function() { + onto.c.should.be["instanceof"](Function); + return onto.c.should.equal(what.c); + }); + return test("appendOnto [clones objects]", function() { + onto.should.have.property('y'); + onto.y.a.should.equal('a'); + return onto.y.should.not.equal(what.y); + }); +})(); + +test('groupProps', function() { + var groups, obj; + obj = { + a1: '1', + a2: '2', + b1: '1', + b2: '2', + c1: '1', + c2: '2', + rest1: '1', + rest2: '2' + }; + groups = object.groupProps(obj, { + a: ['a1', 'a2'], + b: [/^b[0-9]+$/], + c: function(key) { + return key[0] === 'c'; + } + }); + groups.a.should.have.property('a1'); + groups.a.a1.should.equal('1'); + groups.a.should.have.property('a2'); + groups.b.should.have.property('b1'); + groups.b.should.have.property('b2'); + groups.c.should.have.property('c1'); + groups.c.should.have.property('c2'); + groups.rest.should.have.property('rest1'); + groups.rest.should.have.property('rest1'); + return groups.rest.should.not.have.property('c1'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