There is no flag to tall Mocha to ignore such lines. Some options that come to mind:
Use a build system like Grunt to generate pure JS files from your ExtendScript files, and then have Mocha run on result of the transformation.
Hook into the
--compilers
option. You would have to register an ExtendScript compiler with Node.js or create your own fake compiler that just strips out the#include
directives and register this compiler with Node.js. A good example of how to register such compiler is provided by CoffeeScript.
I think the first method would be safest because looking at Node.js' documentation, I see that the way CoffeeScript register's itself is marked "deprecated".