#2670 NodeRunner does not work on Windows

SlimerDude Sat 20 Jan

To run Fantom tests in a Javascript environment the -js argument is used:

C:\> fant -js myPod::MyTest

which recently switched from Java's default Nashorn scripting engine to NodeJS and now uses the NodeRunner class.

Unfortunately compilerJs::NodeRunner is not Windows compatible as the first line is hard coded to execute a nix command:

if (Process(["which", "-s", "node"]).run.join != 0) { ... }

and Fant.java itself is hardcoded to use NodeRunner:

new Fan().execute("compilerJs::NodeRunner", t);

It'd be nice if some of this functionality (the Runner implementation and NodeJS location) could be configurable in some way to work on Windows.

matthew Mon 22 Jan

Yeah - this code is just a sanity check to see if node is installed. I will make a change to wrap this code in os-environment check. The actual code that runs node for testing should work already

matthew Mon 22 Jan

Ticket promoted to #2670 and assigned to matthew

matthew Mon 22 Jan

Ticket resolved in 1.0.71

We now issue an os-appropriate command for checking for the presence of Node.js

Login or Signup to reply.