update jsdom dependency, fix tests

This commit is contained in:
El RIDO 2025-02-07 08:54:55 +01:00
parent dc983621ac
commit 3b6b97429d
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
4 changed files with 100 additions and 159 deletions

View file

@ -727,11 +727,12 @@ describe('TopNav', function () {
cleanup();
});
// TODO triggers error messages in jsDOM version 12, but passes
it(
'displays raw text view correctly',
function () {
const clean = jsdom('', {url: 'https://privatebin.net/?0123456789abcdef#0'});
global.URL = require('jsdom-url').URL;
//global.URL = require('jsdom-url').URL;
$('body').html('<button id="rawtextbutton"></button>');
const sample = 'example';
$.PrivateBin.PasteViewer.setText(sample);