1 | var path = require('path')
|
2 | var assert = require('assert')
|
3 | var xTemplate = require('../')
|
4 |
|
5 | describe('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 | })
|