mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Client: Guild page and mix changes (#8533)
* update deps * add guilds page * improve karma conf, add tests for actions
This commit is contained in:
25
test/client/unit/specs/libs/deepFreeze.js
Normal file
25
test/client/unit/specs/libs/deepFreeze.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import deepFreeze from 'client/libs/deepFreeze';
|
||||
|
||||
describe('deepFreeze', () => {
|
||||
it('works as expected', () => {
|
||||
let obj = {
|
||||
a: 1,
|
||||
b () {
|
||||
return this.a;
|
||||
},
|
||||
nested: {
|
||||
c: 2,
|
||||
nestedTwice: {
|
||||
d: 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
let result = deepFreeze(obj);
|
||||
expect(result).to.equal(obj);
|
||||
|
||||
expect(Object.isFrozen(obj)).to.equal(true);
|
||||
expect(Object.isFrozen(obj.nested)).to.equal(true);
|
||||
expect(Object.isFrozen(obj.nested.nestedTwice)).to.equal(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user