l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

load-test.js (547B)


      1 var vows = require("vows"),
      2     assert = require("assert"),
      3     smash = require("../");
      4 
      5 var suite = vows.describe("smash.load");
      6 
      7 suite.addBatch({
      8   "load": {
      9     "on a simple file": {
     10       topic: function() {
     11         smash.load(["test/data/forty-two"], "foo", this.callback);
     12       },
     13       "returns the evaluated expression": function(foo) {
     14         assert.strictEqual(foo, 42);
     15       },
     16       "does not pollute the global namespace": function(foo) {
     17         assert.equal(typeof bar, "undefined");
     18       }
     19     }
     20   }
     21 });
     22 
     23 suite.export(module);