Skip to content

Commit 7323af3

Browse files
committed
Updated templated
1 parent 5cd8592 commit 7323af3

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ dist/
44
.dev.vars
55
.env
66
.claude
7+
.history

src/lib/format-forecast.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function formatForecast(forecast: ForecastProduct): string {
6262
const btl = ratingLabel(today.ratings.btl.rating.value);
6363

6464
const name = truncate(report.title, MAX_NAME_LENGTH);
65-
const dangerLine = `Alp:${alp} TL:${tln} BT:${btl}`;
65+
const dangerLine = `ALP:${alp} TL:${tln} BTL:${btl}`;
6666
const dateLine = formatDate(report.dateIssued);
6767
const footer = "avalanche.ca";
6868

test/format-forecast.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe("formatForecast", () => {
105105
it("handles no problems", () => {
106106
const result = formatForecast(makeForecast({ problems: [] }));
107107
expect(result).toBe(
108-
"Kananaskis\nFeb 23\nAlp:Considerable TL:Moderate BT:Low\navalanche.ca"
108+
"Kananaskis\nFeb 23\nALP:Considerable TL:Moderate BTL:Low\navalanche.ca"
109109
);
110110
});
111111

@@ -165,9 +165,9 @@ describe("formatForecast", () => {
165165
const result = formatForecast(
166166
makeForecast({ alp: value, tln: value, btl: value, problems: [] })
167167
);
168-
expect(result).toContain(`Alp:${display}`);
168+
expect(result).toContain(`ALP:${display}`);
169169
expect(result).toContain(`TL:${display}`);
170-
expect(result).toContain(`BT:${display}`);
170+
expect(result).toContain(`BTL:${display}`);
171171
}
172172
});
173173

@@ -194,8 +194,8 @@ describe("formatForecast", () => {
194194
},
195195
});
196196
const result = formatForecast(forecast);
197-
expect(result).toContain("Alp:High");
197+
expect(result).toContain("ALP:High");
198198
expect(result).toContain("TL:Considerable");
199-
expect(result).toContain("BT:Moderate");
199+
expect(result).toContain("BTL:Moderate");
200200
});
201201
});

test/sms.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe("POST /sms/incoming", () => {
7979
const xml = await res.text();
8080
expect(xml).toContain("<Response><Message>");
8181
expect(xml).toContain("Kananaskis");
82-
expect(xml).toContain("Alp:Considerable");
82+
expect(xml).toContain("ALP:Considerable");
8383
expect(xml).toContain("Wind slab");
8484
expect(xml).toContain("avalanche.ca");
8585
expect(xml).toContain("</Message></Response>");

0 commit comments

Comments
 (0)