dockerfile/examples/omnivore/api/content-handler/test/apple-news-handler.test.ts

16 lines
450 B
TypeScript
Raw Permalink Normal View History

2024-03-15 14:52:38 +08:00
import { AppleNewsHandler } from '../src/websites/apple-news-handler'
import nock from 'nock'
describe('open a simple web page', () => {
before(() => {
nock('https://apple.news').get('/AxjzaZaPvSn23b67LhXI5EQ').reply(200, '')
})
it('should return a response', async () => {
const response = await new AppleNewsHandler().preHandle(
'https://apple.news/AxjzaZaPvSn23b67LhXI5EQ'
)
console.log('response', response)
})
})