Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Hernandez committed Apr 1, 2024
1 parent 2a33db8 commit e49501b
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,15 @@ describe('addQuotesAndDistance', () => {
describe('replaceReservedChars', () => {
it('should replace reserved characters with empty space', () => {
expect(
replaceReservedChars('foo: [bar] (baz) - 1 ^ 2 <> 3 !$ 4,5')
).toEqual('foo bar baz 1 2 3 4 5')
replaceReservedChars(
'foo| [bar!] (baz) {1} ^ 2 <> 3 !$ 4,5 ~house *lamp;, me'
)
).toEqual('foo bar baz 1 2 3 4 5 house lamp me')
})
it('should escape reserved characters', () => {
expect(replaceReservedChars('foo+ bar- baz= :house /lamp')).toEqual(
'foo\\+ bar\\- baz\\= \\:house \\/lamp'
)
})
})

Expand Down

0 comments on commit e49501b

Please sign in to comment.