making use of the URL object in the existing tests

This commit is contained in:
El RIDO 2019-06-20 22:30:49 +02:00
parent 1958a55651
commit 50cc6995e0
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
5 changed files with 17 additions and 25 deletions

View file

@ -93,8 +93,9 @@ describe('Model', function () {
clean = jsdom('', {
url: schema.join('') + '://' + address.join('') +
'/?' + queryString + '#' + fragment
}),
result = $.PrivateBin.Model.getPasteId();
});
global.URL = require('jsdom-url').URL;
var result = $.PrivateBin.Model.getPasteId();
$.PrivateBin.Model.reset();
clean();
return pasteIdString === result;
@ -111,6 +112,7 @@ describe('Model', function () {
'/#' + fragment
}),
result = false;
global.URL = require('jsdom-url').URL;
try {
$.PrivateBin.Model.getPasteId();
}