Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created December 15, 2024 12:38
Show Gist options
  • Save YonatanKra/ab73e502ddd83cba0d6d5dea1693e5a3 to your computer and use it in GitHub Desktop.
Save YonatanKra/ab73e502ddd83cba0d6d5dea1693e5a3 to your computer and use it in GitHub Desktop.
it('should get the post using atpAgent', async () => {
const postUri = 'https://bsky.app/profile/yonatankra.com/post/3lczalvz7uk2l';
mockAtpAgent.getPost.mockResolvedValueOnce(postUri);
await bot.checkSinglePost(postUri);
expect(mockAtpAgent.getPost).toHaveBeenCalledWith({
"collection": "app.bsky.feed.post",
"repo": "handle-did",
"rkey": "3lczalvz7uk2l",
});
expect(mockAtpAgent.getPost).toHaveBeenCalledTimes(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment