import { MockElement } from '../test-support'; import { AppendHTMLSink } from './append-html-sink'; describe('AppendHTML Sink', () => { describe('Given any HTML', () => { it('appends to the innerHTML on sink', () => { const str1 = '
old text
'; const str2 = '
hello
'; const el = MockElement({ innerHTML: str1 }); const sink = AppendHTMLSink(el); sink(str2); expect(el.innerHTML).toEqual(str1 +str2); }); }); });