Closed loomis closed 6 years ago
All the CI tests work for me on OS X, but I see that they have failed with AppVeyor on Windows. It appears to be an installation problem with slimerjs
. Unfortunately, I don't have a Windows machine to debug the problem, but if I can help validate this PR in some other way, please let me know.
For anyone wanting to workaround this problem and use the latest clojurescript, you can set the compiler option :process-shim false
when running your tests.
I've hit this error on ClojureScript 1.9.473, older than what this PR mentions. Using :process-shim false
didn't resolve the error on this particular version.
For whatever it's worth, I think the Slimer issue on AppVeyor can likely be solved by upgrading Slimer.
@miikka If you have an (easy?) way to do the slimerjs upgrade, let me know. I tried but quickly got stuck with the karma launcher pinning the slimerjs version and didn't see an easy fix for that.
@loomis, did you see #137? If that doesn't help, then I don't have an easy fix.
@miikka No, didn't see that. I've merged those changes in and the AppVeyor tests are passing now.
With the clojurescript release 1.9.854, a shim has been added for the
js/process
object. David Nolan has indicated that this will always present regardless of the target platform (Node.js, browser, etc.). Consequently, the existence of thejs/process
object cannot be used reliably to determine if the Node.js environment is being used.This change affects the
doo.runner
namespace, specifically the functionsnode?
andexit!
. Currently, with the 1.9.854 the testing process fails, after running the unit tests with the exception:This is caused by doo not finding the correct exit function, when targeting the browser.
This PR removes the
node?
function, as this doesn't reliably determine running on Node.js, and updates the logic for selecting the exit function to default to*exit-fn*
if one does not exist in thejs/process
object. This will continue to work correctly on Node.js, which provides a fulljs/process
object, and default to the*exit-fn*
when targeting the browser.