mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
fix: named params for filters, working on #113
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { test, liquid } from '../../../stub/render'
|
||||
|
||||
describe('filters/custom', function () {
|
||||
liquid.registerFilter('obj_test', function () {
|
||||
return JSON.stringify(arguments)
|
||||
})
|
||||
it('should support object', () => test(
|
||||
`{{ "a" | obj_test: k1: "v1", k2: foo }}`,
|
||||
'{"0":"a","1":["k1","v1"],"2":["k2","bar"]}'
|
||||
))
|
||||
it('should support mixed object', () => test(
|
||||
`{{ "a" | obj_test: "something", k1: "v1", k2: foo }}`,
|
||||
'{"0":"a","1":"something","2":["k1","v1"],"3":["k2","bar"]}'
|
||||
))
|
||||
})
|
||||
Reference in New Issue
Block a user