File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/metascraper-readability Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 22
33const { Window } = require ( 'happy-dom' )
44const { readFileSync } = require ( 'fs' )
5+ const path = require ( 'path' )
56
67const url = 'https://arxiv.org/pdf/2412.06592'
7- const html = readFileSync ( './fixture.html' , 'utf8' )
8+ const html = readFileSync ( path . resolve ( __dirname , './fixture.html' ) , 'utf8' )
89
910const isEqual = ( value1 , value2 ) =>
1011 JSON . stringify ( value1 ) === JSON . stringify ( value2 )
@@ -20,7 +21,7 @@ const cases = {
2021 const window = new Window ( { url } )
2122 const document = window . document
2223 document . write ( html )
23- await window . happyDOM . waitUntilComplete ( )
24+ // await window.happyDOM.waitUntilComplete()
2425 return document
2526 }
2627}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const getDocument = ({ url, html }) => {
1515 const { Window } = require ( 'happy-dom' )
1616 const window = new Window ( { url } )
1717 const document = window . document
18- document . documentElement . innerHTML = html
18+ document . write ( html )
1919 return document
2020}
2121
You can’t perform that action at this time.
0 commit comments