mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 20:30:39 -07:00
use native path
This commit is contained in:
@@ -96,6 +96,17 @@ describe('liquid', function() {
|
||||
return expect(engine.renderFile('files/foo.html'))
|
||||
.to.eventually.equal('foo');
|
||||
});
|
||||
it('should default root to cwd', function(){
|
||||
var files = {};
|
||||
files[process.cwd() + '/foo.html'] = 'FOO';
|
||||
mock(files);
|
||||
|
||||
engine = Liquid({
|
||||
extname: '.html'
|
||||
});
|
||||
return expect(engine.renderFile('foo.html'))
|
||||
.to.eventually.equal('FOO');
|
||||
});
|
||||
it('should render file with context', function() {
|
||||
return engine.renderFile('/root/files/name.html', ctx).should.eventually.equal('My name is harttle.');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user