-
Notifications
You must be signed in to change notification settings - Fork 478
Add owner field support to expo start #2329
Conversation
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.
Looks good, just a few inline comments.
export async function getSignedManifestStringAsync( | ||
manifest: ExpoConfig, | ||
currentSession: { sessionSecret: string } | ||
) { |
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.
) { | |
): Promise<string> { |
return response; | ||
} | ||
|
||
export function getUnsignedManifestString(manifest: ExpoConfig) { |
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.
export function getUnsignedManifestString(manifest: ExpoConfig) { | |
export function getUnsignedManifestString(manifest: ExpoConfig): string { |
expect(options.data.args).toEqual({ | ||
remoteUsername: mockManifest.owner, | ||
remotePackageName: mockManifest.slug, | ||
}); | ||
expect(options.data.manifest).toEqual(mockManifest); |
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.
Hmmm, it seems a little weird to me that you're calling expect
in a mock 🤔 I prefer to call expect
only in test cases. Maybe assert
would make more sense?
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.
Based on your feedback, I rewrote the mock so that the custom mock implementation is not needed at all and all the assertions are inside the test case. I think it made the test better, thanks!
Fixes #2242.