Open samouri opened 3 years ago
I think just adding addEnabledExperiment
to the stub should fix it. We shouldn't be stubbing the service like this in the first place but 🤷
@gmajoulet: why shouldn't you be stubbing it? What is the ideal solution?
Installing the service like this and then spy/stub on specific methods would prevent issues like this ticket.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Description
npx amp unit --files=extensions/amp-story/1.0/amp-story.js
fails when reduce motion is enabled. I believe this is because it is the only codepath that utilizes the Performance service which needs to be stubbed.Error:
Source: https://github.com/ampproject/amphtml/blob/e16bbdaa94c2148ab8126238c26023ff5767675e/extensions/amp-story/1.0/amp-story.js#L456-L463
Reproduction Steps
cc @ampproject/wg-stories