文档地址:http://man.hubwiz.com/manual/Chai

http://man.hubwiz.com/docset/Chai.docset/Contents/Resources/Documents/chaijs.com/api/bdd/index.html#//apple_ref/Method/%2Ea
对chai用法的相关中文解释: https://blog.csdn.net/qq_33024515/article/details/94339307

*should和expect,对比还是采用expect

`// 引入expect和should函数
const { expect, should } from 'chai';
const foo = 'bar';

// should风格
foo.should.be.a('string');
foo.should.equal('bar');
// expect风格
expect(foo).to.be.a('string');
expect(foo).to.equal('bar');`


eagle007
34 声望0 粉丝