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.

Upgrade from version 3 to 5 is breaking all my tests

See original GitHub issue

Current behaviour 💣

I’ve upgraded from version 3 to 5 and it’s breaking all my tests

image

image

 TypeError: Cannot read property 'Tag' of undefined

      at Object.<anonymous> (../../../node_modules/domhandler/lib/node.js:32:35)
      at Object.<anonymous> (../../../node_modules/domhandler/lib/index.js:15:14)
      at Object.<anonymous> (../../../node_modules/htmlparser2/lib/index.js:2:18)
      at Object.<anonymous> (../../../node_modules/cheerio/lib/parse.js:4:18)
      at Object.<anonymous> (../../../node_modules/cheerio/lib/cheerio.js:5:13)
      at Object.<anonymous> (../../../node_modules/cheerio/index.js:5:28)
      at Object.<anonymous> (../../../node_modules/enzyme/src/Utils.js:9:1)
      at Object.<anonymous> (../../../node_modules/enzyme/src/ShallowWrapper.js:5:1)
      at Object.<anonymous> (../../../node_modules/enzyme-to-json/utils.js:12:46)
      at Object.<anonymous> (../../../node_modules/enzyme-to-json/createSerializer.js:8:14)
      at Object.<anonymous> (../../../node_modules/enzyme-to-json/serializer.js:3:48)
          at Array.forEach (<anonymous>)

Expected behaviour ☀️

I haven’t changed anything in my tests, I need this library for webpack to build my html pages but updating this library ends up breaking all my tests. Expected behaviour would be for it not to break everything

Environment 🖥

Node.js v14.17.1 linux 5.4.0-1041-aws 6.14.13 @services/myApp@3.27.0 /home/ksimilien/code/pinboard/services/pq3/client └── (empty)

(.venv) ~/code/pinboard/services/pq3/client$ npm ls html-webpack-plugin @services/myApp@3.27.0 /home/ksimilien/code/pinboard/services/pq3/client └── (empty)

"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"enzyme-to-json": "^3.4.4",

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jantimoncommented, Feb 17, 2022

The code from 3 to 4 and 4 to 5 introduced breaking changes.

That’s why the major version has increased.

0reactions
jantimoncommented, Feb 17, 2022

sorry i have never had this problem before and would need to debug it by myself

Read more comments on GitHub >

github_iconTop Results From Across the Web

upgrading from version 4.0.3 to 5.0.1 breaks async/await tests ...
I have recently upgraded the version of react from version 4.0.3 to 5.0.1 ... working correctly, now the async/await tests all fail or...
Read more >
Upgrading - NUnit Docs
This document assumes you are upgrading to NUnit 3.0 from NUnit 2.6 or later. ... review this page to see which items are...
Read more >
Unit Tests Failing After Updating React Scripts from v.3.4.4 to v ...
In the process, resetMocks is set to true which was breaking the implementation in the test above, causing them all to time out....
Read more >
Upgrading to WebDriverIO 5 - Chris Kenst
I knew version 5 was out but I had no immediate plans to upgrade given all of the warnings around breaking changes.
Read more >
Update to MSTestV2 - Visual Studio (Windows) - Microsoft Learn
In this article ... You can upgrade your test project by retargeting the MSTest version referenced in your .csproj from the MSTestV1 to...
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