Remove Karma flakiness by providing browser shims#1119
Remove Karma flakiness by providing browser shims#1119lelandrichardson wants to merge 2 commits intomasterfrom
Conversation
| * to tell karma to run a file before everything else. This is the next best | ||
| * thing I guess... | ||
| */ | ||
| const isBrowser = typeof window !== 'undefined' && |
There was a problem hiding this comment.
Why is a typeof window check not sufficient?
There was a problem hiding this comment.
because we screw that up w/ jsdom.
| Object.prototype.toString.call(window) === '[object Window]'; | ||
|
|
||
| if (isBrowser) { | ||
| require('airbnb-browser-shims'); |
There was a problem hiding this comment.
This is actually both safe to require in node, and recommended to do so.
There was a problem hiding this comment.
hmm. doing so caused many issues. perhaps it's related to jsdom?
There was a problem hiding this comment.
Ah, yeah true, that makes sense.
|
This appears to have not actually fixed the flakiness.... so it seems like this is not the reason for the karma flakiness :/ |
|
@lelandrichardson it did fix flakiness caused by lack of polyfills,it just didn't fix the other cause of flakiness,some tests appear to cause a full page reload. This should still be merged |
|
@nfcampos any thoughts on how to fix the page reload issue? It'd be nice to fix karma in a single PR if possible. |
212f345 to
11d153e
Compare
|
Rebased this on top of #1096. |
40cc703 to
0a17404
Compare
2227326 to
0d5ead7
Compare
43eb75e to
39e6b1f
Compare
This fixes the travis karma flakiness, and removes the allowed failure. This does this by adding in airbnb-browser-shims to the karma tests so that we don't have to worry about which version of chrome they are running on.