Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chai-rx-assert

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-rx-assert

Plugin for the chai assert library for comparing observables in tests

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

chai-rx-assert

Plugin for the chai assert library for comparing observables in tests
(Thin wrapper around rx-assert library)

Installation

npm install chai-rx-assert

Usage

var chai = require('chai');
var chaiRx = require('chai-rx-assert');
chai.use(chaiRx);

it('should return messages with delay', () => {
    var scheduler = new TestScheduler();

    var xs = scheduler.createHotObservable(onNext(250, 2), onCompleted(550));

    var results = scheduler.startScheduler(() => {
        return xs.delay(100, scheduler);
    });

    expect(results.messages).to.rxEqual([onNext(350, 2), onCompleted(650)]) // assert ok

    // or without wrapping in list

    expect(results.messages).to.rxEqual(onNext(350, 2), onCompleted(650)) // assert ok
});

see full expample inside test/test.js

Keywords

FAQs

Package last updated on 22 May 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc