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

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