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

blockcoders / kuma-wallet / ebbd3c69-fda1-4bf1-80ea-77bef87d3d87

pending completion
ebbd3c69-fda1-4bf1-80ea-77bef87d3d87

Pull #8

circleci

Ruben
fix tests
Pull Request #8: Milestone 2

876 of 1103 branches covered (79.42%)

Branch coverage included in aggregate %.

3452 of 3452 new or added lines in 44 files covered. (100.0%)

6647 of 7185 relevant lines covered (92.51%)

6.69 hits per line

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

94.74
/src/utils/utils.ts
1
export const formatDate = (date: number) => {
2✔
2
  const d = new Date(date);
6✔
3
  const year = d.getFullYear();
6✔
4
  const month = d.toLocaleString("default", { month: "short" });
6✔
5
  const day = d.getDate();
6✔
6
  const hours = d.getHours().toString().padStart(2, "0");
6✔
7
  const minutes = d.getMinutes().toString().padStart(2, "0");
6✔
8

6✔
9
  let formattedDate = `${month} ${day} - ${hours}:${minutes}`;
6✔
10

6✔
11
  if (year !== new Date().getFullYear()) {
6✔
12
    formattedDate = `(${year}) ${formattedDate}`;
4✔
13
  }
4✔
14

6✔
15
  return formattedDate;
6✔
16
};
6✔
17

2✔
18
export const parseIncomingQuery = (query: string) => {
2✔
19
  const _obj: { [key: string]: any } = Object.fromEntries(
6✔
20
    new URLSearchParams(query)
6✔
21
  );
6✔
22

6✔
23
  Object.keys(_obj).forEach((key) => {
6✔
24
    const atribute = _obj[key];
8✔
25
    if (atribute.startsWith("{") && atribute.endsWith("}")) {
8✔
26
      _obj[key] = JSON.parse(atribute);
4✔
27
    }
4✔
28
  });
6✔
29

6✔
30
  return _obj;
6✔
31
};
6✔
32

2✔
33
export const makeQuerys = (params: Record<string, string>) => {
2✔
34
  return (
2✔
35
    "?" +
2✔
36
    Object.keys(params)
2✔
37
      .map((key) => {
2✔
38
        if (typeof params[key] === "object") {
4!
39
          return `${key}=${JSON.stringify(params[key])}`;
×
40
        }
×
41
        return `${key}=${encodeURIComponent(params[key])}`;
4✔
42
      })
2✔
43
      .join("&")
2✔
44
  );
2✔
45
};
2✔
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

© 2025 Coveralls, Inc