Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

357 B
Raw Blame
"use strict";

var fs = require("fs");

require.extensions[".foo"] = function (module, filename) {
  var content;
  content = fs.readFileSync(filename, "utf8");
  var test =
    'describe("custom compiler",function(){ it("should work",function() { ' +
    "expect(" +
    content +
    ', "to be", 1); }); });';
  return module._compile(test, filename);
};