test: test case for array index, #201

This commit is contained in:
harttle
2020-03-11 01:09:58 +08:00
parent 8f05784a0c
commit 0f25017d5d
@@ -7,6 +7,13 @@ describe('filters/array', function () {
beforeEach(function () {
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 () {
it('should support join', function () {
const src = '{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}' +