fix(pds): include aspectRatio on read-sticky posts (#1824)
* fix: include aspectRatio on read-sticky * chore: add missing alt text test case
This commit is contained in:
parent
401538a933
commit
6da8182530
packages/pds
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user