Skip to content

Commit

Permalink
fix: reduce log level of cookie test (#394)
Browse files Browse the repository at this point in the history
* fix: reduce log level of cookie test

* fix: remove file

* fix: test thats failing
  • Loading branch information
kelvin-lu authored May 18, 2021
1 parent 797745d commit c4bb241
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/base-cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const areCookiesEnabled = (opts = {}) => {
} catch (e) {
utils.log.warn(`Error thrown when checking for cookies. Reason: "${e}"`);
} finally {
utils.log.warn(`Cleaning up cookies availability test`);
utils.log.info(`Cleaning up cookies availability test`);
set(cookieName, null, opts);
}
return _areCookiesEnabled;
Expand Down
2 changes: 1 addition & 1 deletion test/base-cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('cookie', function () {

describe('when error is thrown during check', () => {
it('should cleanup cookies', () => {
const stubLogInfo = sinon.stub(utils.log, 'info').throws('Stubbed Exception');
const stubLogInfo = sinon.stub(utils.log, 'info').onFirstCall().throws('Stubbed Exception');
const spyLogWarning = sinon.spy(utils.log, 'warn');
const cookieName = Constants.COOKIE_TEST_PREFIX + base64Id();
const res = cookie.areCookiesEnabled();
Expand Down

0 comments on commit c4bb241

Please sign in to comment.