扫一扫分享
karmatic围绕Karma,webpack,Jasmine和Puppeteer的简化零配置包装器。
Karma, Webpack 和 Jasmine都很棒。它们也都非常强大,并且每个都是高度可配置的。在创建和维护小型模块时,这些配置和依赖项的重复很麻烦。
Karmatic是这些工具的零配置包装器,具有智能默认值,配置自动检测和大多数配置不包括的优化。
最重要的是,Karmatic在单个依赖项中提供了(无头)浏览器测试工具。
安装
npm i -D webpack karmatic
package.json:
{
"scripts": {
"test": "karmatic"
}
}
使用
Usage
$ karmatic <command> [options]
Available Commands
run Run tests once and exit
watch Run tests on any change
debug Open a headful Puppeteer instance for debugging your tests
For more info, run any command with the `--help` flag
$ karmatic run --help
$ karmatic watch --help
Options
-v, --version Displays current version
--files Minimatch pattern for test files
--headless Run using Chrome Headless (default true)
--coverage Report code coverage of tests (default true)
-h, --help Displays this message
仅供个人学习参考/导航指引使用,具体请以第三方网站说明为准,本站不提供任何专业建议。如果地址失效或描述有误,请联系站长反馈~感谢您的理解与支持!
手机预览