code: function complete(e) {
      clearTimeout(doneTimeout);
      if (!done) { return; }
      var d = done;
      done = null;
      if (e) {
        // test failure
        if (!(e instanceof Error)) {
          e = new Error(e);
        }
        d(e);
      } else {
        // test passed
        d();
      }
    }
docs: Called whenever an async test passes or fails. if `e` is passed, that means the test failed with exception `e`