Created
December 15, 2024 13:00
-
-
Save YonatanKra/01ad8b949a0de229231084cd6fae3e53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should return the post with altLess images list', async () => { | |
const imageWithoutAlt = { alt: '' }; | |
const imageWithAlt = { alt: 'I have Alt text!' }; | |
const post = { | |
uri: 'postUri', | |
cid: 'postCid', | |
value: { | |
embed: { | |
images: [imageWithoutAlt, imageWithAlt, imageWithoutAlt], | |
$type: 'image' | |
}, | |
text: '', | |
createdAt: '' | |
}, | |
}; | |
mockAtpAgent.getPost.mockResolvedValueOnce(post); | |
const result = await bot.checkSinglePost(postUri); | |
expect(result).toEqual({ post, imagesWithoutAlt: [imageWithoutAlt, imageWithoutAlt] }) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment