I am currently working with Angular CLI, where I execute tests using the command:
ng test
This runs the tests in Chrome by default, which is quite useful. However, I need to know how I can execute these tests in a headless browser for a console-only operating environment. It would also be beneficial to have the option to choose whether to run a browser or not each time I initiate the tests. For instance, something like this:
ng test --browsers MyHeadlessBrowser
Additionally, while trying to use PhantomJS, I encountered this error:
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
TypeError: useValue,useFactory,data is not iterable!
Furthermore, I received this reference error:
ReferenceError: Can't find variable: Intl at vendor.bundle.js (line 49362)
Any guidance on resolving these issues would be greatly appreciated.