diff --git a/src/model/enum.ts b/src/model/enum.ts index 78abadb..b447905 100644 --- a/src/model/enum.ts +++ b/src/model/enum.ts @@ -403,6 +403,14 @@ export enum DepositType { } export enum DepositCoverage { + /** + * Only reported by certain countries (e.g. Russia) + */ + None = "0", + + /** + * Not reported (e.g. due to rwy clearance in progress) + */ NotReported = "/", Less10 = "1", diff --git a/tests/parser/parser.test.ts b/tests/parser/parser.test.ts index 93ba166..348b7ba 100644 --- a/tests/parser/parser.test.ts +++ b/tests/parser/parser.test.ts @@ -22,8 +22,13 @@ import { IcingIntensity, MetarType, AltimeterUnit, + DepositCoverage, } from "model/enum"; -import { IAbstractWeatherContainer, IRunwayInfoRange } from "model/model"; +import { + IAbstractWeatherContainer, + IRunwayInfoDeposit, + IRunwayInfoRange, +} from "model/model"; import { Direction } from "model/enum"; import en from "locale/en"; import { _, format } from "commons/i18n"; @@ -548,6 +553,18 @@ describe("MetarParser", () => { expect(metar.remarks).toHaveLength(1); }); + test("with 'none' runway deposit", () => { + const input = "UUWW 151030Z 34002MPS CAVOK 14/02 Q1026 R01/000070 NOSIG"; + + const metar = new MetarParser(en).parse(input); + + expect(metar.runwaysInfo).toHaveLength(1); + expect(metar.runwaysInfo[0].name).toBe("01"); + expect((metar.runwaysInfo[0] as IRunwayInfoDeposit).coverage).toBe( + DepositCoverage.None, + ); + }); + test("with nil", () => { const metar = new MetarParser(en).parse("SVMC 211703Z AUTO NIL");