TypeError: Cannot set property 'compatibilityChecked' of undefined when running Mocha Tests
See original GitHub issueLink to PDF file (or attach file here):
Configuration:
- Web browser and its version: Mocha Test Runner
- Operating system and its version: macOS Sierra 10.12.4
- PDF.js version: 1.8.359
- mocha, chai, enzyme
Steps to reproduce the problem:
import PDFjs from 'pdfjs-dist'
into component on React- run mocha tests
What is the expected behavior? (add screenshot)
What went wrong? (add screenshot)
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
opinion:
I believe the issue is stemming from here as there seems to be an issue with PDFJS
being undefined at this point and for some reason globalScope.PDFJS
is not properly initializing the object.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
using mocha test with node. this error: TypeError: Cannot set ...
i am making mocha test cases. but when i am running my file giving error. this my error. TypeError: Cannot set property 'files'...
Read more >Documentation - mocha.js
* Mocha instance is done running tests and references to test functions and hooks are cleaned. * You can reset this state by...
Read more >Help needed : impossible to test the simplest http request
Here's the test using Mocha, request and Chai : describe('HTTP REST API', ... TypeError: Cannot read property 'statusCode' of undefined. at Request.
Read more >Testing Node.js Code with Mocha and Chai - Stack Abuse
In this guide - learn the basics of testing in JavaScript with Mocha and Chai ... That's one of the main advantages of...
Read more >How To Test a Node.js Module with Mocha and Assert
Testing is an integral part of software development. It's common for programmers to run code that tests their application as they make changes ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
a small project to reproduce the problem is needed.
Something like https://github.com/zloirock/core-js/blob/master/modules/_global.js ?