Browse Source

test(file-upload): cover unnamed byte uploads

imccyu 4 ngày trước cách đây
mục cha
commit
7e331d72ed

+ 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 })
     await expect(service.upload(SESSION_ID, Uint8Array.of(0, 0, 0), 'bytes.bin'))
       .resolves.toMatchObject({ ok: true })
+    await expect(service.upload(SESSION_ID, Uint8Array.of(1)))
+      .resolves.toMatchObject({ ok: true })
     expect(remote.mock.calls).toEqual([
       [SESSION_ID, { data: 'AAAA', name: 'bytes.bin' }, undefined],
+      [SESSION_ID, { data: 'AQ==' }, undefined],
     ])
     await fiber.dispose()
   })