UNPKG

415 BJavaScriptView Raw
1var path = require('path')
2var assert = require('assert')
3var xTemplate = require('../')
4
5describe('Basic', function() {
6 it('should return `<p>hello world</p>` when the message is `hello world`', function() {
7 xTemplate.render(path.resolve(__dirname, 'demo.xtpl'), {
8 message: 'hello world'
9 }, function (err, result) {
10 // callback
11 assert.equal('<p>hello world</p>', result)
12 })
13 })
14})