Skip to content

Commit e4f3d30

Browse files
fix: adds validation and improves comments
1 parent f7e4a9a commit e4f3d30

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

test/unit/models/discordactions.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ describe("discordactions", function () {
610610
await addUser(idleUser), // idle user with no task progress updates
611611
await addUser(activeUserWithProgressUpdates), // active user with task progress updates
612612
await addUser(activeUserWithNoUpdates), // active user with no task progress updates
613-
await addUser(userNotInDiscord), // OOO user with
613+
await addUser(userNotInDiscord), // OOO user with no task progress updates
614614
]);
615615
activeUserId = userIdList[2];
616616
await Promise.all([

utils/time.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const convertDaysToMilliseconds = (days) => {
3030
* @returns {number} : seconds
3131
*/
3232
const convertMillisToSeconds = (milliseconds) => {
33+
if (typeof milliseconds !== "number") throw Error("Not a number");
3334
return milliseconds / 1000;
3435
};
3536
/**

0 commit comments

Comments
 (0)