Files
web/e2e/tests/messaging.broadcast.spec.ts
dependabot[bot] aec3ad9ed3 chore(deps-dev): bump oxfmt from 0.58.0 to 0.59.0 (#1306)
* chore(deps-dev): bump oxfmt from 0.58.0 to 0.59.0

Bumps [oxfmt](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt) from 0.58.0 to 0.59.0.
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxfmt/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxfmt_v0.59.0/npm/oxfmt)

---
updated-dependencies:
- dependency-name: oxfmt
  dependency-version: 0.59.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: fix formatting issues for oxfmt 0.59.0

* fix: add vitest.config.ts for packages/ui to avoid unplugin-dts TypeScript 7 crash

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Dan Ditomaso <dan.ditomaso@gmail.com>
Co-authored-by: Hunter Thornsberry <hunter@hunterthornsberry.com>
2026-07-22 12:43:26 -04:00

36 lines
1.3 KiB
TypeScript

import { peerSend, startPeerRecv } from "../fixtures/peer.ts";
import { expect, test } from "../fixtures/test.ts";
/**
* Broadcast text messaging across a real two-node mesh:
* - mesh -> web: the peer node broadcasts; the browser must render it.
* - web -> mesh: the browser sends; the peer node must receive it.
* Both directions traverse real firmware over the UDP-multicast mesh.
*/
test.describe("broadcast messaging over a real two-node mesh", () => {
test.beforeEach(async ({ connectionPage, messagesPage, device }) => {
await connectionPage.connectHttp({ host: device.host, tls: device.tls });
await messagesPage.waitReady();
});
test("renders a broadcast received from a mesh peer (mesh -> web)", async ({
messagesPage,
}) => {
const nonce = `pong-${Date.now()}`;
await peerSend(nonce);
await messagesPage.expectMessage(nonce);
});
test("delivers a typed broadcast to the mesh (web -> mesh)", async ({
messagesPage,
}) => {
const nonce = `ping-${Date.now()}`;
// Listen on the peer node before sending, then type+send from the browser.
const recv = await startPeerRecv(nonce, { timeout: 60 });
await messagesPage.send(nonce);
// The peer node confirms the text actually traversed the real mesh.
const from = await recv.received;
expect(from).toBeGreaterThan(0);
});
});