Skip to content

Commit

Permalink
test: some more object path tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Jan 5, 2017
1 parent c4b7277 commit 2280d85
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/simple_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,23 @@ describe('expander', () => {
constants: {
myObject: {
level1: {
level2: 'val1'
level2: 'val2'
}
},
}
}).then(r => assert.equal(r, 'val1')));
}).then(r => assert.equal(r, 'val2')));
});

describe('combined paths', () => {
it('access several levels', () => expand("${myObject.level1[1].level2}", {
constants: {
myObject: {
level1: [
{},
{level2: 'val2'}
]
},
}
}).then(r => assert.equal(r, 'val2')));
});
});

0 comments on commit 2280d85

Please sign in to comment.