kargo adapter tests failing in IE browsers
Type of issue
Bug
Description
Tests failing in IE browsers.
I think it because of usage of for of loop in afterEach hook.
kargo adapter tests
✗ works when all params and cookies are correctly set
expected { Object (timeout, currency, ...) } to deeply equal { Object (timeout, currency, ...) }
Error
at AssertionError (webpack:///node_modules/assertion-error/index.js:74:0 <- test/spec/modules/kargoBidAdapter_spec.js:11923:7)
at Assertion.prototype.assert (webpack:///node_modules/chai/lib/chai/assertion.js:107:0 <- test/spec/modules/kargoBidAdapter_spec.js:6683:7)
at assertEql (webpack:///node_modules/chai/lib/chai/core/assertions.js:520:0 <- test/spec/modules/kargoBidAdapter_spec.js:7234:5)
at ctx[name] (webpack:///node_modules/chai/lib/chai/utils/addMethod.js:41:0 <- test/spec/modules/kargoBidAdapter_spec.js:6265:5)
at assertEqual (webpack:///node_modules/chai/lib/chai/core/assertions.js:485:0 <- test/spec/modules/kargoBidAdapter_spec.js:7199:7)
at ctx[name] (webpack:///node_modules/chai/lib/chai/utils/addMethod.js:41:0 <- test/spec/modules/kargoBidAdapter_spec.js:6265:5)
at Anonymous function (webpack:///test/spec/modules/kargoBidAdapter_spec.js:270:4 <- test/spec/modules/kargoBidAdapter_spec.js:2654:5)
✗ "after each" hook
ReferenceError: 'Symbol' is undefined
at Anonymous function (webpack:///test/spec/modules/kargoBidAdapter_spec.js:58:4 <- test/spec/modules/kargoBidAdapter_spec.js:2410:12)
These test failures make Prebid releases harder to validate, and prevent us from automating them.
Other information
@samuelhorwitz
Interesting... that should be an easy fix but I'd like some guidance from the maintainers of this project about what ES6 features we should be allowed to use. My tests and my actual code make use of a ton of ES6 features and it's weird that for...of is the one that's causing an issue (versus let, =>, etc.)
Also it seems there is another error:
✗ works when all params and cookies are correctly set
expected { Object (timeout, currency, ...) } to deeply equal { Object (timeout, currency, ...) }
Could you expand on that equality failure? That seems to be separate. I don't have a Windows machine or one quickly available, I'll download the official VM in a bit and try to look into it, but since Kargo is mobile only and the tests by default were just running in PhantomJS (WebKit) I haven't really tested this stuff on IE at all.
EDIT: I'm seeing your collaborator tag now. So never mind the first part about asking the maintainers.
EDIT 2: I can't get the tests to run on the virtual machine I downloaded on account of not being able to allocate enough RAM to the VM for Node to launch Karma. I'll have to see if there are any Windows machines around the office and if not, I'm going to have to submit a PR blind and request someone else see if it actually fixes the issue.
Alright I got a real Windows machine, replicated the issue and fixed it. Even the failing test was related to for...of. Pull request at #1523.
@samuelhorwitz Thanks. We will see if for of can be included. But even i was surprised it was not transformed
The for .. of babel transform ouputs code which uses Symbol.iterator, which isn't supported in IE.
We'd have to include babel-polyfill in the runtime bundle, but that adds an extra 78K to the minified code size. Prebid today is only 70K (depending on how many adapters you include)... so that's a pretty steep price, given that efficiency is one of our core concerns.
Ah yes, that makes sense.
Closing as addressed in #1523