Skip to content

Commit d0d18c3

Browse files
WIP. fix test for click subscription in events_engine (T1307313)
1 parent 042fc76 commit d0d18c3

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

packages/devextreme/testing/tests/DevExpress.ui.events/eventsEngine.tests.js

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -593,50 +593,6 @@ QUnit.test('removing subscriptions should not remove data from elementDataMap if
593593
assert.equal(eventsEngine.elementDataMap.has(div), hasData);
594594
});
595595

596-
QUnit.test('should not leak memory when subscribing on document and clicking elements (T1307313)', function(assert) {
597-
const done = assert.async();
598-
const fixture = document.getElementById('qunit-fixture');
599-
600-
fixture.innerHTML = '<button id="test-element">Test</button>';
601-
602-
const testElement = document.getElementById('test-element');
603-
604-
eventsEngine.on(document, clickEventName, () => {});
605-
606-
if(typeof globalThis !== 'undefined' && typeof globalThis.gc === 'function') {
607-
globalThis.gc();
608-
}
609-
610-
const initialMemory = performance.memory.usedJSHeapSize;
611-
612-
let i = 0;
613-
614-
const interval = setInterval(() => {
615-
testElement.click();
616-
i++;
617-
618-
if(i > 99) {
619-
setTimeout(() => {
620-
if(typeof globalThis !== 'undefined' && typeof globalThis.gc === 'function') {
621-
globalThis.gc();
622-
}
623-
624-
const finalMemory = performance.memory.usedJSHeapSize;
625-
const memoryDiff = finalMemory - initialMemory;
626-
627-
assert.ok(
628-
memoryDiff <= 0,
629-
`Memory should not leak. Memory diff: ${memoryDiff}B`
630-
);
631-
632-
done();
633-
}, 50);
634-
635-
clearInterval(interval);
636-
}
637-
}, 50);
638-
});
639-
640596
QUnit.module('Strategy');
641597

642598
QUnit.test('it should be possible to set only one method for strategy', function(assert) {

0 commit comments

Comments
 (0)