Execute oxfmt (#1166)

Ran
pnpm oxfmt .

This should get the web repo aligned so that we can better enforce oxfmt going forward.
This commit is contained in:
Austin
2026-06-16 20:30:08 -04:00
committed by GitHub
parent c5690d1edb
commit d2cb51d489
378 changed files with 5548 additions and 1974 deletions
@@ -24,16 +24,22 @@ function msg(id: number, ms: number, text = "t"): Message {
};
}
describe.runIf(typeof navigator !== "undefined")("sqlocal OPFS round-trip", () => {
it("persists messages across DB instances", async () => {
const dbPath = `meshtastic-test-${Date.now()}.db`;
const dbA = await createSqlocalDb({ databasePath: dbPath });
const repoA = new SqlocalMessageRepository(dbA, { deviceId: 1 });
await repoA.appendBatch([msg(1, 1000), msg(2, 2000)]);
describe.runIf(typeof navigator !== "undefined")(
"sqlocal OPFS round-trip",
() => {
it("persists messages across DB instances", async () => {
const dbPath = `meshtastic-test-${Date.now()}.db`;
const dbA = await createSqlocalDb({ databasePath: dbPath });
const repoA = new SqlocalMessageRepository(dbA, { deviceId: 1 });
await repoA.appendBatch([msg(1, 1000), msg(2, 2000)]);
const dbB = await createSqlocalDb({ databasePath: dbPath });
const repoB = new SqlocalMessageRepository(dbB, { deviceId: 1 });
const out = await repoB.loadRecent({ kind: "channel", channel: ChannelNumber.Primary }, 10);
expect(out.map((m) => m.id)).toEqual([1, 2]);
});
});
const dbB = await createSqlocalDb({ databasePath: dbPath });
const repoB = new SqlocalMessageRepository(dbB, { deviceId: 1 });
const out = await repoB.loadRecent(
{ kind: "channel", channel: ChannelNumber.Primary },
10,
);
expect(out.map((m) => m.id)).toEqual([1, 2]);
});
},
);