Closed elvetemedve closed 6 years ago
The St library is private to gnome-shell, and can only be loaded inside a binary that has the st code linked in. Enabling a setup that does this for gnome-shell's own unit tests is issue #14. However, it's out of scope for this project to "de-privatize" a specific other project's library.
Such a setup described in #14 might work for unit-testing gnome-shell extensions. For now, I would recommend at least separating your core code from UI code and stubbing out the UI code, then hopefully you can achieve good test coverage without depending on a graphical environment anyway.
I thought this is the official way to test a Gnome Shell Extension. Meaning I should be able to test everyting with Jasmine without actually runing the extension by Gnome Shell.
I'll try to avoid testing UI components directly. Thanks for the hint.
I'm not sure there is currently an official way, but I'd love for jasmine-gjs to become it :smile: Let me know what your experiences are.
I can't introduce a direct dependency on gnome-shell though, because then projects that have nothing to do with gnome-shell will have to pull it in.
The problem
When I try to import the St library
And run jasmine, I get the error message below.
See also https://stackoverflow.com/questions/14002684/how-to-import-st-library-in-gjs
Should
jasmine-gjs
load the St library or I should create a stub for it?