-
Notifications
You must be signed in to change notification settings - Fork 425
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
test: add a test moving average decaying even without new data #1141
Conversation
d2313dd
to
c10ef40
Compare
test/playlist-selectors.test.js
Outdated
@@ -64,6 +65,50 @@ test('Exponential moving average has a configurable decay parameter', function(a | |||
assert.equal(playlist.attributes.BANDWIDTH, 50, 'selected the middle playlist'); | |||
}); | |||
|
|||
test('Calling exponential moing average wont decay average unless new bandwidth data was provided', function(assert) { |
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.
test('Calling exponential moing average wont decay average unless new bandwidth data was provided', function(assert) { | |
test('Calling exponential moving average won\'t decay average unless new bandwidth data was provided', function(assert) { |
scripts/rollup.config.js
Outdated
@@ -57,6 +59,11 @@ const options = { | |||
} | |||
defaults.module.unshift('replace'); | |||
|
|||
if (NO_TEST_BUNDLE) { | |||
defaults.module.unshift('strip'); |
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.
should we use rollup-plugin-stub
in tests to prevent having to remove stuff from the main build? This is what we do in video.js https://github.com/videojs/video.js/blob/main/test/unit/player.test.js#L947-L955
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.
Looked into this, I think that we don't want to use stub anymore. The repo is archived. Also, it adds a lot of time to the build.
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.
Don't we want to always strip this code from the module/browser build? I think we can just remove the if statement and always add the strip plugin.
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.
yeah, seem reasonable. I think I wasn't sure exactly how the test/mobule/browser builds stuff worked when I first added this.
No description provided.