tiptap/tests/cypress/integration/extensions/bold.spec.ts
2020-10-08 14:39:44 +02:00

27 lines
603 B
TypeScript

/// <reference types="cypress" />
import {
starInputRegex,
starPasteRegex,
underscoreInputRegex,
underscorePasteRegex,
} from '@tiptap/extension-bold'
describe('bold regex test', () => {
it('star input regex matches', () => {
expect('**Test**').to.match(starInputRegex)
})
it('star paste regex matches', () => {
expect('**Test**').to.match(starPasteRegex)
})
it('underscore input regex matches', () => {
expect('__Test__').to.match(underscoreInputRegex)
})
it('underscore paste regex matches', () => {
expect('__Test__').to.match(underscorePasteRegex)
})
})