We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0488b3 commit de77af6Copy full SHA for de77af6
src/__tests__/ParseObject-test.js
@@ -642,6 +642,20 @@ describe('ParseObject', () => {
642
643
});
644
645
+ it('throw exception on non-sensical parent (not set)', async () => {
646
+ const o = new ParseObject('Person');
647
+ o.increment('data', 2);
648
+ expect(Object.keys(o._getPendingOps()[0]).length).toBe(1);
649
+
650
+ try {
651
+ o.set('data.a', 3);
652
+ expect(true).toBe(false);
653
+ } catch (e) {
654
+ expect(e.message).toBe('Trying to set sub property on a invalid property (data -> a)');
655
+ }
656
657
+ });
658
659
it('can clear all fields', () => {
660
const o = new ParseObject('Person');
661
o._finishFetch({
0 commit comments