mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
test: rss-parser
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
const parser = require('../../lib/utils/rss-parser');
|
||||
const config = require('../../lib/config').value;
|
||||
const nock = require('nock');
|
||||
|
||||
describe('got', () => {
|
||||
it('headers', async () => {
|
||||
nock('http://rsshub.test')
|
||||
.get('/test')
|
||||
.reply(function () {
|
||||
expect(this.req.headers['user-agent']).toBe(config.ua);
|
||||
return [200, '<rss version="2.0"><channel><item></item></channel></rss>'];
|
||||
});
|
||||
|
||||
await parser.parseURL('http://rsshub.test/test');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user