Commit 63644dd
lib: remove redundant code, add tests in timers.js
insert() is only called from one place where there is already a check
that msecs is greater than or equal to zero, so do not repeat the check
inside insert().
timers.active() is not documented and should not be exposed, but since
it is exposed for now, let's test it.
PR-URL: #3143
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>1 parent 8dfdee3 commit 63644ddCopy full SHA for 63644dd
File tree
Expand file treeCollapse file tree
2 files changed
+41
-14
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+41
-14
lines changedOpen diff view settings
Collapse file
+8-14Lines changed: 8 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
| 26 | + |
| 27 | + |
| 28 | + |
26 | 29 | |
27 | 30 | |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
| 31 | + |
| 32 | + |
32 | 33 | |
33 | 34 | |
| 35 | + |
| 36 | + |
34 | 37 | |
35 | 38 | |
36 | 39 | |
| ||
48 | 51 | |
49 | 52 | |
50 | 53 | |
51 | | - |
| 54 | + |
52 | 55 | |
53 | 56 | |
54 | 57 | |
| ||
156 | 159 | |
157 | 160 | |
158 | 161 | |
159 | | - |
160 | | - |
161 | | - |
162 | | - |
163 | | - |
164 | | - |
165 | | - |
166 | | - |
167 | | - |
168 | 162 | |
169 | 163 | |
170 | 164 | |
|
Collapse file
test/parallel/test-timers-active.js
Copy file name to clipboard+33Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
0 commit comments