function wrapResolver(context, fn) {
    return function wrappedResolveReject(val) {
      const promise = context.promise
      if (promise && promise[symbols.context]) {
        promise[symbols.context].getSegment().touch()
      }
      fn(val)
    }
  }
Wraps the resolve/reject functions of a when.js Promise

@param {object} context object to update execution context
@param {Function} fn function reference `resolve` or `rejct`
@returns {Function} wrapped function