phantom-chai:phantomjs 脚本的 Chai

时间:2021-06-07 22:40:24
【文件属性】:
文件名称:phantom-chai:phantomjs 脚本的 Chai
文件大小:3KB
文件格式:ZIP
更新时间:2021-06-07 22:40:24
JavaScript 幻柴 phantomjs 脚本的 Chai 断言 用法 npm install phantom-chai chai --save-dev phantomjs 脚本中的用法 var chai = require('phantom-chai')() , assert = chai.assert; var page = webpage.create(); page.open('http://localhost/test', function (status) { assert.equal(status, 'success'); assert.equal(page.title, 'My page'); phantom.exit(); }); 如果任何断言抛出,脚本将记录错误和堆栈并将终止。 内部pha
【文件预览】:
phantom-chai-master
----.gitignore(526B)
----package.json(629B)
----LICENSE(1KB)
----index.js(873B)
----README.md(1KB)

网友评论