• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

node-cron / node-cron / 16895283675

12 Aug 2025 12:08AM UTC coverage: 89.256% (-7.8%) from 97.037%
16895283675

Pull #481

github

web-flow
Merge 39584aad7 into c76f95e92
Pull Request #481: build: using rollout

457 of 540 branches covered (84.63%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 2 files covered. (100.0%)

161 existing lines in 11 files now uncovered.

1595 of 1759 relevant lines covered (90.68%)

37.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/task-registry.ts
1
import { ScheduledTask } from "./tasks/scheduled-task";
1✔
2

1✔
3
const tasks = new Map<string, ScheduledTask> ();
1✔
4

1✔
5
export class TaskRegistry {
1✔
6
  add(task: ScheduledTask): void{
1✔
7
    if(this.has(task.id)){
13!
UNCOV
8
      throw Error(`task ${task.id} already registred!`)
×
UNCOV
9
    }
×
10
    
13✔
11
    tasks.set(task.id, task);
13✔
12

1✔
13
    task.on('task:destroyed', () => {
1✔
14
      this.remove(task);
1✔
15
    });
1✔
16
  }
1✔
17

1✔
18
  get(taskId: string): ScheduledTask | undefined {
1✔
UNCOV
19
    return tasks.get(taskId);
✔
20
  }
1✔
21

1✔
22
  remove(task: ScheduledTask ){
1✔
23
    if(this.has(task.id)){
1✔
24
      task?.destroy();
1✔
25
      tasks.delete(task.id);
1✔
26
    }
1✔
27
  }
1✔
28

1✔
29
  all(): typeof tasks {
1✔
UNCOV
30
    return tasks;
×
UNCOV
31
  }
×
32

1✔
33
  has(taskId: string): boolean {
1✔
34
    return tasks.has(taskId);
14✔
35
  }
14✔
36

1✔
37
  killAll() {
1✔
UNCOV
38
   tasks.forEach(id => this.remove(id));
×
UNCOV
39
  }
×
UNCOV
40
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc