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

WFCD / warframe-worldstate-data / #522

20 Nov 2025 11:14PM UTC coverage: 83.277% (-10.7%) from 93.964%
#522

push

web-flow
ci: bump @biomejs/biome from 2.3.5 to 2.3.6 (#751)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

117 of 135 branches covered (86.67%)

Branch coverage included in aggregate %.

625 of 756 relevant lines covered (82.67%)

2.18 hits per line

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

57.5
/safeImport.ts
1
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
1✔
2
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
1✔
3

1✔
4
/**
1✔
5
 * Safely require path, fall back to fallback if module cannot load
1✔
6
 * @param  {string} path    Path to attempt to load
1✔
7
 * @param  {Object} fallback fallback response if error or no module
1✔
8
 * @returns {Promise<any>}         module or the default object
1✔
9
 */
1✔
10
const safeImport = async <T>(path: string, fallback: T = {} as T): Promise<T> => {
1!
11
  try {
×
12
    const mod: any = await import(path, path.includes('.json') ? { with: { type: 'json' } } : {});
×
13
    if (mod?.default) return mod.default as T;
✔
14
    return mod as T;
×
15
  } catch (error) {
✔
16
    if ((process.env.LOG_LEVEL || 'ERROR').toUpperCase() === 'DEBUG') {
✔
17
      // eslint-disable-next-line no-console
×
18
      console.debug(`Failed to load module at ${path} ... returning fallback`);
×
19
    }
×
20

×
21
    return fallback;
×
22
  }
×
23
};
×
24

×
25
export default safeImport;
1✔
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