Add tests for cancelling promises.