Release Binary Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 09:05:50 +02:00
parent 60768466c1
commit 592e0b9f59
26 changed files with 1468 additions and 53 deletions
+16 -1
View File
@@ -18,8 +18,23 @@ describe("Workbench", () => {
it("shows malformed decoder errors without clearing bytes", async () => {
const user = userEvent.setup();
render(<Workbench />);
await user.click(screen.getByRole("tab", { name: "ASN.1 DER" }));
await user.click(screen.getByRole("button", { name: "ASN.1 DER" }));
expect(screen.getByRole("alert")).toBeVisible();
expect(screen.getByRole("button", { name: "Byte 20: 0a" })).toBeVisible();
});
it("edits and searches the canonical byte buffer", async () => {
const user = userEvent.setup();
render(<Workbench />);
const editOffset = screen.getAllByLabelText("Offset (decimal or 0x…)")[0]!;
await user.clear(editOffset);
await user.type(editOffset, "0");
await user.type(screen.getByLabelText("Replacement bytes (hex)"), "41");
await user.click(screen.getByRole("button", { name: "Apply byte edit" }));
expect(
(screen.getByLabelText("hex output") as HTMLTextAreaElement).value,
).toMatch(/^41/u);
await user.click(screen.getByRole("button", { name: "Search" }));
expect(await screen.findByText(/1 match/u)).toBeVisible();
});
});