Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-geoghegan committed Nov 22, 2022
1 parent d9dcc56 commit 85d24a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/node-cron.js
Expand Up @@ -66,7 +66,7 @@ function getTasks() {
* @param {string || ScheduledTask} task This can be a string of the task Id or the task object itself.
* @returns {ScheduledTask[]} The scheduled tasks.
*/
function deleteTask(task) {
function deleteTask(task) {
storage.delete(task);
return this.getTasks();
}
Expand Down
4 changes: 2 additions & 2 deletions src/storage.js
Expand Up @@ -17,9 +17,9 @@ module.exports = (() => {
},
delete: (task) => {
if (typeof task === 'string') {
global.scheduledTasks.delete(task)
global.scheduledTasks.delete(task);
} else {
global.scheduledTasks.delete(task.options.name)
global.scheduledTasks.delete(task.options.name);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/storage-test.js
Expand Up @@ -21,7 +21,7 @@ describe('storage', () => {
assert.lengthOf(storage.getTasks(), 2);
storage.delete('id2');
assert.lengthOf(storage.getTasks(), 1);
assert.equal(storage.getTasks())
assert.equal(storage.getTasks());
assert.equal(storage.getTasks().get('id1'), {});
assert.equal(storage.getTasks().get('id2'), undefined);
});
Expand Down

0 comments on commit 85d24a1

Please sign in to comment.