fix(pds): include aspectRatio on read-sticky posts ()

* fix: include aspectRatio on read-sticky

* chore: add missing alt text test case
This commit is contained in:
Mary 2023-12-01 06:51:07 +07:00 committed by GitHub
parent 401538a933
commit 6da8182530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions
packages/pds
src/services/local
tests/proxied

@ -220,6 +220,7 @@ export class LocalService {
did,
img.image.ref.toString(),
),
aspectRatio: img.aspectRatio,
alt: img.alt,
}))
return {

@ -141,6 +141,7 @@ describe('proxy read after write', () => {
images: [
{
image: img.image,
aspectRatio: { height: 2, width: 1 },
alt: 'alt text',
},
],
@ -190,6 +191,8 @@ describe('proxy read after write', () => {
img.image.ref.toString(),
),
)
expect(imgs.images[0].aspectRatio).toEqual({ height: 2, width: 1 })
expect(imgs.images[0].alt).toBe('alt text')
expect(replies[0].replies?.length).toBe(1)
// @ts-ignore
expect(replies[0].replies[0].post.uri).toEqual(replyRes2.uri)