Skip to content

Commit

Permalink
Added test for regex expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Mate Hegedus committed Nov 20, 2017
1 parent 6bdf7e7 commit c529ef2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/__tests__/HashHistory-test.js
Expand Up @@ -271,5 +271,11 @@ describeHistory('a hash history', () => {
const history = createHistory({ basename: '/prefix' })
expect(history.location.pathname).toEqual('/')
})

it('allows URL with regex special characters', () => {
window.location.hash = '/prefix$special/hello'
const history = createHistory({ basename: '/prefix$special'})
expect(history.location.pathname).toEqual('/hello')
})
})
})

0 comments on commit c529ef2

Please sign in to comment.