Patrick Steele-Idem 5df81440e5 Reorganized tests
2016-05-05 07:56:24 -07:00

19 lines
597 B
JavaScript

var nodePath = require('path');
var fs = require('fs');
exports.check = function(marko, markoCompiler, expect, done) {
var compiledPath;
try {
var templatePath = nodePath.join(__dirname, 'template.marko');
compiledPath = nodePath.join(__dirname, 'template.marko.js');
var template = require(templatePath);
delete require.cache[templatePath];
expect(fs.existsSync(compiledPath)).to.equal(true);
expect(template.renderSync({name: 'Frank'})).to.equal('Hello Frank!');
} finally {
fs.unlinkSync(compiledPath);
}
done();
};