import { BLOCKS } from '../../blocks' ; import { INLINES } from '../../inlines' ; import { isBlock , isInline } from '../../helpers' ; test ( 'isBlock' , ( ) => { const block = { nodeType : BLOCKS . PARAGRAPH } ; const nonBlock = { nodeType : 'Paragraph' } ; const nonBlock2 = { nodeType : undefined } ; expect ( isBlock ( block ) ) . toBe ( true ) ; expect ( isBlock ( nonBlock ) ) . toBe ( false ) ; expect ( isBlock ( nonBlock2 ) ) . toBe ( false ) ; } ) ; test ( 'isInline' , ( ) => { const inline = { nodeType : INLINES . HYPERLINK } ; const noninline = { nodeType : 'Hyperlink' } ; const noninline2 = { nodeType : undefined } ; expect ( isInline ( inline ) ) . toBe ( true ) ; expect ( isInline ( noninline ) ) . toBe ( false ) ; expect ( isInline ( noninline2 ) ) . toBe ( false ) ; } ) ;