Skip to content

Commit

Permalink
Fix issue with cookie support testing
Browse files Browse the repository at this point in the history
I noticed this while checking the Jasmine version, now that I'm running in a local browser. If testing in an environment where no cookies are set *yet*, the tests assume cookies aren't supported, which is not correct. This fixes the issue.
  • Loading branch information
Mr0grog committed Jan 18, 2024
1 parent 53afb5e commit 160fc4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ define(function () {
};

self.isCookieStorageAvailable = function isCookieStorageAvailable() {
if (window && window.document && window.document.cookie) {
if (window && window.document && window.document.cookie != null) {
// We need to check not just that the cookie objects are available, but that they work, because
// if we run from file:// URLs they appear present but are non-functional
window.document.cookie = "test=hi;";
Expand Down

0 comments on commit 160fc4c

Please # to comment.