-
Notifications
You must be signed in to change notification settings - Fork 30
test: Fix tests running in Node 6.0 #20
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
Conversation
Symbol.toStringTag is an available read only property in Node 6. The tests overwrite the property and as such were failing in Node 6.0. This fixes the tests so that they don't assign on Symbol if the property already exists. It also alters the tests to use Symbol.toStringTag proper, rather than the sham string - so that when toStringTag actually exists, it is actually used rather than the sham; allowing tests to pass in environments which support toStringTag for real.
|
The whole logic looks correct to me, it really fixes what you've described. |
|
|
|
@keithamus ah, makes total sense, I should've read the whole code, sorry for that |
|
@lucasfcosta @keithamus : Sorry for the delayed response - there is lots on my desk right now. The lgtm is still pending though - should I merge this manually anyways? LGTM |
|
I think because @lucasfcosta didn't actually say |
|
And now its not, because I said |
|
@keithamus : Perfect and thanks! 😄 |
|
Oh sorry, I totally forgot about |
Symbol.toStringTag is an available read only property in Node 6. The tests overwrite the property
and as such were failing in Node 6.0. This fixes the tests so that they don't assign on Symbol
if the property already exists.
It also alters the tests to use Symbol.toStringTag proper, rather than the sham string - so that
when toStringTag actually exists, it is actually used rather than the sham; allowing tests to pass
in environments which support toStringTag for real.
@lucasfcosta @davelosert if you could please check this over and merge when happy 😄