Skip to content

Commit

Permalink
test: Uncommend skipped tests now that happy-dom supports then
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmilton committed Oct 8, 2023
1 parent 36f41b3 commit 0da56f6
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions test/unit/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand Down

0 comments on commit 0da56f6

Please sign in to comment.