return endoscope
      .run()
      .catch(cb)
      .then(result => {
        expect(cb).toHaveBeenCalled();