Circular dependencies causing local unit test failures. But the tests succeed in jenkins. Why?

I have a react app. We use jest and the react testing library for unit testing. Sometimes, we receive the following error:

“TypeError: Cannot read property ‘X’ of undefined”

Typically points to a circular dependencies. But we only see this locally. Jenkins runs and passes the test just fine.

Why would that be? It’d be nice if test failures were the same on jenkins and locally…

Thanks!