import { processHtml } from 'src/services/tiny_post_html_processor/tiny_post_html_processor.service.js'
describe('TinyPostHTMLProcessor', () => {
describe('with processor that keeps original line should not make any changes to HTML when', () => {
const processorKeep = (line) => line
it('fed with regular HTML with newlines', () => {
const inputOutput = '1
2
3 4
5 \n 6 7
8
' expect(processHtml(inputOutput, processorKeep)).to.eql(inputOutput) }) it('fed with sorta valid HTML but tags aren\'t closed', () => { const inputOutput = 'just leaving a
p \nwithin
p!
and a3 4
5 \n 6 7
8
_
_\n__
_
' const output = '
_' expect(processHtml(input, processorReplace)).to.eql(output) }) it('fed with sorta valid HTML but tags aren\'t closed', () => { const input = 'just leaving a
p \nwithin
p!
and a_\n_
_
_