-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Refactor dynamic fields test ts sdk #7715
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
expect(dynamic_fields.nextCursor).not.toEqual(null); | ||
return await toolbox.provider | ||
.getDynamicFields(parent_objectID, null, 1) | ||
.then(async function (dynamic_fields) { |
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.
.then(async function (dynamic_fields) { | |
.then(async function (dynamicFields) { |
The convention in TypeScript is to use camelCase for variable naming, could you fix it for all variables in this file?
@@ -106,5 +106,5 @@ export async function publishPackage( | |||
const publishEvent = getEvents(publishTxn).filter( | |||
(e: any) => 'publish' in e | |||
)[0]; | |||
return publishEvent.publish.packageId.replace(/^0x(0+)/, '$1'); | |||
return publishEvent.publish.packageId.replace(/^0x(0+)/, '0x'); |
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.
Thanks for fixing this! I made a typo here, should be replace(/(^0x)(0+)/, '0x');
instead of replace(/^0x(0+)/, '0x');
. Your change here is clearer
|
||
return await toolbox.provider | ||
.getDynamicFields(parent_objectID, dynamic_fields.nextCursor, null) | ||
.then(function (dynamic_fields2) { | ||
expect(dynamic_fields2.data.length).greaterThanOrEqual(0); | ||
}); | ||
}); |
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 actually don't think the refactoring of mixing await with callback makes sense. The bug seems to be in the backend rather than here
No description provided.