mirror of
https://github.com/harttle/liquidjs.git
synced 2026-10-03 09:05:14 -07:00
test: test case for array index, #201
This commit is contained in:
@@ -7,6 +7,13 @@ describe('filters/array', function () {
|
|||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
liquid = new Liquid()
|
liquid = new Liquid()
|
||||||
})
|
})
|
||||||
|
describe('index', function () {
|
||||||
|
it('should support index', function () {
|
||||||
|
const src = '{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}' +
|
||||||
|
'{{ beatles[1] }}'
|
||||||
|
return test(src, 'Paul')
|
||||||
|
})
|
||||||
|
})
|
||||||
describe('join', function () {
|
describe('join', function () {
|
||||||
it('should support join', function () {
|
it('should support join', function () {
|
||||||
const src = '{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}' +
|
const src = '{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}' +
|
||||||
|
|||||||
Reference in New Issue
Block a user