mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-20 21:49:04 -04:00
making use of the URL object in the existing tests
This commit is contained in:
parent
1958a55651
commit
50cc6995e0
5 changed files with 17 additions and 25 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue