-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement tests! #13
Comments
I want to do that, but I don't have any experience. Maybe you can give me some source, or names how I should google it to learn it? @captainbrosset ? @juliandescottes |
Thanks @AugustasV ! There are no "extension-specific" tests we could easily implement, so the best to get started would be to pick a javascript unit test framework and write unit tests after extracting the main logic of the extension to dedicated files. Some devtools repositories use jest, so that might be an option. Let me know if you need pointers on how to set this up for this project. Setting up a unit-testing solution will already be a great step forward here. Regarding actually writing test, it can be done afterwards. I haven't read the code in too much details so @captainbrosset probably can point to which part of the code would be worth testing at the moment? |
This sounds like a good plan. Thank you @juliandescottes. In terms of what to test, an interesting part is in https://github.com/captainbrosset/devtools-highlighter/blob/master/src/devtools/panel/devtools-panel.js This is where the code that displays nodes and handles UI interactions currently lives. The other part is in https://github.com/captainbrosset/devtools-highlighter/blob/master/src/content_scripts/content.js |
This was hacked up together in one evening, so of course tests were the last thing on my mind. But it won't be able to survive much longer without proper testing.
The text was updated successfully, but these errors were encountered: