mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-13 16:49:31 +08:00
test: add x-koa-x-cache header test
This commit is contained in:
@@ -64,6 +64,11 @@ describe('response', () => {
|
|||||||
it(`/test (cache)`, async () => {
|
it(`/test (cache)`, async () => {
|
||||||
const response = await request.get('/test');
|
const response = await request.get('/test');
|
||||||
expect(response.status).toBe(200);
|
expect(response.status).toBe(200);
|
||||||
|
if (config.cacheType === 'memory') {
|
||||||
|
expect(response.headers['x-koa-memory-cache']).toBe('true');
|
||||||
|
} else if (config.cacheType === 'redis') {
|
||||||
|
expect(response.headers['x-koa-redis-cache']).toBe('true');
|
||||||
|
}
|
||||||
|
|
||||||
await checkRSS(response);
|
await checkRSS(response);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user