mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
refactor: remove use of internal Context class in evalValue argument
BREAKING CHANGE: `evalValue` won't support `Context` as second argument anymore.
This commit is contained in:
+1
-11
@@ -1,5 +1,5 @@
|
||||
import { expect } from 'chai'
|
||||
import { Context, Liquid } from '../..'
|
||||
import { Liquid } from '../..'
|
||||
|
||||
describe('#evalValue()', function () {
|
||||
var engine: Liquid
|
||||
@@ -19,14 +19,4 @@ describe('#evalValue()', function () {
|
||||
const val = await engine.evalValue('foo')
|
||||
expect(val).to.equal('FOO')
|
||||
})
|
||||
|
||||
it('should support passing Context', async function () {
|
||||
const val = await engine.evalValue('a > b', new Context({ a: 1, b: 2 }))
|
||||
expect(val).to.equal(false)
|
||||
})
|
||||
|
||||
it('should respect options in passed in Context', async function () {
|
||||
const val = await engine.evalValue('foo', new Context({}, { globals: { foo: 'BAR' } } as any))
|
||||
expect(val).to.equal('BAR')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user