![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Kurkar helps you test RxJS operators and pipelines with marbles using Ava. Ava macros let you write concise tests.
npm install --save-dev kurkar
import test from 'ava';
import marbles from 'kurkar';
test('observable', marbles, (_t, _sched, helpers) => {
const letters = 'the quick brown fox jumps over the lazy dog|';
const source$ = helpers.hot(letters);
helpers.expectObservable(source$).toBe(letters);
});
Kurkar provides an Ava test macro to easily set up RxJS
tests in Ava. Include the macro function marbles
before the test
function to hook up an RxJS TestScheduler
to the
Ava execution context "t
". The test function will be run inside a
test scheduler, with these parameters:
t
: Ava execution context for this test.sched
: RxJS TestScheduler
running this test. Use when you need
to pass a scheduler argument into some operators.helpers
: Helper functions created by
TestScheduler.run
for easily creating and
comparing Observables.TestScheduler
runs synchronously, so the test function is not
async
.
The marbles
macro uses t.deepEqual
to compare actual and expected
results. Pass a different comparison function to withEquals
to
generate other versions of the macro. marbles
is just
const marbles = withEquals((t, a, e) => t.deepEqual(a, e));
Kurkar fully supports TypeScript types and exports useful types. You
do not need to install additional @types
to enjoy TypeScript.
Here's a typed version of the above test:
import test from 'ava';
import marbles, { withEquals, ExecutionContext, TestScheduler, RunHelpers } from 'kurkar';
test('observable', marbles, (_t: ExecutionContext, _sched: TestScheduler, helpers: RunHelpers) => {
const letters = 'the quick brown fox jumps over the lazy dog|';
const source$ = helpers.hot(letters);
helpers.expectObservable(source$).toBe(letters);
});
Due to current limitations with Ava types, TypeScript language servers currently cannot always deduce the types of the test function parameters.
Because it provides an Ava test macro, Kurkar removes the most boilerplate from your tests. It is native TypeScript and can provide exact type-checking.
"Kurkar" ("כורכר") is a soft middle-eastern sandstone -- a very different rock from marble.
FAQs
Ava macros to test RxJS, with TypeScript support
The npm package kurkar receives a total of 1 weekly downloads. As such, kurkar popularity was classified as not popular.
We found that kurkar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.