You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
other (Please do not submit support requests here (see above))
Current behavior:
Starting in angular 1.6.0, when a unit test exercises an http call but doesn't specify an httpBackend expectation, neither the httpBackend.verifyNoOutstandingExpectation() nor the httpBackend.verifyNoOutstandingRequest() method throw an error. This problem still manifests in the latest snapshot.
Expected / new behavior:
Previously (on angular 1.5.11) each of the verify methods threw errors with the message "Unexpected request: GET No more request expected" when an http method was called without an accompanying expectation.
Minimal reproduction of the problem with instructions:
Write a unit test that exercises a $http call but don't tell httpBackend to expect it. Call httpBackend.verifyNoOutstandingExpectation() and httpBackend.verifyNoOutstandingRequest() and neither of them will throw an error and your test will pass.
Angular version: 1.6.3
This is an issue in 1.6.0 through the most recent snapshot of angular. An interesting note is that it is not the version of angular-mocks that makes the difference as I would have expected, but rather the version of core angular.
Browser: [all]
Happens in node/karma/jasmine tests and in Chrome jasmine runner (see plunk)