From c48253f045a57b1bf0a5461f9085c67b0817f814 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Fri, 25 Sep 2026 09:51:59 +0200 Subject: [PATCH] test: cover sending a Buffer Actor input as raw bytes --- test/actors.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/actors.test.ts b/test/actors.test.ts index f93f6d37b..7b251808a 100644 --- a/test/actors.test.ts +++ b/test/actors.test.ts @@ -225,6 +225,20 @@ describe('Actor methods', () => { }); }); + test('start() sends a Buffer input as its raw bytes', async () => { + const actorId = 'some-id'; + const contentType = 'application/json'; + const input = Buffer.from(JSON.stringify({ some: 'body' })); + + const res = await client.actor(actorId).start(input, { contentType }); + expect(res.id).toEqual('run-actor'); + validateRequest({ + params: { actorId }, + body: { some: 'body' }, + additionalHeaders: { 'content-type': contentType }, + }); + }); + test('start() works with functions in input', async () => { const actorId = 'some-id'; const input = {