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

yiming-liao / logry / 15760940083

19 Jun 2025 03:02PM UTC coverage: 96.733% (+0.08%) from 96.654%
15760940083

push

github

yiming-liao
docs(examples): update examples and cleanup

509 of 552 branches covered (92.21%)

Branch coverage included in aggregate %.

4672 of 4804 relevant lines covered (97.25%)

4.24 hits per line

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

81.25
/src/shared/utils/assert-valid-level.ts
1
import type { Level } from "@/shared/types";
1✔
2
import { internalError } from "@/internal";
1✔
3
import { LEVEL_CONFIG } from "@/shared/constants";
1✔
4

1✔
5
/**
1✔
6
 * Validate that the provided log level exists in the priority map.
1✔
7
 * @param level - The log level to validate.
1✔
8
 * @throws Will throw an error if the level is not valid.
1✔
9
 */
1✔
10
export const assertValidLevel = (level?: Level): void => {
1✔
11
  if (level !== undefined && !(level in LEVEL_CONFIG)) {
18!
12
    return internalError({ message: `Invalid log level: ${level}` });
×
13
  }
×
14
};
18✔
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