import { processPastedHtml } from './resourceHandling'; describe('resourceHandling', () => { it('should sanitize pasted HTML', async () => { const testCases = [ ['Test: ', 'Test: '], ['test', 'test'], ['evil()', ''], ['', ''], [ '', '', ], ]; for (const [html, expected] of testCases) { expect(await processPastedHtml(html)).toBe(expected); } }); });