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

nilfalse / ctf / 5752977660

pending completion
5752977660

Pull #298

github

web-flow
Merge b6f7f6972 into da4e6f9f9
Pull Request #298: Update all of jest 27.5.1 → 29.6.2 (major)

0 of 266 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 613 relevant lines covered (0.0%)

0.0 hits per line

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

0.0
/packages/runtime/services/airport/airport_service.ts
1
import { lookupUpperCase } from '../../util/common';
2
import * as debug from '../../util/debug';
3

4
export interface Airport {
5
  continent?: string;
6
  iso_country: string;
7
  iso_region: string;
8
}
9

10
const airports: Record<string, Airport> = {};
×
11

12
let ready = false;
×
13

14
export function lookup(code: string) {
15
  debug.assert(ready, 'Airports service lookup method was called before init');
×
16

17
  return lookupUpperCase(airports, code);
×
18
}
19

20
export let _load = function () {
×
21
  const dataPromise = fetch('/data/airports.json').then<
×
22
    Record<string, Airport>
23
  >((r) => r.json());
×
24

25
  _load = () => dataPromise;
×
26
  return dataPromise;
×
27
};
28

29
export const init = function (): Promise<Record<string, Airport>> {
×
30
  return _load().then((data) => {
×
31
    ready = true;
×
32

33
    return Object.assign(airports, data);
×
34
  });
35
};
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