-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Fix sign up user in cloud function #7351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: alpha
Are you sure you want to change the base?
Conversation
@Yurgal You can click on "Details" to open the test log and see why it failed:
|
spec/ParseUser.spec.js
Outdated
@@ -4031,4 +4031,30 @@ describe('Security Advisory GHSA-8w3j-g983-8jh5', function () { | |||
const user = await query.get('1234ABCDEF', { useMasterKey: true }); | |||
expect(user.get('authData')).toEqual({ custom: { id: 'linkedID' } }); | |||
}); | |||
|
|||
describe('issue #6641', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you either move the test into an existing describe
group where this fest fits thematically, or if there is no such group, rename this describe group with a short description as you see in the other groups?
If I understand correctly, since the focus here is on auth via cloud code, I would see this test rather in an auth or cloud code spec file. Can you take a look whether there are any tests in auth files that are similar to what you are testing? That would be an indication that your test belongs there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it in Auth
spec/ParseUser.spec.js
Outdated
}) | ||
.then(() => done()) | ||
.catch(() => { | ||
fail(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need any fail(), done(), these should be avoided when possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to properly handle the catch issue without fail()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- for exceptions use expect().toThrow()
- for promise rejections use expect().toBeRejected()
hi @mtrezza I added a new test. As explain in the java documentation, |
@Yurgal You have to signUp with the installationId otherwise how will login find the user? See tests cases https://github.com/parse-community/Parse-SDK-JS/pull/1031/files |
|
New Pull Request Checklist
Issue Description
Trying to logIn a user using the
masterKey
and theinstallationId
without using thepassword
Related issue: #6641
Approach
TODOs before merging