mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
BREAKING CHANGE: remove default export, now should be used like import
{Liquid} from 'liquidjs'
22 lines
547 B
TypeScript
22 lines
547 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
|
|
})
|
|
})
|
|
it('should be used to read templates', function () {
|
|
return engine.renderFile('files/foo')
|
|
.then(x => expect(x).to.equal('test file content'))
|
|
})
|
|
})
|