This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Conversation
IgorMinar
approved these changes
Mar 9, 2018
IgorMinar
left a comment
Contributor
There was a problem hiding this comment.
please add docs - otherwise lgtm
| @@ -0,0 +1,30 @@ | |||
| import { Observable } from 'rxjs/Observable'; | |||
|
|
|||
| /** adds specified delay (in ms) to both next and error channels of the response observable */ | |||
Contributor
There was a problem hiding this comment.
please add docs you wrote for changelog also here so that nobody reading the code is wondering why we have a custom delay operator.
Contributor
Author
There was a problem hiding this comment.
Added reference to the CHANGELOG
wardbell
force-pushed
the
fix-delay
branch
2 times, most recently
from
March 9, 2018 22:06
6dc1617 to
d81e9c3
Compare
wardbell
commented
Mar 9, 2018
| <a id="0.5.4"></a> | ||
| ## 0.5.4 (2018-03-09) | ||
|
|
||
| Simulated HTTP error responses were not delaying the prescribed time when using RxJS `delay()` |
Contributor
Author
There was a problem hiding this comment.
Describes the change to the implementation of simulated delay
wardbell
commented
Mar 9, 2018
| */ | ||
| protected addDelay(response: Observable<any>): Observable<any> { | ||
| const d = this.config.delay; | ||
| return d === 0 ? response : delay.call(response, d || 500); |
Contributor
Author
There was a problem hiding this comment.
Replaces RxJS delay() (incorrect for errors) with new delayRespons() function.
Contributor
Author
|
Piggy backed fix to issue #180 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes bug in which a simulated HTTP error did NOT honor the prescribed latency delay.
New
makeResponseDelay()function cures that.Added tests for this.
Library no longer uses RxJS
delay()which may make userland tests easier because Angular TestBed "hates" RxJSdelay()(it usesinterval()).Also closes #180.
When this PR is merged, can publish the new version to NPM as release 0.5.4.