Created
December 21, 2024 04:41
-
-
Save YonatanKra/e426959e065bfde9fe3186d9c883684b to your computer and use it in GitHub Desktop.
This file contains 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
describe('run()', () => { | |
it('should fire the callback on every streaming event', async () => { | |
queueAgentFeedResponse(fullFeedResponse); | |
queueAgentFeedResponse(fullFeedLastResponse); | |
const spy = vi.fn(); | |
await bot.run(handle, 'password', spy); | |
expect(spy).toHaveBeenCalledTimes(2); | |
}); | |
}); |
This file contains 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
async run(handle, callback: () => {}) { | |
await this.streamPosts(handle, (data) => callback()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment