Chai Counting

一个简单的计数插件,用于 Chai 断言库expect(n).to.be.zero, expect(n).to.be.one, 等等,直到 expect(n).to.be.ten。 或者, n.should.be.zero, n.should.be.one, 等等。 这省去了您在 n.should.be.eq(0); 中键入括号的痛苦。

Build Status npm

安装

npm install chai-counting

使用

const chai = require('chai');
const chaiCounting = require('chai-counting');
chai.use(chaiCounting);