Skip to content

Commit d6c9ba6

Browse files
Apply Prettier formatting to test and layer files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2f6fd64 commit d6c9ba6

File tree

5 files changed

+18
-29
lines changed

5 files changed

+18
-29
lines changed

src/__tests__/components/TowerList.test.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ describe("TowerList.vue", () => {
7272

7373
it("shows eye emoji for visible site", () => {
7474
const store = useStore();
75-
store.localSites = [
76-
{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true },
77-
];
75+
store.localSites = [{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true }];
7876
const wrapper = mountTowerList();
7977
// Eye emoji: 👁️
8078
expect(wrapper.find("button.btn-outline-light").text()).toContain("👁️");
@@ -91,9 +89,7 @@ describe("TowerList.vue", () => {
9189

9290
it("calls toggleSiteVisibility on eye button click", async () => {
9391
const store = useStore();
94-
store.localSites = [
95-
{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true },
96-
];
92+
store.localSites = [{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true }];
9793
store.toggleSiteVisibility = vi.fn();
9894
const wrapper = mountTowerList();
9995
await wrapper.find("button.btn-outline-light").trigger("click");
@@ -103,29 +99,23 @@ describe("TowerList.vue", () => {
10399
it("hides delete button for non-admin", () => {
104100
const store = useStore();
105101
store.isAdmin = false;
106-
store.localSites = [
107-
{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true },
108-
];
102+
store.localSites = [{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true }];
109103
const wrapper = mountTowerList();
110104
expect(wrapper.find("button.btn-outline-danger").exists()).toBe(false);
111105
});
112106

113107
it("shows delete button for admin", () => {
114108
const store = useStore();
115109
store.isAdmin = true;
116-
store.localSites = [
117-
{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true },
118-
];
110+
store.localSites = [{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true }];
119111
const wrapper = mountTowerList();
120112
expect(wrapper.find("button.btn-outline-danger").exists()).toBe(true);
121113
});
122114

123115
it("calls removeSite on delete button click", async () => {
124116
const store = useStore();
125117
store.isAdmin = true;
126-
store.localSites = [
127-
{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true },
128-
];
118+
store.localSites = [{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true }];
129119
store.removeSite = vi.fn();
130120
const wrapper = mountTowerList();
131121
await wrapper.find("button.btn-outline-danger").trigger("click");
@@ -134,9 +124,7 @@ describe("TowerList.vue", () => {
134124

135125
it("hides mesh paths button when fewer than 2 towers", () => {
136126
const store = useStore();
137-
store.localSites = [
138-
{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true },
139-
];
127+
store.localSites = [{ params: makeSplatParams(), taskId: "t1", raster: {} as never, color: "#f00", visible: true }];
140128
const wrapper = mountTowerList();
141129
expect(wrapper.find("button.btn-outline-secondary, button.btn-outline-info").exists()).toBe(false);
142130
});

src/__tests__/layers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe("redPinMarker", () => {
1212
});
1313

1414
it("contains pin emoji in HTML", () => {
15-
const html = (redPinMarker.options).html as string;
15+
const html = redPinMarker.options.html as string;
1616
expect(html).toContain("📍");
1717
});
1818
});

src/__tests__/setup.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,13 @@ vi.mock("leaflet-easyprint", () => ({}));
110110
// ---------------------------------------------------------------------------
111111
vi.stubGlobal(
112112
"fetch",
113-
vi.fn(() => Promise.resolve({ ok: false, json: () => Promise.resolve({}), arrayBuffer: () => Promise.resolve(new ArrayBuffer(0)) })),
113+
vi.fn(() =>
114+
Promise.resolve({
115+
ok: false,
116+
json: () => Promise.resolve({}),
117+
arrayBuffer: () => Promise.resolve(new ArrayBuffer(0)),
118+
}),
119+
),
114120
);
115121

116122
// ---------------------------------------------------------------------------

src/layers/OverlapHatchLayer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const OverlapHatchLayer = L.GridLayer.extend({
107107

108108
// Create ImageData for direct pixel manipulation
109109
const imageData = ctx.createImageData(tileSize.x, tileSize.y);
110-
const {data} = imageData;
110+
const { data } = imageData;
111111

112112
// Pre-compute stripe angles for each tower
113113
const angles = towers.map((_t: TowerInfo, i: number) => STRIPE_ANGLES[i % STRIPE_ANGLES.length]);
@@ -119,8 +119,8 @@ const OverlapHatchLayer = L.GridLayer.extend({
119119
// Convert pixel to lat/lng
120120
const point = L.point(nwPoint.x + px, nwPoint.y + py);
121121
const latlng = map.unproject(point, zoom);
122-
const {lat} = latlng;
123-
const {lng} = latlng;
122+
const { lat } = latlng;
123+
const { lng } = latlng;
124124

125125
// Sample each tower's raster at this location
126126
const towerValues: (number | null)[] = [];

src/presets/__tests__/labels.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { describe, it, expect } from "vitest";
2-
import {
3-
HARDWARE_LABELS,
4-
ANTENNA_LABELS,
5-
TERRAIN_LABELS,
6-
labelsToOptions,
7-
} from "../labels";
2+
import { HARDWARE_LABELS, ANTENNA_LABELS, TERRAIN_LABELS, labelsToOptions } from "../labels";
83

94
describe("HARDWARE_LABELS", () => {
105
it("includes Heltec V3 and V4", () => {

0 commit comments

Comments
 (0)