asyncout-773313: Test tweak - finally > variable

It's better to put the test function call in a try {} finally {} block
than store the return value, tidy-up and return because it's more
resilient to failure, and clearer.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
asyncout-773313: Fix test runner

The test runner was being somewhat overzealous with its calling of
callbacks. Part of the fix is storing the callback so there are fewer
of them. This also moves the asynchronaity to Test and removing it from
the Suite. It needs to be in Test to satisfy assert.checkCalled, and so
we don't really need it in Suite any more.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
asyncout-773313: Note completed test run

Signed-off-by: Joe Walker <jwalker@mozilla.com>
asyncout-773313: Use test.checkCalled for async output

We are now in a position to check delayed test output using our shiny
new checkCalled test harness feature.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: Create 'exports' alias

In short: s/exports/mockCommands/g.
In general we've been reducing the number of exports aliases, because
although it's handy when moving code from one module to another to not
have the functions change name from exports.foo to blah.foo, that's not
a regular occurrence, and it creates complexity. However in this case
where we're importing code into Firefox mochitests where everything is
in the same global, it's much simpler.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: Remove defaultOptions

defaultOptions were useful when we had environments (e.g. node) where
we had no DOM, but since we've been using JS-DOM, we don't need to have
a tiny fake DOM, because we've got a big fake DOM.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: Remove test guards

We were previously protecting all sort of failing tests against things
like tiny fake DOM implementations. Since we're doing so much test
hackery now is a good time to re-evaluate them all.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: s/test/assert/g & fix testResource

Moving test files into firefox JS land brings up a name clash over
'test', where in mochitest 'test' is the name of the initial test
function, and here is is what we call the assert module by default.

It's normal with GCLI to call imported modules by their name, so we are
renaming the import of the assert module to assert, which solves both
problems.

Also a previous changeset in this series removed all of the fakeDom and
firefox guards from the tests. The resource test module still fails
because we're not running the tests in the environment that it expects
so the failing tests are re-skipped.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: remove options from exec

For some reason the version of helpers in firefox was one step ahead
of the version of helpers in GCLI in getting rid of the redundant
'options' parameter. This brings GCLI up to date with the firefox way,
needed now because the GCLI tests are now running against the firefox
helpers implementation.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
testconcat-707492: Update build for separate files

Finally we update the Firefox build step to just copy over the GCLI
test files, converting them into mochitest files as they go by:
- Adding a test() function
- Using helpers/assert/mockCommands from builtin

This change also has the nice side-effect of getting rid of several
mozilla build files from the GCLI tree.

Signed-off-by: Joe Walker <jwalker@mozilla.com>
docs-796881: Update readme.md

Improve getting started and add links

Signed-off-by: Joe Walker <jwalker@mozilla.com>
Merge branch 'testconcat-707492'
Merge branch 'asyncout-773313'

Conflicts:
	lib/gclitest/helpers.js