question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot set property 'compatibilityChecked' of undefined when running Mocha Tests

See original GitHub issue

Link 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:

  1. import PDFjs from 'pdfjs-dist' into component on React
  2. run mocha tests

What is the expected behavior? (add screenshot) screen shot 2017-05-18 at 10 25 01 am

What went wrong? (add screenshot) screen shot 2017-05-18 at 10 25 28 am

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

opinion: screen shot 2017-05-18 at 10 50 16 am 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yurydelendikcommented, May 18, 2017

a small project to reproduce the problem is needed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found