-
Notifications
You must be signed in to change notification settings - Fork 37
Unit Testing
janodvarko edited this page Oct 31, 2014
·
7 revisions
Learn how to write unit tests for Firebug code base.
The first thing you want to usually do before implementing a new test is setup your test environment and run the existing test suite to make sure all is up and running.
- git clone https://github.com/firebug/firebug.next.git
- Make sure you have an updated copy of Firefox Nightly installed.
- Make sure you have npm & jpm installed. Read instructions.
- Install Firebug's dependencies by running
npm install
in the source directory (created in step 1). - Run tests using
jpm test -b nightly -v
in the source directory.
Firebug repository is integrated with Travis. You can see the build status here.
Firebug uses addon-httpd module (see devDependency
in package.json) as HTTP server for tests (see MDN).
- In order to run only specific tests use
--filter=FILENAME[:TESTNAME]
. This only run tests whose filenames match FILENAME and optionally match TESTNAME, both regexps. For example: if you specify--filter data
, then jpm will only run tests in those modules whose name contain the string "data".
TODO