import { describe, expect, it } from '@jest/globals'; import parser from '@/utils/rss-parser'; import { config } from '@/config'; import nock from '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, '']; }); await parser.parseURL('http://rsshub.test/test'); }); });