Skip to content

Commit

Permalink
feat: more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone committed May 2, 2023
1 parent 132daf1 commit dd6aefa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/common/__tests__/translate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ describe('QuoteProcessor', () => {
expect(targetText).toEqual(text)
})

it('should return the string without quote', () => {
const quoteProcessor = new QuoteProcessor()
const text = 'This is a test.'
const targetText = quoteProcessor.processText(
`${quoteProcessor.quoteStart}This${quoteProcessor.quoteStart} is ${quoteProcessor.quoteEnd}a${quoteProcessor.quoteStart} test.${quoteProcessor.quoteEnd}`
)
expect(targetText).toEqual(text)
})

it('should return the same string if no quote exists', () => {
const quoteProcessor = new QuoteProcessor()
const deltas = [
Expand Down

0 comments on commit dd6aefa

Please sign in to comment.