mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
fixes #88
This commit is contained in:
@@ -8,6 +8,7 @@ describe('scope', function () {
|
||||
beforeEach(function () {
|
||||
ctx = {
|
||||
foo: 'zoo',
|
||||
one: 1,
|
||||
bar: {
|
||||
zoo: 'coo',
|
||||
'Mr.Smith': 'John',
|
||||
@@ -46,6 +47,14 @@ describe('scope', function () {
|
||||
expect(scope.propertyAccessSeq('foo[0].bar'))
|
||||
.to.deep.equal(['foo', '0', 'bar'])
|
||||
})
|
||||
it('should handle nested access 5', function () {
|
||||
expect(scope.propertyAccessSeq('foo[one].bar'))
|
||||
.to.deep.equal(['foo', '1', 'bar'])
|
||||
})
|
||||
it('should handle nested access 6', function () {
|
||||
expect(scope.propertyAccessSeq('foo[two].bar'))
|
||||
.to.deep.equal(['foo', 'undefined', 'bar'])
|
||||
})
|
||||
})
|
||||
|
||||
describe('#get()', function () {
|
||||
|
||||
Reference in New Issue
Block a user