mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-11 15:47:48 +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 () => {
|
||||
const response = await request.get('/test');
|
||||
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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user