majestic 介绍
Majestic是一款用Jest运行测试的electron程序。 Majestic是一个工具,当您使用Jest编写测试时,为您提供出色的开发人员体验。
Majestic是Jest的GUI
运行所有测试或单个文件
切换观看模式
更新快照
检查发生的测试失败
Console.log()到UI进行调试
内置覆盖率报告
搜索测试
适用于流和打字稿项目
与创建react应用一起使用
可选配置
您可以通过向添加majestic密钥来配置Majestic package.json。
// package.json
{
"majestic": {
// if majestic fails to find the Jest package,you can provide it here. Should be relative to the package.json
"jestScriptPath": "../node_modules/jest/bin/jest.js",
// if you want to pass additional arguments to Jest,do it here
"args": ['--config=./path/to/config/file/jest.config.js'],
// environment variables to pass to the process
"env": {
"CI": "true"
}
}
}
项目中具有多个Jest配置文件的可选配置
{
"majestic": {
"jestScriptPath": "../node_modules/jest/bin/jest.js",
"configs": {
"config1": {
"args": [],
"env": {}
},
"config2": {
"args": [],
"env": {}
}
}
}
}
参数
--config -将使用可选配置中提供的列表中的此配置。
--debug-将向控制台输出额外的调试信息。帮助调试。
--noOpen -将阻止在浏览器中自动打开UI网址。
--port -如果可用,将使用此端口,否则Majestic将选择另一个免费端口。
--version -将打印Majestic的版本并退出。
GitHub:https://github.com/Raathigesh/majestic
网站描述:一款用Jest运行测试的electron程序
majestic
小编说
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。