Skip to content
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

Testing platforms #19

Open
jonathanKingston opened this issue May 23, 2017 · 1 comment
Open

Testing platforms #19

jonathanKingston opened this issue May 23, 2017 · 1 comment

Comments

@jonathanKingston
Copy link
Contributor

@princiya asked how we should be testing the extension so lets discuss that here.

This example has both functional and unit tests: https://github.com/Standard8/example-webextension

Unit tests likely make the most sense for the storage methods. For browser apis we potentially could mock them but I suspect it might make more sense to make those functional tests.

I don't think there needs to be a rush to decide right now which libraries are best.
Personally for unit testing I have used mocha and chai assert a lot. I also have used ava which seems very promise ready: https://github.com/avajs/ava

@jonathanKingston
Copy link
Contributor Author

@princiya the code https://github.com/electrolyfish/lightbeam-we/blob/master/js/store.js#L62 needs to be moved into non functional code, even if we make it require a console call to trigger it for now. However moving this to be a test would be neater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants