How to make travis execute Angular tests on Chrome (“Please set env variable CHROME_BIN”)

前端 未结 4 1006
终归单人心
终归单人心 2020-12-08 02:58

I\'m working on a sample Angular project generated by yeoman.
I am able to run karma tests locally (I set system variable CHROME_BIN to point to chromium bi

4条回答
  •  佛祖请我去吃肉
    2020-12-08 03:13

    I'm afraid to say that you can only run Firefox (because it's already installed in the VM) and PhantomJS (because it's portable and headless).

    Add the following into your .travis.yml file to startup Firefox:

    before_install:
      - "export DISPLAY=:99.0"
      - "sh -e /etc/init.d/xvfb start"
    

    Then you'll just have to enable Firefox as a Karma browser in your configs.

    Documentation

提交回复
热议问题