testcafe-lighthouse:使用TestCafe运行Lighthouse性能审核

时间:2021-05-13 05:20:39
【文件属性】:
文件名称:testcafe-lighthouse:使用TestCafe运行Lighthouse性能审核
文件大小:2.3MB
文件格式:ZIP
更新时间:2021-05-13 05:20:39
audit testcafe lighthouse lighthouse-audits JavaScript Lighthouse Testcafe-NPM套餐 是Google开发的工具,用于分析Web应用程序和网页,收集现代性能指标和对开发人员最佳实践的见解。 该软件包的目的是以连接模式和自动(编程)方式为几页生成性能报告。 用法 安装 您可能必须在项目中将testcafe-lighthouse库添加为依赖项(或dev-dependency) $ yarn add -D testcafe-lighthouse # or $ npm install --save-dev testcafe-lighthouse 在你的代码中 安装完成后,您可以在代码中使用testcafe-lighthouse来审核当前页面。 步骤1:在测试代​​码中,您需要导入testcafe-lighthouse并为灯塔扫描分配一个cdpPort 。 您可以选择任何未分配的端口。 import { testcafeAud
【文件预览】:
testcafe-lighthouse-master
----.github()
--------FUNDING.yml(61B)
----src()
--------audit.js(2KB)
--------task.js(2KB)
----.npmignore(62B)
----LICENSE(1KB)
----test()
--------reports.spec.js(1KB)
--------audit.spec.js(489B)
----README.md(5KB)
----index.d.ts(825B)
----docs()
--------lighthouse_report.png(39KB)
--------lh.jpg(42KB)
--------demo.gif(2.27MB)
----.gitignore(58B)
----index.js(86B)
----package-lock.json(231KB)
----package.json(803B)

网友评论