mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
refactor: strictly typed
This commit is contained in:
@@ -3,7 +3,7 @@ import Liquid from 'src/liquid'
|
||||
import { mock, restore } from 'test/stub/mockfs'
|
||||
|
||||
describe('LiquidOptions#cache', function () {
|
||||
let engine
|
||||
let engine: Liquid
|
||||
beforeEach(function () {
|
||||
engine = new Liquid({
|
||||
root: '/root/',
|
||||
|
||||
@@ -33,14 +33,14 @@ describe('Liquid', function () {
|
||||
})
|
||||
after(restore)
|
||||
it('should render single template', function (done) {
|
||||
render.call({ root: '.' }, 'foo', null, (err, result) => {
|
||||
render.call({ root: '.' }, 'foo', null as any, (err: Error | null, result: string | undefined) => {
|
||||
if (err) return done(err)
|
||||
expect(result).to.equal('foo')
|
||||
done()
|
||||
})
|
||||
})
|
||||
it('should render single template with Array-typed root', function (done) {
|
||||
render.call({ root: ['.'] }, 'foo', null, (err, result) => {
|
||||
render.call({ root: ['.'] }, 'foo', null as any, (err: Error | null, result: string | undefined) => {
|
||||
if (err) return done(err)
|
||||
expect(result).to.equal('foo')
|
||||
done()
|
||||
|
||||
@@ -2,7 +2,7 @@ import Liquid from 'src/liquid'
|
||||
import { expect } from 'chai'
|
||||
|
||||
describe('LiquidOptions#strict_*', function () {
|
||||
let engine
|
||||
let engine: Liquid
|
||||
const ctx = {}
|
||||
beforeEach(function () {
|
||||
engine = new Liquid({
|
||||
|
||||
Reference in New Issue
Block a user