0.0.1 • Published 6 years ago

chai-each v0.0.1

Weekly downloads
6,548
License
MIT
Repository
github
Last release
6 years ago

Chai Each

A Chai plugin that allows for assertions on each item in an array

Chai Each was inspired by Chai Things

Examples

// Each item has a "value" property that is below 20
[{"value": 4}, {"value": 11}, {"value": 15}].should.each.have.property('value').that.is.below(20)

Installation

$ yarn add chai-each

Usage

import { use } from "chai";
import * as chaiEach from "chai-each";
use(chaiEach);