tiptap/tests/cypress/integration/extensions/bold.spec.ts

27 lines
603 B
TypeScript
Raw Normal View History

2020-10-08 20:39:44 +08:00
/// <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)
})
})