Bjorn
16edbf9fee
Merge pull request #51 from bonzini/master
...
flatten: avoid early completion
2020-01-15 10:43:54 -08:00
Paolo Bonzini
1cbd5b2ca6
flatten: avoid early completion
...
The flatten operator currently calls onCompleted as soon as the
parent signals that it has completed. However, there could be
more data incoming from the returned observables; in fact, the
flattened observable might even be infinite.
Track how many subscriptions are still active, and only call
onCompleted at the time of the last completion.
2020-01-14 17:24:33 +01:00
Bjorn
98f6eaa377
Merge pull request #49 from 4O4/editorconfig
...
Add editorconfig
2019-10-20 14:42:55 -07:00
bjorn
355e14616e
Formatting;
2019-10-20 14:43:33 -07:00
Bjorn
13a983787b
Merge pull request #45 from 4O4/observer-tests-improvements
...
Observer tests improvements
2019-10-20 14:40:26 -07:00
Bjorn
d885bb6b86
Merge pull request #48 from 4O4/lust-update
...
Update lust and test runner script
2019-10-20 13:53:03 -07:00
4O4
0f81a5640b
Remove redundant whitespaces
2019-10-09 10:58:01 +02:00
4O4
fd7d8fb1d4
Fix custom lust paths
2019-10-09 10:49:52 +02:00
4O4
2388041ee0
Fix wrappers
...
Forgot to pass-through the params
2019-10-09 10:39:05 +02:00
4O4
1e3c1d542b
Add editorconfig
2019-10-09 10:30:11 +02:00
4O4
0d1d147de2
Wrap spies with anonymous functions
2019-10-09 10:27:15 +02:00
4O4
b3442b838a
Spy on public api instead of implementation details
2019-10-09 00:17:31 +02:00
4O4
c3afae67e0
Update lust to resolve problems from earlier versions
2019-10-09 00:17:06 +02:00
4O4
f5d29f7758
Improve Observer tests
...
Basically all tests are rewritten here. Implementation details should
not be checked because tests are becoming fragile when it comes to any
refactoring.
What instead should be tested is the actual **public behavior** of the
library when using its public interfaces.
While doing all these changes the following assumptions about this codebase
have been made:
- class fields which are prefixed with underscore (like `observer._onNext`)
are intended to be private and thus should only be accessed by members of
the same class or its subclasses
- `observer.stopped` is a public **readonly** field and should never be
modified by the outside world, because its role is considered to be
purely informational
If the above assumptions are not correct, this will need to be discussed
further. These improvements of the tests are necessary to introduce any
changes which include refactoring of the `Observer` in order to fix some
bugs.
2019-10-02 17:24:12 +02:00
4O4
f9c29e1f17
Add testing helpers for dealing with multiple errors
2019-10-02 17:11:52 +02:00
Bjorn Swenson
78363657ed
Merge pull request #41 from StrangePan/issue-40
...
Fix zip operators not returning a subscription, issue #40
2019-05-07 14:03:21 -07:00
Daniel Andrus
823c9526f8
Fix zip operator not producing a Subscription
2019-05-07 10:55:38 -07:00
Daniel Andrus
4a475209f1
Add unsubscription test for zip operator
2019-05-07 10:48:47 -07:00
Bjorn Swenson
cf92f8e82a
Merge pull request #39 from naxxster/fix-onError-test-code
...
Add an assertion like 'expect(observable).to.produce.error()' to test…
2019-05-01 12:17:44 -07:00
Junseong Jang
f9ff630135
Add an assertion like 'expect(observable).to.produce.error()' to test 'onError'.
...
Fixed wrong test codes with the assertion.
Changed the behaviors of the following functions caused by argument types, to raise an error in the creation phase.
- Observable.defer
- Observable:buffer
- Observable:elementAt
- Observable:skipLast
- Observable:takeLast
- Observable:window
2019-03-28 03:04:58 +09:00
Bjorn Swenson
c6e6c543b2
Merge pull request #36 from naxxster/fix_flatten_subscription
...
Fix `flatten` operator's subscription to unsubscribe from all sources
2019-03-12 02:47:36 -07:00
Junseong Jang
a158200231
Fix `flatten` operator's subscription to unsubscribe from all sources
...
The `flatten` operator should unsubscribe from all flattened sources
2019-03-12 17:58:11 +09:00
Bjorn Swenson
3e2786130e
Merge pull request #35 from Metastruct/patch-1
...
Rename 'continue' -> '_continue'.
2019-03-01 12:10:27 -08:00
PotcFdk
f460f9420f
Rename 'continue' -> '_continue'.
2019-03-01 14:25:00 +01:00
bjorn
b2c4522f4a
Add debounce docs;
2019-01-29 02:59:33 -08:00
bjorn
132e8e8ae1
Iterate Subject observers in reverse;
...
To fix problems with removing items from a table while iterating.
2018-12-03 08:53:58 -08:00
Bjorn Swenson
687c7e53b4
Merge pull request #33 from naxxster/fix-merge-source-completed
...
Fix merge operator to handle onCompleted of input observables not a d…
2018-12-02 09:52:47 -08:00
Bjorn Swenson
66af07f13b
Merge pull request #32 from naxxster/fix-switch-subscription
...
Fix switch operator subscription to unsubscribe from inner subscription
2018-12-02 09:49:44 -08:00
Bjorn Swenson
ebe4eb8ea6
Merge pull request #31 from naxxster/fix-with-subscription
...
Fix with operator subscription to unsubscribe from all sources
2018-12-02 09:47:49 -08:00
Junseong Jang
5e4e857c96
Fix merge operator to handle onCompleted of input observables not a destructive way
...
The merge operator removed the source observable if it complete.
After that the subscriptions after that source observable index can not unsubscribe.
Fix the issue by recording the completed source index, as combineLatest operator does.
2018-11-28 17:20:41 +09:00
Junseong Jang
24450712be
Fix switch operator subscription to unsubscribe from inner subscription
...
The switch operator should unsubscribe from inner subscribed source
2018-11-22 19:10:02 +09:00
Junseong Jang
8093dcbd21
Fix with operator subscription to unsubscribe from all sources
...
The with operator should unsubscribe from all subscribed sources
2018-11-20 14:35:07 +09:00
bjorn
14a33c5614
Update build;
2018-09-12 11:54:43 -07:00
bjorn
6110f957ef
Improve Observable.fromFileByLine test coverage;
2018-09-12 11:52:35 -07:00
bjorn
457fe4cde3
Observable.fromFileByLine: formatting;
2018-09-12 11:47:08 -07:00
bjorn
4962bdb523
Add tests for Observable.fromFileByLine;
2018-09-12 11:46:28 -07:00
bjorn
ef6f80be0b
Update README;
2018-09-12 11:36:04 -07:00
bjorn
c8a21d456b
Update rx.lua;
2018-09-12 11:23:11 -07:00
bjorn
8b825ffc44
Update tools build version;
2018-09-12 11:22:58 -07:00
Bjorn Swenson
34c8fee29a
Merge pull request #28 from naxxster/fix-combineLatest-unsubscribe-skip
...
Fix combineLatest operator subscription to unsubscribe from all subscription
2018-08-30 20:41:05 -07:00
Bjorn Swenson
c89f0de521
Merge pull request #27 from naxxster/fix-merge-subscription
...
Fix merge operator to produce a subscription.
2018-08-30 20:40:56 -07:00
Junseong Jang
f1363ea5c5
Fix combineLatest operator subscription to unsubscribe from all subscription
...
If there is any nil subscription from sources,
the subscription skips to unsubscribe from the rest source's subscriptions.
2018-08-31 12:26:56 +09:00
Junseong Jang
ff284ad215
Fix merge operator to produce a subscription.
2018-08-31 12:17:50 +09:00
Bjorn Swenson
6e43f56e77
Merge pull request #25 from naxxster/fix-combineLatest-subscription
...
Fix combineLatest to produce the subscription.
2018-06-18 22:33:14 -07:00
xster
081b2cf55b
Fix combineLatest to produce the subscription.
2018-05-17 17:25:11 +09:00
Bjorn Swenson
e56cf8917e
Merge pull request #23 from titouanc/fit-sample-spec
...
Sample should not produce anything before the source has produced a value
2017-10-03 09:49:04 -07:00
iTitou
20ec3b7bef
[fix] Sample should not produce anything before the source has produced any value
2017-10-03 11:31:23 +02:00
bjorn
763ab162cd
Add 0.0.3 rockspec;
2017-06-24 13:15:08 -07:00
bjorn
f128b4844a
Improve test coverage;
2017-06-24 13:03:56 -07:00
bjorn
611166ce36
Improve error tests;
2017-06-24 12:31:29 -07:00