This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Commit d9128e7
feat(ngMock): 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: 1
GET /some
Closes #10596
Closes #159281 parent 0b54c1d commit d9128e7
2 files changed
+22
-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 | + | |
1888 | 1891 | | |
1889 | 1892 | | |
1890 | 1893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
1681 | | - | |
| 1681 | + | |
| 1682 | + | |
1682 | 1683 | | |
1683 | 1684 | | |
1684 | 1685 | | |
| |||
1690 | 1691 | | |
1691 | 1692 | | |
1692 | 1693 | | |
1693 | | - | |
| 1694 | + | |
| 1695 | + | |
1694 | 1696 | | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
1695 | 1711 | | |
1696 | 1712 | | |
1697 | 1713 | | |
| |||
0 commit comments