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
🏗 ✅ Isolate tests by eliminating the use of the global sinon
sandbox
#25587
Conversation
Hey @gmajoulet, these files were changed:
Hey @newmuis, these files were changed:
|
@lannka @jridgewell @choumx At long last, I've managed to get all 10,000+ unit tests to pass on Linux with an upgraded While I go through the rest of the test runs to make sure nothing else is broken, can I get you folks to review this? (I'll rebase before merging to resolve any new conflicts.) |
Friday EoD update: The only remaining failures have to do with /cc @ampproject/wg-runtime |
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.
Wow, that's a big change. Thanks for handling this. Looked at the description, I think we're on the right route!
Still blocked by the |
@jridgewell I've managed to get this PR to pass all local and remote tests (modulo the Can you give this a once over and let me know if it's good to merge? |
The majority of AMP's tests reuse a single global sandbox instance provided by the
sinon
package. From looking at test code, there's a fair amount of inconsistency in how different tests create (sometimes), use, and clean up (not always) their sandbox.This PR picks up where #23726 left off, and does the following:
sinon
to v7.5.0sinon
orsandbox
in an AMP testdescribe
tests:window.sandbox
to a new instance in the top-levelbeforeEach()
window.sandbox
in the top-levelafterEach()
window.sandbox
instead of the globalsinon
objectdescribes
tests:env.sandbox
is already reset to a new instance in thesetup()
method ofSandboxFixture
env.sandbox
instead of the globalsinon
objectatob
andbtoa
cannot be found (Multiple runtime tests fail on Safari (Sauce Labs) becauseatob
andbtoa
can't be found #25621)Fixes #23842
Fixes #25371
Closes #23726
Closes #25588
Closes #25455
Related to #14360
Related to #23837
Related to #25621