Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/z4o4z/chai-sequencer
event sequncer plugin for chai.js
https://github.com/z4o4z/chai-sequencer
Last synced: 29 days ago
JSON representation
event sequncer plugin for chai.js
- Host: GitHub
- URL: https://github.com/z4o4z/chai-sequencer
- Owner: z4o4z
- Created: 2016-02-21T00:09:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-26T08:53:42.000Z (over 2 years ago)
- Last Synced: 2024-10-11T09:09:06.538Z (3 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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');
});
});