code: function patchIt(specs) {
    var original = it;
    var restore = function() {
      it = original;
      xit = it.skip;
    };
  
    var createSpec = function(name, fn, opts) {
      opts = opts || {};
  
      var spec = {
        name: name,
        getPromise: function() {
          var start = Date.now();
          return createWrapper(fn, spec.ctx)().then(function(duration) {
            spec.duration = duration;
          });
        },
        duration: 0,
        only: opts.only || null,
        skip: opts.skip || null,
        timeout: null,
        error: null,
        promise: null
      };
  
      spec.ctx = new ContextProxy(spec);
      specs.push(spec);
    };
  
    it = function it(name, fn) {
      createSpec(name, fn, {skip: !fn});
    };
  
    xit = it.skip = function skip(name, fn) {
      createSpec(name, fn, {skip: true});
    };
  
    it.only = function only(name, fn) {
      createSpec(name, fn, {only: true});
    };
  
    return restore;
  }
docs: Patches the global it() function used by mocha, and returns a function that
  restores the original behavior when invoked.
  
  @param   {Spec[]}   specs Array on which to push specs
  @returns {function} Function that restores the original it() behavior