This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Commit 548c0a0
committed
feat(ngMocks): Describe unflushed http requests
The current implementation of $httpBackend.verifyNoOutstandingRequest
gives an integer number describing how many requests are unflushed.
While it's superficially easy to solve test errors from that message
by simply adding an additional $httpBackend.flush(), if a developer
is truly not expecting the code to make further requests this is
not ideal.
This change explicitly prints out which additional requests remain
unflushed in the error message, helping her determine if the code
needs changing, or if an additional flush is appropriate.
Before this change:
Unflushed requests: 1
After this change:
Unflushed requests:
GET /some
Closes #105961 parent 69c3faf commit 548c0a0
2 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1378 | 1378 | | |
1379 | 1379 | | |
1380 | 1380 | | |
| 1381 | + | |
1381 | 1382 | | |
1382 | 1383 | | |
1383 | 1384 | | |
| |||
1884 | 1885 | | |
1885 | 1886 | | |
1886 | 1887 | | |
1887 | | - | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
1888 | 1894 | | |
1889 | 1895 | | |
1890 | 1896 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
1681 | | - | |
| 1681 | + | |
1682 | 1682 | | |
1683 | 1683 | | |
1684 | 1684 | | |
| |||
1690 | 1690 | | |
1691 | 1691 | | |
1692 | 1692 | | |
1693 | | - | |
| 1693 | + | |
1694 | 1694 | | |
1695 | 1695 | | |
1696 | 1696 | | |
| |||
0 commit comments