[英]How to configure Allure on Angular with Jest
I was trying to use Allure on Angular and Jest version 24我试图在 Angular 和 Jest 版本 24 上使用 Allure
I tried to npm install --save-dev jest-allure
.我试图
npm install --save-dev jest-allure
。
And to put setupFilesAfterEnv: ["jest-allure/dist/setup"]
on Package.json并将
setupFilesAfterEnv: ["jest-allure/dist/setup"]
放在 Package.json 上
When i type当我输入
allure serve
诱惑服务
on console there is not found the allure command.在控制台上没有找到 allure 命令。
How can i do it otherwise?.否则我怎么做?
Note that i am not familiar with everything on allure.请注意,我对诱惑的所有内容都不熟悉。
In order to run the allure serve
command via npm, you must have allure commandline installed.为了通过 npm 运行
allure serve
命令,您必须安装allure 命令行。
Relevant pieces of working configuration for me:与我相关的工作配置:
{
...
"scripts": {
...
"test": "ng test --noStackTrace",
"test:ci": "ng test --ci --coverage",
...
},
...
"dependencies": {
... // tested w/ angular 8
},
"devDependencies": {
...
"@angular-builders/jest": "^8.0.4",
"@types/jest": "^24.0.21",
"jest": "^24.9.0",
"jest-allure": "^0.1.1",
...
},
"jest": {
...
"setupFilesAfterEnv": [
"jest-allure/dist/setup"
],
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.