The "Firefox" and "HeadlessChrome" arrays were unreachable as env.CI was not set in one place and then unset in the other.
If there is reason to cover Firefox and Chrome for this project specifically we can always test both in parallel, but I'm not aware of such reason.
This commit follows CI's lead and makes local development use the same browser (Firefox) which has the benefit of working headlessly out-of-the-box both on bare metal desktops. and in e.g. a Docker container developer environment without needing local, and in CI VMS - without needing custom overrides or configs (e.g. --no-sandbox, root, or Xvfb)
Also use headless by default everywhere so that npm test works out of the box for contributors if they use a secure development container where there's no graphical display or Xvfb running, and so that it is more likely to match
CI behaviour. One can still override as before, by passing --browsers to the karma command (as such, I've kept the chrome-launcher depencency so that people preferring to debug there, can still easily do so).
The "Firefox" and "HeadlessChrome" arrays were unreachable as
env.CI
was not set in one place and then unset in the other.If there is reason to cover Firefox and Chrome for this project specifically we can always test both in parallel, but I'm not aware of such reason.
This commit follows CI's lead and makes local development use the same browser (Firefox) which has the benefit of working headlessly out-of-the-box both on bare metal desktops. and in e.g. a Docker container developer environment without needing local, and in CI VMS - without needing custom overrides or configs (e.g.
--no-sandbox
, root, or Xvfb)Also use headless by default everywhere so that
npm test
works out of the box for contributors if they use a secure development container where there's no graphical display or Xvfb running, and so that it is more likely to match CI behaviour. One can still override as before, by passing--browsers
to the karma command (as such, I've kept the chrome-launcher depencency so that people preferring to debug there, can still easily do so).