Skip to content

Commit

Permalink
test: test for case insensitivity
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <[email protected]>
  • Loading branch information
elzody committed May 21, 2024
1 parent 451f2cf commit 0b79206
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/tests/plugins/searchDecorations.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { runSearch, highlightResults } from '../../plugins/searchDecorations.js'
import { createCustomEditor } from '../helpers.js'
import { Decoration, DecorationSet } from '@tiptap/pm/view'

describe('search plugin', () => {
it('finds no matches in empty document', () => {
Expand All @@ -20,7 +19,15 @@ describe('search plugin', () => {
})

it('finds matches regardless of case', () => {
return false
testSearch(
'<p>CATS birds crocodiles cats platypus CAts</p>',
'cAtS',
[
{ from: 1, to: 5 },
{ from: 23, to: 27 },
{ from: 37, to: 41 },
]
)
})

it('finds matches in one block', () => {
Expand Down

0 comments on commit 0b79206

Please sign in to comment.