mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 06:20:38 -07:00
feat: add preserveTimezones option
This commit is contained in:
+5
-4
@@ -1,16 +1,17 @@
|
||||
import { Liquid } from '../../src/liquid'
|
||||
import { LiquidOptions } from '../../src/liquid-options'
|
||||
import { expect } from 'chai'
|
||||
|
||||
export const liquid = new Liquid()
|
||||
|
||||
export function render (src: string, ctx?: object) {
|
||||
return liquid.parseAndRender(src, ctx)
|
||||
export function render (src: string, ctx?: object, opts?: LiquidOptions) {
|
||||
return liquid.parseAndRender(src, ctx, opts)
|
||||
}
|
||||
|
||||
export async function test (src: string, ctx: object | string, dst?: string) {
|
||||
export async function test (src: string, ctx: object | string, dst?: string, opts?: LiquidOptions) {
|
||||
if (dst === undefined) {
|
||||
dst = ctx as string
|
||||
ctx = {}
|
||||
}
|
||||
return expect(await render(src, ctx as object)).to.equal(dst)
|
||||
return expect(await render(src, ctx as object, opts)).to.equal(dst)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user