🏗 ✅ Isolate tests by eliminating the use of the global sinon sandbox#25587
🏗 ✅ Isolate tests by eliminating the use of the global sinon sandbox#25587rsimha merged 6 commits intoampproject:masterfrom rsimha:2019-11-14-GlobalSinon
sinon sandbox#25587Conversation
|
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 |
lannka
left a comment
There was a problem hiding this comment.
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
sinonpackage. 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:
sinonto v7.5.0sinonorsandboxin an AMP testdescribetests:window.sandboxto a new instance in the top-levelbeforeEach()window.sandboxin the top-levelafterEach()window.sandboxinstead of the globalsinonobjectdescribestests:env.sandboxis already reset to a new instance in thesetup()method ofSandboxFixtureenv.sandboxinstead of the globalsinonobjectatobandbtoacannot be found (Multiple runtime tests fail on Safari (Sauce Labs) becauseatobandbtoacan't be found #25621)Fixes #23842
Fixes #25371
Closes #23726
Closes #25588
Closes #25455
Related to #14360
Related to #23837
Related to #25621