fix: Nested date is incorrectly decoded as empty object {} when fetching a Parse Object (#8446)

This commit is contained in:
Daniel
2023-03-05 11:22:19 +11:00
committed by GitHub
parent 3f5b2900a6
commit 22d2446dfe
2 changed files with 14 additions and 3 deletions

View File

@@ -248,6 +248,10 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
expect(object.date[0] instanceof Date).toBeTrue();
expect(object.bar.date[0] instanceof Date).toBeTrue();
expect(object.foo.test.date[0] instanceof Date).toBeTrue();
const obj = await new Parse.Query('MyClass').first({useMasterKey: true});
expect(obj.get('date')[0] instanceof Date).toBeTrue();
expect(obj.get('bar').date[0] instanceof Date).toBeTrue();
expect(obj.get('foo').test.date[0] instanceof Date).toBeTrue();
});
it('handles updating a single object with array, object date', done => {