File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import jsdom from 'jsdom' ;
22
33export default function createWebPageDOM ( content , location ) {
4- const document = new jsdom . JSDOM ( content , {
4+ const { document } = new jsdom . JSDOM ( content , {
55 url : location ,
66 virtualConsole : new jsdom . VirtualConsole ( ) ,
7- } ) . window . document ;
7+ } ) . window ;
88
99 return Object . assign ( document , {
1010 select ( contentSelectors ) {
Original file line number Diff line number Diff line change @@ -199,7 +199,6 @@ describe('createWebPageDOM', () => {
199199 expect ( ( ) => document . selectRange ( rangeSelector ) ) . to . throw ( JSON . stringify ( rangeSelector ) ) ;
200200 } ) ;
201201
202-
203202 it ( 'throws a clear error when the endAfter selector has no match' , ( ) => {
204203 const rangeSelector = {
205204 startAfter : '.introduction' ,
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ describe('Filter', () => {
191191 describe ( '#updateProtectedLinks' , ( ) => {
192192 before ( async ( ) => {
193193 const link = webPageDOM . createElement ( 'a' ) ;
194+
194195 link . href = 'https://example.com/email-protection' ;
195196 link . className = 'email-protection' ;
196197 link . innerHTML = 'Click here' ;
You can’t perform that action at this time.
0 commit comments