Add an optional type parameter to 'test' task.

Preserve the current default, mochaspec.