-
Eduardo Sanz García authored
The tests crashed if either of these commands was executed: - `yarn test --grep anchoring`, or - `yarn test --grep 'anchoring/test/pdf|test/integration/anchoring'` `src/anotator/anchoring/test/pdf-test.js` cleanup the Viewer by setting the `window.PDFViewerApplication' to `null`. After that, if another test created a `Guest` instance (like `src/annotator/test/integration/anchoring-test.js`) will think that the document is a PDF and will crash. This is the code that checks if the document is a PDF: https://github.com/hypothesis/client/blob/492ab6d56a5685356ca6b3a48644e047bb28dca0/src/annotator/integrations/pdf.js#L53-L56 The solution is either deleting `window.PDFViewerApplication' or setting it to `undefined`.
922d6efd