From 0da56f6a5279852e44871c268b6aa70e3816b3f3 Mon Sep 17 00:00:00 2001 From: Max Milton Date: Sun, 8 Oct 2023 12:04:05 +1100 Subject: [PATCH] test: Uncommend skipped tests now that happy-dom supports then --- test/unit/utils.test.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/test/unit/utils.test.ts b/test/unit/utils.test.ts index 7f5c8ac..df94fba 100644 --- a/test/unit/utils.test.ts +++ b/test/unit/utils.test.ts @@ -302,11 +302,7 @@ describe('onRemove', () => { expect(onRemove).toHaveLength(2); }); - // FIXME: Don't skip these tests. Currently happy-dom doesn't support the 2nd - // parameter in MutationObserver callbacks. Open an issue! - - // TODO: Don't skip this test. - test.skip('calls callback when watched element is removed', () => { + test('calls callback when watched element is removed', () => { const spy = mock(() => {}); const root = document.createElement('div'); document.body.appendChild(root); @@ -315,8 +311,7 @@ describe('onRemove', () => { expect(spy).toHaveBeenCalledTimes(1); }); - // TODO: Don't skip this test. - test.skip('calls callback when parent parent element is removed', () => { + test('calls callback when parent parent element is removed', () => { const spy = mock(() => {}); const root = document.createElement('div'); const parent = document.createElement('div'); @@ -329,8 +324,7 @@ describe('onRemove', () => { expect(spy).toHaveBeenCalledTimes(1); }); - // TODO: Don't skip this test. - test.skip('does not call callback when nested child element is removed', () => { + test('does not call callback when nested child element is removed', () => { const spy = mock(() => {}); const root = document.createElement('div'); const child = document.createElement('div'); @@ -341,8 +335,7 @@ describe('onRemove', () => { expect(spy).not.toHaveBeenCalled(); }); - // TODO: Don't skip this test. - test.skip('does not call callback when element is added or moved', () => { + test('does not call callback when element is added or moved', () => { const spy = mock(() => {}); const root = document.createElement('div'); const child = document.createElement('div');