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

yiming-liao / logry / 15760909787

19 Jun 2025 03:01PM UTC coverage: 96.654% (-1.8%) from 98.439%
15760909787

push

github

yiming-liao
refactor: restructure formatter, handler and core log flow

503 of 546 branches covered (92.12%)

Branch coverage included in aggregate %.

543 of 549 new or added lines in 39 files covered. (98.91%)

80 existing lines in 11 files now uncovered.

4668 of 4804 relevant lines covered (97.17%)

3.71 hits per line

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

72.5
/src/modules/normalizers/utils/build-timestamp-string.ts
1
const pad = (n: number) => n.toString().padStart(2, "0");
1✔
2

1✔
3
export const buildTimestampString = ({
1✔
4
  timestamp,
5✔
5
  useUTC = false,
5✔
6
  showTimeOnly = false,
5✔
7
}: {
5✔
8
  timestamp: number;
5✔
9
  useUTC: boolean;
5✔
10
  showTimeOnly: boolean;
5✔
11
}): string => {
5✔
12
  const date = new Date(timestamp);
5✔
13

5✔
14
  const get = useUTC
5✔
15
    ? {
5!
UNCOV
16
        y: date.getUTCFullYear(),
×
UNCOV
17
        m: pad(date.getUTCMonth() + 1),
×
UNCOV
18
        d: pad(date.getUTCDate()),
×
UNCOV
19
        h: pad(date.getUTCHours()),
×
UNCOV
20
        min: pad(date.getUTCMinutes()),
×
UNCOV
21
        s: pad(date.getUTCSeconds()),
×
UNCOV
22
      }
×
23
    : {
5✔
24
        y: date.getFullYear(),
5✔
25
        m: pad(date.getMonth() + 1),
5✔
26
        d: pad(date.getDate()),
5✔
27
        h: pad(date.getHours()),
5✔
28
        min: pad(date.getMinutes()),
5✔
29
        s: pad(date.getSeconds()),
5✔
30
      };
5✔
31

5✔
32
  if (showTimeOnly) {
5!
UNCOV
33
    return `${get.h}:${get.min}:${get.s}`;
×
UNCOV
34
  }
×
35
  return `${get.y}-${get.m}-${get.d} ${get.h}:${get.min}:${get.s}`;
5✔
36
};
5✔
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