* Stringify custom attributes-objects

* Stringify custom attributes-objects
This commit is contained in:
ada99
2016-07-09 16:54:28 +03:00
committed by Anton Lavrenov
parent 886d0c970e
commit 95edb44782
6 changed files with 123 additions and 18 deletions

View File

@@ -39,4 +39,25 @@ suite('Util', function(){
a : 1
});
});
test('test _prepareToStringify', function() {
var o = {
a: 1,
b: 'string1'
};
o.c = {
d: 'string2',
e: o,
f: document.createElement('p')
};
o.g = o;
assert.deepEqual(Konva.Util._prepareToStringify(o), {
a: 1,
b: 'string1',
c: {
d: 'string2'
}
})
});
});