vue的测试用例编写(chai)

eagle007

文档地址: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');`

阅读 814
34 声望
0 粉丝
0 条评论
34 声望
0 粉丝
文章目录
宣传栏