Chai 計數

一個簡單的計數外掛,適用於 Chai 斷言函式庫expect(n).to.be.zeroexpect(n).to.be.one 等等,直到 expect(n).to.be.ten。或者,n.should.be.zeron.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);