nmaier / extsdk

Lightweight Extension SDK
Mozilla Public License 2.0
9 stars 8 forks source link

Add some test framework #3

Open nmaier opened 9 years ago

nmaier commented 9 years ago

We need some "framework" before we can write unit tests.

The thing should: 1) Pick tests files from e.g. a tests/ directory 2) "compile" that into temp. extension 3) Create a temp profile (mozrunner/mozbase/mozharness?) 4) A (special?) bootstrap.js would then setup and run the tests (as main) 5) A test helper/harness would provide testing methods (asserts) and do the reporting and auto-shutdown.

It also would be possible to seperate tests into xpcshell-compatible tests and those which require a full browser (comparable to mozilla xpcshell-test vs. mochitest).

It might be also feasible to fork the add-on sdk jpm tooling.

CC @xabolcs

xabolcs commented 9 years ago

If I try to transplant sdk/test/assert.js (and it's friends) from Addon SDK I'm doing it wrong?