Skip to content

Commit

Permalink
docs(bufferWhen): fix marble diagram (#6767)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakovljevic-mladen committed Apr 19, 2022
1 parent 2374968 commit e5aaec1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
Binary file not shown.
1 change: 1 addition & 0 deletions docs_app/src/assets/images/marble-diagrams/bufferWhen.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs_app/src/assets/images/marble-diagrams/delay.png
Binary file not shown.
15 changes: 15 additions & 0 deletions docs_app/tools/marbles/diagrams/bufferWhen.txt
@@ -0,0 +1,15 @@
[styles]
event_radius = 33
operator_height = 60
completion_height = 80

---a---b---c---d---e---f---g---h---|

-------------s

> bufferWhen()

-------------x------------y--------(z|)
x := [a, b, c]
y := [d, e, f]
z := [g, h]
6 changes: 3 additions & 3 deletions spec/operators/bufferWhen-spec.ts
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import { of, EMPTY, Observable } from 'rxjs';
import { bufferWhen, mergeMap, takeWhile, take } from 'rxjs/operators';
import { of } from 'rxjs';
import { bufferWhen, mergeMap, takeWhile } from 'rxjs/operators';
import { TestScheduler } from 'rxjs/testing';
import { observableMatcher } from '../helpers/observableMatcher';

Expand All @@ -16,7 +16,7 @@ describe('bufferWhen operator', () => {
testScheduler.run(({ hot, cold, expectObservable }) => {
const e1 = hot('--a--^---b---c---d---e---f---g---------| ');
const e2 = cold(' --------------(s|) ');
// --------------(s |)
// --------------(s|)
const expected = ' --------------x-------------y-----(z|)';
const values = {
x: ['b', 'c', 'd'],
Expand Down
2 changes: 1 addition & 1 deletion src/internal/operators/bufferWhen.ts
Expand Up @@ -13,7 +13,7 @@ import { innerFrom } from '../observable/innerFrom';
* starts collecting values, it calls a function that returns an Observable that
* tells when to close the buffer and restart collecting.</span>
*
* ![](bufferWhen.png)
* ![](bufferWhen.svg)
*
* Opens a buffer immediately, then closes the buffer when the observable
* returned by calling `closingSelector` function emits a value. When it closes
Expand Down

0 comments on commit e5aaec1

Please sign in to comment.