Skip to content

Commit 52faf40

Browse files
authored
lint and comment
Signed-off-by: Manuel <[email protected]>
1 parent 06676cb commit 52faf40

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

spec/Auth.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ describe('extendSessionOnUse', () => {
304304
tests.forEach(({ title, sessionLength, sessionUpdatedAt, result }) => {
305305
it(`shouldUpdateSessionExpiry() when ${title}`, async () => {
306306
const { shouldUpdateSessionExpiry } = require('../lib/Auth');
307-
let update = new Date();
307+
const update = new Date();
308308
update.setTime(update.getTime() - sessionUpdatedAt * 1000);
309309
const res = shouldUpdateSessionExpiry(
310310
{ sessionLength: sessionLength },

src/Auth.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ function nobody(config) {
6767
return new Auth({ config, isMaster: false });
6868
}
6969

70-
// A helper to check whether session should be updated based on last update time & session length.
70+
/**
71+
* Checks whether session should be updated based on last update time & session length.
72+
*/
7173
function shouldUpdateSessionExpiry(config, session) {
7274
let resetAfter = 60;
7375
if (config.sessionLength > 86400) {

0 commit comments

Comments
 (0)