Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { UNSAFE_decodeViaTurboStream as decodeViaTurboStream } from "react-router";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { singleFetchActionData } from "../tests/e2e/utils/navigation";
|
||||
|
||||
describe("singleFetchActionData", () => {
|
||||
it("emits React Router's JSON-only v2 wire format without the standalone serializer", async () => {
|
||||
const payload = {
|
||||
fieldErrors: { email: undefined, password: "Synthetic password error" },
|
||||
fields: { email: "login-contract@example.test" },
|
||||
};
|
||||
|
||||
const result = await singleFetchActionData(payload, 400);
|
||||
const body = new Response(result.body).body;
|
||||
expect(body).not.toBeNull();
|
||||
|
||||
const decoded = await decodeViaTurboStream(body!, globalThis);
|
||||
expect(decoded.value).toEqual({ data: payload });
|
||||
await expect(decoded.done).resolves.toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user