Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngMock $httpBackend does not support numeric timeouts #4891

@bourey

Description

@bourey

ngMock's $httpBackend service appears to support promised-based timeouts, but not numeric ones. Example test demonstrating the issue:

it('should abort requests after numeric timeout', inject(function($timeout) {
  hb.expect('GET', '/url1').respond(200);

  hb('GET', '/url1', null, callback, null, 200);
  $timeout.flush(300);

  expect(callback).toHaveBeenCalledWith(-1, undefined, '');
  hb.verifyNoOutstandingExpectation();
  hb.verifyNoOutstandingRequest();
}));

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions