title: Testing Closure Compiler output under Node.js
body: <p>I'd like to use Vows to test DOM-free JavaScript code, ideally directly running against the compiled JS.
  My Vows are written in CoffeeScript, but I'm not sure how to load my JS; I've tried just inlining it using <code>eval</code>:</p>
  
  <pre><code>vows = require "vows"
  assert = require "assert"
  eval('var e=this;function f(a,g){var c=a.split("."),b=e;!(c[0]in b)&amp;&amp;b.execScript&amp;&amp;b.execScript("var "+c[0]);for(var d;c.length&amp;&amp;(d=c.shift());)!c.length&amp;&amp;g!==void 0?b[d]=g:b=b[d]?b[d]:b[d]={}}function h(a){a.call(e)};(function(){var a;a={};h(function(){a=function(a){this.a=a};a.prototype.b=function(a){return this.a+a.a};f("Cl.LinearExpression",a);f("Cl.LinearExpression.prototype.plus",a.prototype.b)})}).call(this);');
  
  vows
    .describe("Linear Expression")
    .addBatch
      "initialized with a number":
        topic: -&gt; new Cl.LinearExpression 5
  
        "adds up with scalar": (cle) -&gt; assert.equal 7, cle.plus 2
  
    .export(module)
  </code></pre>
  
  <p>but I get "ReferenceError: Cl is not defined".
  Running the minified JS and <code>new Cl.LinearExpression(5);</code> in a browser console works fine, so the compiled code is okay.
  What's the best way to load JS into node for testing by Vows?</p>