Gathering detailed insights and metrics for @kwonoj/rxjs-testscheduler-compat
Gathering detailed insights and metrics for @kwonoj/rxjs-testscheduler-compat
Gathering detailed insights and metrics for @kwonoj/rxjs-testscheduler-compat
Gathering detailed insights and metrics for @kwonoj/rxjs-testscheduler-compat
RxJS v4 TestScheduler interface for RxJS v5
npm install @kwonoj/rxjs-testscheduler-compat
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
12 Stars
104 Commits
2 Forks
1 Watchers
1 Branches
2 Contributors
Updated on Sep 19, 2018
Latest Version
1.0.3
Package Id
@kwonoj/rxjs-testscheduler-compat@1.0.3
Unpacked Size
49.14 kB
Size
12.21 kB
File Count
32
NPM Version
5.6.0
Node Version
9.8.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
rxjs-testscheduler-compat
provides RxJS v4's test scheduler interface to v5 version of RxJS allows to migrate existing test cases with minimum effort as well as writing new test cases for certain cases.
This has a peer dependencies of rxjs@5.*.*
, which will have to be installed as well
1npm install @kwonoj/rxjs-testscheduler-compat
You can import TestScheduler
and other helpers to create test cases.
1import * as Rx from 'rxjs'; 2import { TestScheduler, next, complete } from '@kwonoj/rxjs-testscheduler-compat'; 3 4const scheduler = new TestScheduler(); 5const observer = scheduler.createObserver(); 6 7const subject = scheduler.createHotObservable( 8 next(20, 'a'), 9 next(40, 'b'), 10 next(60, 'c'), 11 complete(80) 12 ); 13 14subject.subscribe(observer); 15 16scheduler.advanceTo(30);
As this does not patches anything in RxJS v5's test scheduler, you can use both if it's needed
1import * as Rx from 'rxjs'; 2import { TestScheduler as CompatScheduler } from '@kwonoj/rxjs-testscheduler-compat'; 3 4const v5Scheduler = new Rx.TestScheduler(...); 5const v4Scheduler = new CompatScheduler(); 6 7...
There are few changes in api surfaces to conform with v5's scheduler interface as well as enhance conviniences.
ReactiveTest.onNext(value)
-> next(value)
ReactiveTest.onError(value)
-> error(value)
ReactiveTest.onCompleted(value)
-> complete(value)
ReactiveTest.subscribe(value)
-> subscribe(value)
Notification factory method (next
, error
, complete
) returns implementaiton of TestMessage
and subscribe
returns SubscriptionLog
TestScheduler::start()
-> TestScheduler::flush()
scheduleFuture
, schedulerRecursive
, schedulePeriodic
... except scheduleAbsolute
, scheduleRelative
, startScheduler
Few npm scripts are supported for build / test code.
build
: Transpiles code to ES5 commonjs to dist
.build:clean
: Clean up existing buildtest
: Run unit test. Does not require build
before execute test.test:cover
: Run code coverage against test caseslint
: Run lint over all codebaseslint:staged
: Run lint only for staged changes. This'll be executed automatically with precommit hook.commit
: Commit wizard to write commit messageNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/15 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
58 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More