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

yiming-liao / logry / 16359356526

18 Jul 2025 12:47AM UTC coverage: 95.783% (-1.0%) from 96.831%
16359356526

push

github

yiming-liao
fix(transport): force log delivery in edge mode regardless of conditions

432 of 486 branches covered (88.89%)

Branch coverage included in aggregate %.

3929 of 4067 relevant lines covered (96.61%)

4.3 hits per line

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

67.35
/src/core/handler-manager/utils/setup-flush-strategy.ts
1
import type {
1✔
2
  CancelFlushStrategy,
1✔
3
  OnErrorCallback,
1✔
4
  FlushStrategy,
1✔
5
} from "@/core/handler-manager/handler-manager-config-types";
1✔
6

1✔
7
type SetupFlushStrategyOptions = {
1✔
8
  flushStrategy: FlushStrategy;
1✔
9
  flush: () => Promise<void>;
1✔
10
  onError?: OnErrorCallback;
1✔
11
};
1✔
12

1✔
13
/**
1✔
14
 * Sets up a flush strategy and returns a cancel function (if any).
1✔
15
 */
1✔
16
export function setupFlushStrategy({
2✔
17
  flushStrategy,
2✔
18
  flush,
2✔
19
  onError,
2✔
20
}: SetupFlushStrategyOptions): CancelFlushStrategy | undefined {
2✔
21
  try {
2✔
22
    const cancel = flushStrategy(async () => {
2✔
23
      try {
1✔
24
        await flush();
1✔
25
      } catch (error) {
1!
26
        onError?.({
×
27
          error,
×
28
          id: "flush strategy",
×
29
          isFlushError: true,
×
30
        });
×
31
      }
×
32
    });
2✔
33

2✔
34
    if (typeof cancel === "function") {
2✔
35
      return cancel;
2✔
36
    }
2✔
37
  } catch (error) {
2!
38
    onError?.({
×
39
      error,
×
40
      id: "flush strategy setup",
×
41
      isFlushError: false,
×
42
    });
×
43
  }
×
44
  return undefined;
×
45
}
×
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