-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(FEC-8975): QoS Kava Enhancements - leftovers #36
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.
and please check flow and tests, they are failing
src/kava-event-model.js
Outdated
@@ -46,6 +46,10 @@ export const KavaEventModel: {[event: string]: KavaEvent} = { | |||
eventModel.targetBuffer = model.getTargetBuffer(); | |||
} | |||
|
|||
if (model.networkConnectionType != '') { |
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.
if (model.networkConnectionType != '') { | |
if (model.networkConnectionType() !== '') { |
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 also see that model.getDroppedFramesRatio()
doesn't have explicit type check, please always use explicit equality checks if (model.getDroppedFramesRatio() !== null) {
same for getDroppedFramesRatio
check
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 quite understand why. first of all I control the data in the of the networkConnectionType in the model so i don't expect it to be undefined or null and anyway undefined != '' is equal to undefined !==''
@@ -432,6 +477,8 @@ describe('KavaPlugin', function() { | |||
}); | |||
|
|||
it('should send VIEW event', done => { | |||
sandbox.stub(window.navigator.connection, 'effectiveType').value('2g'); |
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.
we are missing tests for conditional data, what if connection doesn't exist?
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.
So you want me to add a test and force connection to be undefined?
adding networkConnectionType + restoring playerJSLoadTime unit test