mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
chore: migrate test cases from Chai to Jest
This commit is contained in:
+2
-3
@@ -1,6 +1,5 @@
|
||||
import { Liquid } from '../../src/liquid'
|
||||
import { LiquidOptions } from '../../src/liquid-options'
|
||||
import { expect } from 'chai'
|
||||
|
||||
export const liquid = new Liquid()
|
||||
|
||||
@@ -15,6 +14,6 @@ export async function test (src: string, ctx: object | string, expected?: string
|
||||
}
|
||||
const engine = opts ? new Liquid(opts) : liquid
|
||||
const result = await engine.parseAndRender(src, ctx as object)
|
||||
if (expected instanceof RegExp) return expect(result).to.match(expected)
|
||||
return expect(result).to.equal(expected)
|
||||
if (expected instanceof RegExp) return expect(result).toMatch(expected)
|
||||
return expect(result).toBe(expected)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user