Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(tests): update makeReq function to use Buffer for request body chunks

nirholas4f16538f8388
diff --git a/tests/api/club-presence.test.js b/tests/api/club-presence.test.js
index 0d4baaf24..bb1ea0c88 100644
--- a/tests/api/club-presence.test.js
+++ b/tests/api/club-presence.test.js
@@ -16,7 +16,8 @@ vi.mock('../../api/_lib/rate-limit.js', () => ({
const { default: handler } = await import('../../api/club/presence.js');
function makeReq({ method = 'POST', body = null, headers = {} } = {}) {
- const chunks = body === null ? [] : [JSON.stringify(body)];
+ // Buffers, not strings: api/_lib/http.js readBody() Buffer.concat()s the chunks.
+ const chunks = body === null ? [] : [Buffer.from(JSON.stringify(body))];
const r = Readable.from(chunks);
r.method = method;
r.url = '/api/club/presence';