mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-20 21:49:04 -04:00
fix unit tests after merge from master, issues due to newly async tests that cause environment changes across test scripts
This commit is contained in:
parent
b191e2c437
commit
b791157717
3 changed files with 20 additions and 12 deletions
|
@ -230,6 +230,7 @@ describe('Helper', function () {
|
|||
});
|
||||
var clean = jsdom('', {cookie: cookieArray}),
|
||||
result = $.PrivateBin.Helper.getCookie(selectedKey);
|
||||
$.PrivateBin.Helper.reset();
|
||||
clean();
|
||||
return result === selectedValue;
|
||||
}
|
||||
|
@ -238,21 +239,17 @@ describe('Helper', function () {
|
|||
|
||||
describe('baseUri', function () {
|
||||
this.timeout(30000);
|
||||
before(function () {
|
||||
$.PrivateBin.Helper.reset();
|
||||
});
|
||||
|
||||
jsc.property(
|
||||
'returns the URL without query & fragment',
|
||||
common.jscSchemas(),
|
||||
jsc.elements(['http', 'https']),
|
||||
jsc.nearray(common.jscA2zString()),
|
||||
jsc.array(common.jscQueryString()),
|
||||
'string',
|
||||
function (schema, address, query, fragment) {
|
||||
$.PrivateBin.Helper.reset();
|
||||
var expected = schema + '://' + address.join('') + '/',
|
||||
clean = jsdom('', {url: expected + '?' + query.join('') + '#' + fragment}),
|
||||
result = $.PrivateBin.Helper.baseUri();
|
||||
$.PrivateBin.Helper.reset();
|
||||
clean();
|
||||
return expected === result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue