coz-handlebars-engine
Version:
coz rendering engine with handlebars.
25 lines (19 loc) • 544 B
JavaScript
/**
* Test case for module:leaf/lib/util/compiling/compileHandlebars
* Runs with nodeunit.
*/
const precompileHandlebars = require('../lib/compiling/precompile_handlebars.js')
const assert = require('assert')
it('Compile handlebars file.', async () => {
assert.equal(precompileHandlebars(null), null)
let tmpl = precompileHandlebars('Here are {{toLowercase name}}.', {
helpers: {
toLowercase: function (str) {
return str.toLowerCase()
}
}
})
assert.ok(tmpl)
})
/* global describe, it */