فهرست منبع

test(file-upload): cover unnamed byte uploads

imccyu 4 روز پیش
والد
کامیت
7e331d72ed
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      packages/client/file-upload/tests/file-upload.client.spec.ts

+ 3 - 0
packages/client/file-upload/tests/file-upload.client.spec.ts

@@ -438,8 +438,11 @@ describe('Session-addressed file upload', () => {
     const { fiber, service } = await scopedService({ remote })
     const { fiber, service } = await scopedService({ remote })
     await expect(service.upload(SESSION_ID, Uint8Array.of(0, 0, 0), 'bytes.bin'))
     await expect(service.upload(SESSION_ID, Uint8Array.of(0, 0, 0), 'bytes.bin'))
       .resolves.toMatchObject({ ok: true })
       .resolves.toMatchObject({ ok: true })
+    await expect(service.upload(SESSION_ID, Uint8Array.of(1)))
+      .resolves.toMatchObject({ ok: true })
     expect(remote.mock.calls).toEqual([
     expect(remote.mock.calls).toEqual([
       [SESSION_ID, { data: 'AAAA', name: 'bytes.bin' }, undefined],
       [SESSION_ID, { data: 'AAAA', name: 'bytes.bin' }, undefined],
+      [SESSION_ID, { data: 'AQ==' }, undefined],
     ])
     ])
     await fiber.dispose()
     await fiber.dispose()
   })
   })