Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
✅ Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nlepage committed Sep 6, 2017
1 parent 82b8421 commit 51e48cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/toPath.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ describe('ToPath', () => {
expect(toPath('[0]["1.2"]')).toEqual([0, '1.2'])
expect(toPath('[0][\'[1.2]\']')).toEqual([0, '[1.2]'])
expect(toPath('[0]["[\\"1.2\\"]"]')).toEqual([0, '["1.2"]'])
expect(toPath('[0][1.2')).toEqual([0, '1', '2'])
expect(toPath('[0][1')).toEqual([0, '1'])
expect(toPath('[0][')).toEqual([0])
expect(toPath('[0][ ')).toEqual([0, ' '])
expect(toPath('[0][.')).toEqual([0, ''])
// TODO add erroneous
// TODO add unterminated escaped
})
Expand All @@ -40,6 +38,7 @@ describe('ToPath', () => {
expect(toPath('a.[0].["b.c"].666')).toEqual(['a', 0, 'b.c', '666'])
// TODO add slices
// TODO add erroneous (missing dot)
// TODO add unterminated (with mixed after)
})

it('should not convert array path', () => {
Expand Down

0 comments on commit 51e48cd

Please sign in to comment.