Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsdom-testing-mocks",
"version": "1.15.0",
"version": "1.15.1",
"author": "Ivan Galiatin",
"license": "MIT",
"description": "A set of tools for emulating browser behavior in jsdom environment",
Expand Down
6 changes: 4 additions & 2 deletions src/mocks/web-animations-api/AnimationEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class MockedAnimationEffect implements AnimationEffect {
}
}

#getNormalizedDuration(): number {
// Changed from private (#getNormalizedDuration) to protected (_getNormalizedDuration)
// to allow access from child classes in all JavaScript environments
protected _getNormalizedDuration(): number {
// the only possible value is "auto"
if (typeof this.#timing.duration === 'string') {
return 0;
Expand All @@ -34,7 +36,7 @@ class MockedAnimationEffect implements AnimationEffect {

getComputedTiming(): ComputedEffectTiming {
// duration of the animation
const duration = this.#getNormalizedDuration();
const duration = this._getNormalizedDuration();

// Calculated as (iteration_duration * iteration_count)
const activeDuration =
Expand Down