Skip to content

Commit

Permalink
Full test coverage in helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
presidenten committed Jun 10, 2017
1 parent 6b6a71b commit 2e6fc53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/helpers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ describe('helpers.getLocalPath', () => {
expect(helpers.getLocalPath('$parent/count', subState)).toEqual('foo$bar/choo$test/count');
});

it('replaces $root to root instance and $parent to parent instance', () => {
expect(helpers.getLocalPath('$root/$parent/count', subState)).toEqual('foo$bar/choo$test/count');
});

it('makes no changes when no keywords are used', () => {
expect(helpers.getLocalPath('foo/bar/piri/choo', state)).toEqual('foo/bar/piri/choo');
});
Expand Down

0 comments on commit 2e6fc53

Please sign in to comment.