在Webpack和Babel环境中使用Mocha、Chai和Enzyme测试React组件

介绍了如何在Webpack和Babel配置的应用程序中使用Mocha、Chai和Enzyme来测试React组件。还提供了可选的测试工具和配置建议:可以选择使用Cypress进行端到端测试,Travis CI进行持续集成,和Coveralls.io进行代码覆盖率报告。安装步骤包括:使用git clone命令克隆项目,进入项目目录后运行npm install进行依赖安装,最后使用npm start启动应用并通过http://localhost:8080/进行访问,使用npm test运行测试。
zip
react-testing-mocha-chai-enzyme-master.zip 预估大小:21个文件
folder
react-testing-mocha-chai-enzyme-master 文件夹
file
.travis.yml 359B
file
.babelrc 73B
file
package.json 1KB
folder
cypress 文件夹
folder
plugins 文件夹
file
index.js 644B
folder
support 文件夹
file
index.js 670B
file
commands.js 841B
folder
integration 文件夹
file
App.e2e.js 552B
folder
fixtures 文件夹
file
example.json 154B
folder
.github 文件夹
file
FUNDING.yml 587B
folder
test 文件夹
file
helpers.js 324B
file
dom.js 547B
file
.prettierrc 88B
file
package-lock.json 350KB
folder
dist 文件夹
file
index.html 191B
folder
src 文件夹
file
App.spec.js 2KB
file
index.js 173B
file
App.js 1KB
file
.gitignore 13B
file
webpack.config.js 502B
file
cypress.json 58B
file
README.md 2KB
zip 文件大小:97.72KB