Struggling to run Karma test in Gitpod

Discussão em 'Angular' iniciado por DumbCoder7, Novembro 23, 2024.

  1. DumbCoder7

    DumbCoder7 Guest

    I am trying to run Karma tests in an Angular repo in Gitpod.

    When I run npm run test which leads to ng test this is the output I get

    ✔ Browser application bundle generation complete.
    23 11 2024 08:46:04.814:INFO [karma-server]: Karma v6.4.4 server started at http://localhost:9876/
    23 11 2024 08:46:04.815:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
    23 11 2024 08:46:04.819:INFO [launcher]: Starting browser ChromeHeadless
    23 11 2024 08:46:04.838:ERROR [launcher]: Cannot start ChromeHeadless
    Can not find the binary /usr/local/bin/my-chrome-build
    Please set env variable CHROME_BIN


    I am struggling to understand how to set the CHROME_BIN variable value as I am not using my local machine here.

    I tried changing the browsers config property in angular.json file but similar errors persist.

    I traversed through the root directory of Gitpod, checking their /usr and /home folders and trying any path that had something resembling chrome in it. But they don't work either.

    I have checked that there is no /usr/local/bin/my-chrome-build path, but how do I deal with this issue?

    Continue reading...

Compartilhe esta Página