mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
Size can also be used with dot notation (#25)
* Size can also be used with dot notation (for example, {{ my_string.size }}).
* Fixed test failed.
* Optimization
This commit is contained in:
@@ -221,6 +221,10 @@ describe('filters', function() {
|
||||
' | split: ", " %}{{ my_array | size }}',
|
||||
'4');
|
||||
});
|
||||
it('should also be used with dot notation - string',
|
||||
() => test('{% assign my_string = "Ground control to Major Tom." %}{{ my_string.size }}', '28'));
|
||||
it('should also be used with dot notation - array',
|
||||
() => test('{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}{{ my_array.size }}', '4'));
|
||||
});
|
||||
|
||||
describe('slice', function() {
|
||||
|
||||
Reference in New Issue
Block a user