mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 12:21:31 +08:00
feat: node name
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
process.env.NODE_NAME = 'mock';
|
||||
|
||||
const supertest = require('supertest');
|
||||
const { server } = require('../../lib/index');
|
||||
const request = supertest(server);
|
||||
@@ -15,6 +17,6 @@ describe('header', () => {
|
||||
expect(response.headers['content-type']).toBe('application/xml; charset=utf-8');
|
||||
expect(response.headers['cache-control']).toBe(`public, max-age=${config.cache.routeExpire}`);
|
||||
expect(response.headers['last-modified']).toBe(response.text.match(/<lastBuildDate>(.*)<\/lastBuildDate>/)[1]);
|
||||
// expect(response.headers.etag).toBe('"b37-MORyrF0tJ8BFw0xLLZL/zBYAFPY"');
|
||||
expect(response.headers['rsshub-node']).toBe('mock');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user