test: use cleanup function everywhere instead of jsdom manually

This commit is contained in:
rugk
2026-03-03 11:01:30 +00:00
parent 778df44b0b
commit 3de6dc9f68
15 changed files with 84 additions and 92 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ describe('Prompt', function () {
'string',
function (password) {
password = password.replace(/\r+|\n+/g, '');
const clean = jsdom('', {url: 'ftp://example.com/?0000000000000000'});
const clean = globalThis.cleanup('', {url: 'ftp://example.com/?0000000000000000'});
$('body').html(
'<div id="passwordmodal" class="modal fade" role="dialog">' +
'<div class="modal-dialog"><div class="modal-content">' +