Persist comment source monitoring
This commit is contained in:
1 parent
5e1fc5def9
commit
8d932fcf36
16 files changed
+376
-24
No files matched your search
@@ -54,6 +54,20 @@ describe('RedditApiClient', () => {
|
||||
params: { limit: 10, depth: 1, sort: 'hot', raw_json: 1 }, headers: {},
|
||||
});
|
||||
});
|
||||
|
||||
it('can request newest comments for a durable source-post watch', async () => {
|
||||
const get = vi.fn().mockResolvedValue({
|
||||
data: [{ data: { children: [] } }, { data: { children: [] } }],
|
||||
});
|
||||
vi.mocked(axios.create).mockReturnValue({ get } as unknown as AxiosInstance);
|
||||
const client2 = new RedditApiClient(getTestConfig(), logger);
|
||||
|
||||
await client2.getBrowsingComments('scene', 'source', 100, 'new');
|
||||
|
||||
expect(get).toHaveBeenCalledWith('/r/scene/comments/source.json', {
|
||||
params: { limit: 100, depth: 1, sort: 'new', raw_json: 1 }, headers: {},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('hasImage', () => {
|
||||
|
||||
Reference in new issue
Block a user