Fix some external requests not being mocked

This commit is contained in:
Hongbo Wu
2023-03-06 16:24:25 +08:00
parent 39b79f5cd2
commit 42dc3f7330
4 changed files with 10 additions and 5 deletions

View File

@ -22,9 +22,9 @@ const load = (path: string): string => {
}
describe('parseMetadata', () => {
it('gets author, title, image, description', async () => {
it('gets author, title, image, description', () => {
const html = load('./test/utils/data/substack-post.html')
const metadata = await parsePageMetadata(html)
const metadata = parsePageMetadata(html)
expect(metadata?.author).to.deep.equal('Omnivore')
expect(metadata?.title).to.deep.equal('Code Block Syntax Highlighting')
expect(metadata?.previewImage).to.deep.equal(