Skip to content
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

Attempt to test on IE 7 & 8 #301

Closed
wants to merge 1 commit into from

Conversation

ScottFreeCode
Copy link

This may not actually run the browser tests unless you pull it down locally or recreate it yourself in a branch on the original project rather than my fork -- I believe Travis + SauceLabs does not test PRs unless you've set it up to use JWT, for instance. I also don't know for certain that the test usage matches Mocha's Browserify-based usage.

That being said, if older versions of IE are meant to be supported we may as well try to see all the possible errors in one go instead of repeatedly running Mocha's tests and finding the next compatibility problem; hopefully this is a move in that direction.

(See #293 for discussion so far, and the latest example is:
https://travis-ci.org/mochajs/mocha/jobs/243848563#L2346
https://github.com/nodejs/readable-stream/blob/master/lib/_stream_readable.js#L189
)

@mcollina
Copy link
Member

mcollina commented Jun 23, 2017 via email

@mcollina
Copy link
Member

The only way this might be possie is if we want to selectively remove that property if it is not available, and let IE 7 & 8 run without the destroyed property. If that is even possible.

@calvinmetcalf
Copy link
Contributor

calvinmetcalf commented Jun 23, 2017 via email

@calvinmetcalf
Copy link
Contributor

calvinmetcalf commented Jun 23, 2017 via email

@ScottFreeCode
Copy link
Author

The only way this might be possie is if we want to selectively remove that property if it is not available, and let IE 7 & 8 run without the destroyed property. If that is even possible.

For mochas purposes just including a shim might fix

I think I'll give this a shot via shimming and see where it leads; I was hesitant to fiddle too much with defineProperty myself because, as far as I'm aware, it can't actually recreate the effects of getters and setters so a shim would have to either make them plain properties or not include them at all, but if that's the most reasonable thing to try, then I'm game! Thanks for the feedback.

Also thanks for getting Phantom fixed, in any case, since that means if we do end up having to drop older Internet Explorer we at least have the option of sticking with Phantom if we need to for some reason.

@mcollina
Copy link
Member

That feature is new, and it has been introduced in v2.3.0 (and Node 8). So, you are very likely not to use it. A solution on our side is to provide a fake (doing nothing) defineProperty. This means old browsers won't have the destroyed property, but it is a new addition anyway.

@ScottFreeCode
Copy link
Author

I just figured out that this is unlikely to be safely shimmable on Mocha's end. Since Object.defineProperty is global and readable-stream gets bundled into the browser version of Mocha (used not just by Mocha's own tests but by downstream users of Mocha), to polyfill it for Mocha as far as I can tell we'd have to effectively polyfill it for all browser tests using Mocha. If so, that would cause other projects' Mocha-based tests to pass in situations like this where defineProperty creates something that doesn't end up being used, even though the same code will fail in production on older browsers unless the application provides its own polyfill for Object.defineProperty.

@mcollina
Copy link
Member

mcollina commented Jul 9, 2018

Closing as we will not support IE 7 and IE 8 in readable-stream@3 (#344).

@mcollina mcollina closed this Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants