Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago Porto committed Jun 4, 2020
1 parent 4c461e1 commit f3dd9a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions parser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ describe('parse(', () => {
expect(JSON.stringify(result) === '{"2":{"b":{"c":"2.b.c"}},"a":{"b":"a.b"}}').toBeTruthy()
})

it('Should return key to two levels object and prefix', () => {
const result = parse({ a: { b: "Text Note" } }, 'prefix:')

expect(JSON.stringify(result) === '{"a":{"b":"prefix:a.b"}}').toBeTruthy()
})

})

0 comments on commit f3dd9a2

Please sign in to comment.