mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 04:40:39 -07:00
fix #29
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ var Scope = {
|
||||
name = str.slice(i + 2, j);
|
||||
seq.push(name);
|
||||
name = '';
|
||||
i = j + 1;
|
||||
i = j + 2;
|
||||
}
|
||||
}
|
||||
// foo.bar
|
||||
|
||||
+7
-1
@@ -30,12 +30,18 @@ describe('scope', function() {
|
||||
expect(scope.propertyAccessSeq('foo[foo]'))
|
||||
.to.deep.equal(['foo', 'zoo']);
|
||||
});
|
||||
it('should handle nested access', function() {
|
||||
it('should handle nested access 1', function() {
|
||||
expect(scope.propertyAccessSeq('foo[bar.zoo]'))
|
||||
.to.deep.equal(['foo', 'coo']);
|
||||
});
|
||||
it('should handle nested access 2', function() {
|
||||
expect(scope.propertyAccessSeq('foo[bar["zoo"]]'))
|
||||
.to.deep.equal(['foo', 'coo']);
|
||||
});
|
||||
it('should handle nested access 3', function() {
|
||||
expect(scope.propertyAccessSeq('bar["foo"].zoo'))
|
||||
.to.deep.equal(['bar', 'foo', 'zoo']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#get()', function() {
|
||||
|
||||
Reference in New Issue
Block a user