Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/alpha' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza committed Jul 8, 2024
2 parents 1d86f63 + 1e21b69 commit 85a52d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/ParseObject.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2120,6 +2120,20 @@ describe('Parse.Object testing', () => {
await object.save();
});

it('should not change the json field to array in afterSave', async () => {
Parse.Cloud.beforeSave('failingJSONTestCase', req => {
expect(req.object.get('jsonField')).toEqual({ '123': 'test' });
});

Parse.Cloud.afterSave('failingJSONTestCase', req => {
expect(req.object.get('jsonField')).toEqual({ '123': 'test' });
});

const object = new Parse.Object('failingJSONTestCase');
object.set('jsonField', { '123': 'test' });
await object.save();
});

it('returns correct field values', async () => {
const values = [
{ field: 'string', value: 'string' },
Expand Down

0 comments on commit 85a52d8

Please sign in to comment.