mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
20 lines
417 B
JavaScript
20 lines
417 B
JavaScript
var nodePath = require("path");
|
|
|
|
exports.check = function (marko, markoCompiler, expect, snapshot, done) {
|
|
var templatePath = nodePath.join(__dirname, "template.marko");
|
|
var template = require(templatePath).default;
|
|
template.render(
|
|
{
|
|
name: "John",
|
|
},
|
|
function (err, result) {
|
|
if (err) {
|
|
return done(err);
|
|
}
|
|
|
|
snapshot(result.toString());
|
|
done();
|
|
},
|
|
);
|
|
};
|