import '@testing-library/jest-dom'; import $, {VeamsQueryObject} from '../src'; test('remove() - check for elements to be removed', () => { document.body.innerHTML = `

text content 2

text content 2
text content 3
`; const $targetEls: VeamsQueryObject = $('.target-el'); const testEl: HTMLElement = document.getElementById('test-el'); const testEl2: HTMLElement = document.getElementById('test-el-2'); $targetEls.remove(); expect(testEl.children).toHaveLength(1); expect(testEl.children[0].tagName).toBe('DIV'); expect(testEl2.children).toHaveLength(0); });