Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
/ hoity-chai Public archive

Hoity (High Order ITerators Yielded) Chai plugin

License

Notifications You must be signed in to change notification settings

DevoInc/hoity-chai

Repository files navigation

Hoity (High Order ITerators Yielded) Chai plugin

Install

Install with

const chai = require('chai');
chai.use(require('@devo/hoity-chai'));

Provided extensions to Chai

  • .iterable: Checks that the current value is an iterable value. Replaces the current value with its iterator.

  • .iterator: Checks that the current value is an iterator object..

  • .contents: Expects (checks it, in fact) that the current value has passed through an .iterator or .iterable assertion. Then, collects all its contents in an array and pass that array to the assertion chain tail.

  • .eql: Normal .eql has been overloaded to detect iterators (in fact, it detects that appears after an active .iterable or .iterator). Both the value and its argument will be collected in an array, and passed to a recursive .eql assertion.

About

Hoity (High Order ITerators Yielded) Chai plugin

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published