CHROME_BIN not set for single karma test run

I have a Typescript project with karma. I installed the karma plugin and I can run all tests. For that I have to set the environment variable CHROME_BIN=/usr/bin/chromium in the run configuration (although it is configured in my ~/.bashrc). But when I want to run a single test by clicking on the green arrows between the code and the line number in the editor, the variable is not set. I configured the variable also in the settings for the Terminal ("Tools > Terminal"). I restarted IntelliJ. But that all has no effect.

How can I configure an environment variable that is applied to my tests?

IntelliJ IDEA 2022.1.1 (Ultimate Edition)
Build #IU-221.5591.52
Runtime version: 11.0.14.1+1-b2043.45 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.17.0-3-amd64 (Debian)
Karma (221.5591.19)

0
2 comments

Try editing Karma run configuration template: set the CHROME_BIN environment variable there, save the configuration. New configurations created from gutter/right-click menus will use these settings, you won't need to care of specifying them for each configuration

1

Thank you, Elena! That worked for me!

0

Please sign in to leave a comment.