How to use the jsrender.__express function in jsrender

To help you get started, we’ve selected a few jsrender examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BorisMoore / jsviews.com / test / unit-tests / tests-node.js View on Github external
QUnit.test("jsrender.renderFile / jsrender.__express", function(assert) {
	var html = jsrender.renderFile('./test/templates/name-template.html', {name: "Jo"});
	assert.equal(html, "Name: Jo (name-template.html)", 'jsrender.renderFile("./file.path.html", data) loads and renders template');

	html = jsrender.__express('./test/templates/name-template.html', {name: "Jo"});
	assert.equal(html, "Name: Jo (name-template.html)", 'jsrender.__express("./file.path.html", data) loads and renders template');
});

jsrender

Best-of-breed templating in browser or on Node.js (with Express 4, Hapi and Browserify integration)

MIT
Latest version published 4 months ago

Package Health Score

70 / 100
Full package analysis