mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-21 14:08:48 -04:00
adjusting test to make it work in latest jsDOM versions that don't support arbitrary bytes in a URLs hash anymore
This commit is contained in:
parent
9348cbe2a1
commit
3883e3fb30
2 changed files with 8 additions and 6 deletions
|
@ -243,12 +243,14 @@ describe('Helper', function () {
|
|||
'returns the URL without query & fragment',
|
||||
jsc.elements(['http', 'https']),
|
||||
jsc.nearray(common.jscA2zString()),
|
||||
jsc.array(common.jscA2zString()),
|
||||
jsc.array(common.jscQueryString()),
|
||||
'asciistring',
|
||||
function (schema, address, query, fragment) {
|
||||
jsc.array(common.jscA2zString()),
|
||||
function (schema, address, path, query, fragment) {
|
||||
$.PrivateBin.Helper.reset();
|
||||
var expected = schema + '://' + address.join('') + '/',
|
||||
clean = jsdom('', {url: expected + '?' + query.join('') + '#' + fragment}),
|
||||
var path = path.join('') + (path.length > 0 ? '/' : ''),
|
||||
expected = schema + '://' + address.join('') + '/' + path,
|
||||
clean = jsdom('', {url: expected + '?' + query.join('') + '#' + fragment.join('')}),
|
||||
result = $.PrivateBin.Helper.baseUri();
|
||||
clean();
|
||||
return expected === result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue