feat: Upgrade to Parse JS SDK 6.0.0 (#9624)

BREAKING CHANGE: This upgrades to the Parse JS SDK 6.0.0. See the [change log](https://github.com/parse-community/Parse-SDK-JS/releases/tag/6.0.0) of the Parse JS SDK for breaking changes and more details.
This commit is contained in:
Daniel
2025-03-03 10:47:40 +11:00
committed by GitHub
parent 275fe3782b
commit bf9db75e86
6 changed files with 144 additions and 45 deletions

View File

@@ -3494,9 +3494,17 @@ describe('afterLogin hook', () => {
expect(req.object._context).not.toBeDefined();
expect(req.object.context).not.toBeDefined();
});
const obj = new TestObject();
obj.set('_context', { hello: 'world' });
await obj.save(null, { context: { a: 'a' } });
await request({
url: 'http://localhost:8378/1/classes/TestObject',
method: 'POST',
headers: {
'X-Parse-Application-Id': 'test',
'X-Parse-REST-API-Key': 'rest',
'X-Parse-Cloud-Context': '{"a":"a"}',
},
body: JSON.stringify({_context: { hello: 'world' }}),
});
});
it('should have access to context when saving a new object', async () => {