@mfikes I'm actually surprised it ever worked - since setTimeout isn't a generally available thing
I think we should probably modify that test to only run if it's present since I believe it's a hard requirement?
Ahh, yeah... that seems like a decent argument... it is depending on something not guaranteed.
To be honest, I tried to find what setTimeout
is supposed to return... it is hard to find a real spec.
hrm I also surprised that exists?
doesn't treat undefined
and null
as equivalent
it really should since you can't use it otherwise
it's not a map test thing, it's for checking for the presence of globals
hrm my reading says exists?
should work for undefined
I left a comment (on the issue)
@mfikes setTimeout
is supposed to return a number identifying the timeout which you may then use via clearTimeout(theNum)
to cancel it. not sure if number is actually part of a spec but any kind of opaque value would do the same job, just not undefined 😛
Right... if you look at what Node does, it doesn't return a number. But given that, I went to see if I can find a spec that says that the result will be not undefined, and found it challenging. I suspect that this JSC build may have setTimeout
(unless David's comments above regarding exists?
lead to something), but that its implementation is botched.
@mfikes oh I think I misunderstood that detail - that setTimeout exists but that doesn't return the usual value
Yeah... my last comment in the ticket was only about distinguishing whether it is returning null
or undefined
.
^ ticket for
(ns foo.bar
(:require-macros [foo.baz :refer [macro-that-expands-to-require]]))
(macro-that-expands-to-require)
including a working patch. The patch will presumably not pass mustard but consider it a starting point for further conversation on how to best solve this.@plexus One thought: There is a cljs.macro-test
namespace that might be suitable for adding a test to (and if done, that will also ensure that things work for self-hosted)