I am trying to build some unit tests, but whenever I have the import of some native libraries (like contentLib and nodeLib, for example. Please see the imports in the first image) from enonic in the controller to be tested I have problems like the one shown in the image.
It’s hard to figure this one out without being able to see the structure of your project. If you are saying that the same import works fine outside of unit tests, it might be incorrect reference path to the lib. Based on the stack trace, there’s something on line 5 of lib/util/util.js which causing the error.