-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Hi,
the #jsdom IRC channel told me to open an issue about this:
I'm unable to (completely) delete a window property that I added myself. The value will remain the same.
Failing test case:
specify("Create, modify and delete custom window property", () => {
const window = jsdom.jsdom().defaultView;
assert.equal(window.XXX, undefined);
assert.equal('XXX' in window, false);
window.XXX = 1;
assert.equal(window.XXX, 1);
window.XXX = 2;
assert.equal(window.XXX, 2);
delete window.XXX;
assert.equal(window.XXX, undefined); // Fails here
assert.equal('XXX' in window, false);
});Test Result:
1) jsdom/miscellaneous Create, modify and delete custom window property:
AssertionError: expected 2 to equal undefined
Working in Chrome DevTools:
Tested with 9.5.0 and master#7b11f2b
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
