Reputation: 66
reference:
I have refer above blog link and followed step to Automated Angular Unit Testing and publish test Result.
as per blog guideline i have followed below step.
step 1
Installed below packages.
step 2
Then i have added some configuration in karma.conf.js
step 3
Then i added script in package.json
"scripts": {
...
"test-single-headless": "ng test --single-run=true --browsers=PhantomJS --reporters=progress,junit",
...
},
step 4
I added below three line in polyfills.ts file
import 'core-js/es6/object';
import 'core-js/es6/string';
import 'core-js/es6/array';
step 5
Added pipeline task you can see in below screenshot.
step 6
after setup all configure all thing as par blog guideline finally i run build.
getting issue is
Then i go to the result log it work form first task to build task result getting success.
when result's come to the " Run test " task.
It will show one Error in "Run test task log ". which i have attached below screenshot.
Please check my step and help me in this issue. i'm facing this issue since last few days.
Upvotes: 0
Views: 14909
Reputation: 66
as of now phantomjs is no longer support now, it is deprecated i have used 'ChromeHeadless' browser instead of 'Phantomjs' then it's worked fine for me.
if any test case is failed also build will be failed. so u can solved all case then it will work.
if anyone get this issue Please make changes as per above it will helpful.
Upvotes: 0