mardi 7 juillet 2015

Need to test chrome extension without using stubs

I've read up a bunch on unit and e2e testing for chrome extensions, but haven't been able to find a way to make the full chrome API available to my testing scripts.

I need to be able to guarantee, for example, that on sign-out certain tokens are deleted, which I'm not sure can be done with stubs?

Currently the tests are being run with Karma and Jasmine. I've tried running them from an html file within the extensions directory, but this only gives me access to a subset of the api... leaving out parts like chrome.storage.local...

I'm also new to development and testing in general, so there might be a simple solution. I've thought of trying to get Karma to launch through the extension itself, and then run the tests in the background page... Would that be possible? How would I configure Karma to run via the extension, instead of by running all of the test files in a new browser window?

Aucun commentaire:

Enregistrer un commentaire