From 0f25017d5d9861f99b7783f488b1c11f8c7f36fe Mon Sep 17 00:00:00 2001 From: harttle Date: Wed, 11 Mar 2020 00:30:20 +0800 Subject: [PATCH] test: test case for array index, #201 --- test/integration/builtin/filters/array.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/integration/builtin/filters/array.ts b/test/integration/builtin/filters/array.ts index 344ac335a..3d47dab87 100644 --- a/test/integration/builtin/filters/array.ts +++ b/test/integration/builtin/filters/array.ts @@ -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: ", " %}' +