-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Add unit tests #25
Comments
I looked into this but couldn’t decide on a test framework. (Yeah, really.) Tests can be run with the A pull request would be very welcome. |
As I said, may js knowledge is minimal. But I'll give it a try, hopefully
soon.
Daniel Aleksandersen <notifications@github.com> schrieb am Mo., 6. Aug.
2018, 22:18:
… I looked into this but couldn’t decide on a test framework. (Yeah,
really.) Tests can be run with the gjs command directly, which means GLib
and the other imports will work in tests. The enable() and disable()
functions aren’t testable, however.
A pull request would be very welcome.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXJQYc6WX0cruYq2zaB82ZZQOXsoiz4Aks5uOKSogaJpZM4Vw_GL>
.
|
Refactor plan to make things more easily testable:
|
That sounds like a very good plan. Meanwhile I found this: Is there any way to write unit tests for GNOME-Shell extensions
|
Power Alt-Tab’s approach looks promising.
I don’t have permissions to do this, but I’m sure @stuartlangridge can assist in enabling it. However, the tests should be runnable locally too (
Why would the sources need to move? It messes with their history. Just stick tests in a subdirectory on it’s own. It’s common to keep them in |
All right, quite busy these last months (a wedding and a move) but I finally found some time and gave it a first try. |
Ah, one thing, any idea why the %r format string does not work on my system?
Consequently using |
Thank you for your work so far, @brandl-muc!
This may be locale dependant. Try switching to the en-US locale. It may have been set to an empty string in your locale, but that should also return as an empty string and not null. |
Created PR #33 to include my tests, feel free to critique. However since this needs jasmine-gjs just as power-alt-tab does, I didn't add anything to the makefile yet. It does not seem sensible to check out and install jasmine-gjs by issuing a makefile command. Suggestions are very welcome, otherwise we can also leave it like is. This works well for local execution and Travis integration should be easy. (hopefully) Next step would be breaking the |
I'm not at all js savvy nor would I know how to achieve this, but I think it might by a good idea to add tests to the project to avoid that the plugin breaks like with #13 . The bare minimum seems to be to test
overrider()
in extension.jsAny ideas or comments on this?
The text was updated successfully, but these errors were encountered: