-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
chore: enable lint on tests for api, interactions, predictions, pubsub packages #13547
base: main
Are you sure you want to change the base?
Conversation
1. api 2. interactions 3. predictions 4. pubsub
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.
Approving changes to API.test.ts
@@ -229,7 +233,7 @@ export class FakeWebSocketInterface { | |||
/** | |||
* Send a data message | |||
*/ | |||
async sendDataMessage(data: {}) { | |||
async sendDataMessage(data: object) { |
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.
Is this right? Can data be a 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.
Noticeably this function is not even used by the tests.
@@ -370,7 +366,7 @@ export async function replaceConstant( | |||
replacementValue: any, | |||
testFn: () => Promise<void>, | |||
) { | |||
const initialValue = constants[name]; | |||
const initialValue = (constants as any)[name]; |
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.
why cast as any than their actual types?
Description of changes
Issue #, if available
Description of how you validated changes
Checklist
yarn test
passesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.