mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
enhancement: decrease dist size
This commit is contained in:
+1
-1
@@ -37,7 +37,7 @@ describe('filters', function() {
|
||||
it('should support ceil 3', () => test('{{ "3.5" | ceil }}', '4'));
|
||||
it('should support ceil 4', () => test('{{ 183.357 | ceil }}', '184'));
|
||||
|
||||
it('should support date', function() {
|
||||
it('should support date: %a %b %d %Y', function() {
|
||||
str = ctx.date.toDateString();
|
||||
return test('{{ date | date:"%a %b %d %Y"}}', str);
|
||||
});
|
||||
|
||||
+16
-3
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user