enhancement: decrease dist size

This commit is contained in:
harttle
2016-10-04 22:31:28 +08:00
parent 1e1b6e8cc3
commit 77930e2d20
30 changed files with 2724 additions and 3934 deletions
+16 -3
View File
@@ -74,15 +74,28 @@ describe('liquid', function() {
it('should render file', function() {
return engine.renderFile('/root/files/foo.html', ctx).should.eventually.equal('foo');
});
it('should render file relative to root', function() {
return engine.renderFile('files/foo.html', ctx).should.eventually.equal('foo');
it('should accept relative path', function() {
return expect(engine.renderFile('files/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.');
});
it('should render file with default extname', function() {
it('should use default extname', function() {
return engine.renderFile('files/name', ctx).should.eventually.equal('My name is harttle.');
});
it('should accept root with no trailing slash', function(){
engine = Liquid({
root: '/root',
extname: '.html'
});
return expect(engine.renderFile('files/foo.html')).to.eventually.equal('foo');
});
it('should accept dot path', function(){
return expect(engine.renderFile('./files/foo.html')).to.eventually.equal('foo');
});
it('should accept double-dot path', function(){
return expect(engine.renderFile('files/foo/../foo.html')).to.eventually.equal('foo');
});
});
describe('#express()', function() {
it('should render templates', function() {