Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Latest commit

 

History

History
31 lines (20 loc) · 861 Bytes

UnitTests.md

File metadata and controls

31 lines (20 loc) · 861 Bytes

Unit Tests

The unit tests are based around Mocha and Sinon. This gives a very simple mocking and test interface.

They are run using Karma, which also provides for code coverage.

WebExtension Stubbing

WebExtensions are automatically stubbed by the sinon-chrome package.

Note: Currently the package only stubs chrome.* APIs. There is an issue on file to consider supporting the Firefox ones - browser.*

Test Files

The test files live in the test/unit directory. karma.conf.js controls the loading and running of tests.

Running the Tests

$ npm run test:karma

Viewing coverage output

You can view the code output in the build/coverage/ directory.