'use strict'; // see also express.js var file = 'html\n' + ' head\n' + ' title!= title\n' + ' body\n' + ' h1!= message\n'; var pug = require('pug'); var fn = pug.compile(file, {}); var html = fn({ title: 'Hey', message: 'Hello there!' }); if (html === 'Hey' + '

Hello there!

') { console.log('ok'); }