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

ninoseki / mitaka / 13735031517

08 Mar 2025 06:43AM UTC coverage: 75.453% (-0.008%) from 75.461%
13735031517

Pull #869

github

web-flow
Merge 2a8b591c7 into 25191ca30
Pull Request #869: refactor: disable spy-on-web

398 of 418 branches covered (95.22%)

Branch coverage included in aggregate %.

2181 of 3000 relevant lines covered (72.7%)

51.92 hits per line

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

0.0
/src/scripts/index.ts
1
import axios from "axios";
×
2
import { err, ok, ResultAsync } from "neverthrow";
×
3

4
import { Scanners } from "~/scanner";
×
5
import { Searchers } from "~/searcher";
×
6

7
function isReachable(url: string) {
×
8
  return ResultAsync.fromPromise(
×
9
    axios.get(url, { timeout: 10 * 1000 }),
×
10
    (e: unknown) => e,
×
11
  ).mapErr((e) => {
×
12
    if (axios.isAxiosError(e)) {
×
13
      return err(`${url} is not reachable`);
×
14
    }
×
15
    return e;
×
16
  });
×
17
}
×
18

19
(async (): Promise<void> => {
×
20
  const urls = Array.from(
×
21
    new Set(
×
22
      Searchers.map((s) => s.baseURL).concat(Scanners.map((s) => s.baseURL)),
×
23
    ),
×
24
  );
×
25

26
  const results = await Promise.all(
×
27
    urls.map((u) => ok(u).asyncAndThen((u) => isReachable(u))),
×
28
  );
×
29

30
  const errors = results.filter((r) => r.isErr());
×
31
  if (errors.length > 0) {
×
32
    errors.forEach((e) => {
×
33
      // eslint-disable-next-line no-console
34
      console.error(e);
×
35
    });
×
36
  } else {
×
37
    // eslint-disable-next-line no-console
38
    console.log("All goes well");
×
39
  }
×
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