Files
liquidjs/test/integration/liquid/fs-option.ts
T
harttle ba5ff3f41c feat: full syntax for strftime, close #177
- strftime syntax: <flags><width><modifier><conversion>
- new conversions: %n, %t
- fixed conversions: %N
- flags: _ ^ - 0 # :
- modifiers: E, O (ignored)
2019-12-15 02:28:33 +00:00

22 lines
554 B
TypeScript

import { expect } from 'chai'
import { Liquid } from '../../../src/liquid'
describe('LiquidOptions#fs', function () {
let engine: Liquid
const fs = {
exists: () => Promise.resolve(true),
readFile: () => Promise.resolve('test file content'),
resolve: () => 'resolved'
}
beforeEach(function () {
engine = new Liquid({
root: '/root/',
fs
} as any)
})
it('should be used to read templates', function () {
return engine.renderFile('files/foo')
.then(x => expect(x).to.equal('test file content'))
})
})