An example of how to design a testable and modularized Chrome extension.
To set up the build environment, run npm install
, then bundle install
.
Run gulp
to build the extension, then run unit and integration tests.
If you haven't already, be sure to read our blog post on how to design a testable Chrome Extension.
This extension is built using Gulp. Because of this, we can split our extension into multiple modules, then concatenate them at build time.
Unit tests are run by concatenating the background script and the Jasmine spec files, then running them with Karma. Integration tests are run by installing the extension on a Watir browser, then running Rspec tests on the browser.