Welcome to mirror list, hosted at ThFree Co, Russian Federation.

foo.js « compiler « test « mocha-3.1.0 « lib « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b13101a77bdd45d9c5336cbe612e39eda12fb355 (plain)
1
2
3
4
5
6
7
8
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() { '
    + content + '.should.eql(1); }); });';
  return module._compile(test, filename);
};