Skip to content

Commit

Permalink
Added test for bug fix of kissyteam#575
Browse files Browse the repository at this point in the history
  • Loading branch information
承风 committed Mar 6, 2014
1 parent cbdc81c commit 21ce382
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/seed/tests/specs/kissy-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,35 @@ describe('kissy.js', function () {
expect(c.nul).toBe('oops');
expect(c.undef).toBe('oops');
expect(c.str).toBe('oops');

function CreateObj() {
this.test = true;
this.length = 1;
}
CreateObj.prototype.getTest = function() {
return this.test;
};
var d = new CreateObj(),
e = {
'bool': 'oops',
'num': 'oops',
'nul': 'oops',
'undef': 'oops',
'str': 'oops',
'test' : false,
'length' : 2
};

var f = S.merge(d, e);

expect(f.bool).toBe('oops');
expect(f.num).toBe('oops');
expect(f.nul).toBe('oops');
expect(f.undef).toBe('oops');
expect(f.str).toBe('oops');
expect(f.test).toBe(false);
expect(f.length).toBe(2);
expect(f.getTest()).toBe(false);
});

it('S.augment', function () {
Expand Down

0 comments on commit 21ce382

Please sign in to comment.