Add tests for onResolved/onRejected return value.

These tests are still incomplete, as the return value could be a
promise.
package.json: devDependencies: update