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

chai-sequencer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-sequencer

> Check your event sequence with Mocha, Chai and Sequencer

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

chai-sequencer

Check your event sequence with Mocha, Chai and Sequencer

Install

npm i chai-sequencer --save

Quick Example
let chai        = require('chai');
let expect      = chai.expect;
let sequencer   = require("../index");
let EventEmitter = require('events');

chai.use(sequencer);

let ee = new EventEmitter();

describe('sequencer', function() {

    beforeEach(function() {
        ee.on('test1', () => console.log('test1 called'))
    });

    afterEach(function() {
        ee.removeAllListeners();
    });

    it('quick test', function () {
        ee.emit('test1');
        ee.emit('test2');
        ee.emit('test3');
        ee.emit('test4');
        ee.emit('test4');
        ee.emit('test6');
        ee.emit('test8');
        ee.emit('test9');

        expect(ee).to
            .emit('test1')
            .next('test2')
            .next.skip(2)
            .is('test4')
            .is.calls(2)
            .next.oneOf('test5', 'test6', 'test7')
            .next('test8')
            .last('test9');
    });
});

Keywords

FAQs

Package last updated on 24 Feb 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