Enonic version: 7.0.2
OS: Ubuntu 19.10
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.
Is there anything that can be done so that I don’t get this error?
Do you include all of the libs you are using as dependencies in your
Yes, that was the first thing I checked. All are there.
In fact all imported libraries work well outside unit tests.
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.
@ksimonassi Do you have more info on this one or did you figure it out?