加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 在命令行中设置配置的’browsers’属性

发布时间:2020-12-17 09:16:52 所属栏目:安全 来源:网络整理
导读:我通常使用浏览器= [‘PhantomJS’]运行我的规格与因果,因为它比chrome更快,我发现有点烦人,当chrome打开浏览器在每个启动窗口前面. 但是当我有一个错误,我需要调试,我将karma.conf.js浏览器更改为[‘Chrome’]. 当我开始业务时,我想设置这个属性,像:’karm
我通常使用浏览器= [‘PhantomJS’]运行我的规格与因果,因为它比chrome更快,我发现有点烦人,当chrome打开浏览器在每个启动窗口前面.

但是当我有一个错误,我需要调试,我将karma.conf.js浏览器更改为[‘Chrome’].

当我开始业务时,我想设置这个属性,像:’karma start –browsers = [Chrome]’.

这是可以吗?

您只需要使用–browsers参数,它将覆盖您的配置文件浏览器部分.
$karma start config/testacular.conf.js --browsers Chrome

Chrome是浏览器的名称或二进制文件的路径.

例如,我只配置了一个小的Qt浏览器.如果我使用上面的行,它会运行Chrome.

INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 24.0 (Linux)]: Connected on socket id DxbVJNX0jIoe1CbaWf9V
Chrome 24.0 (Linux): Executed 74 of 74 SUCCESS (0.443 secs / 0.232 secs)
...

或者,例如,我有firefox beta,极光,并在我的家释放.我运行测试版:

$karma start config/testacular.conf.js --browsers ~/firefox/firefox
$karma start --help
Karma - Spectacular Test Runner for JavaScript.

START - Start the server / do a single run.

Usage:
  karma start [<configFile>] [<options>]

Options:
  --port                <integer> Port where the web server is running.                        
  --runner-port         <integer> Port where the server is listening for runner.               
  --auto-watch          Auto watch source files and run on change.                             
  --no-auto-watch       Do not watch source files.                                             
  --log-level           <disable | error | warn | info | debug> Level of logging.              
  --colors              Use colors when reporting and printing logs.                           
  --no-colors           Do not use colors when reporting or printing logs.                     
  --reporters           List of reporters (available: dots,progress,junit).                  
  --browsers            List of browsers to start (eg. --browsers Chrome,ChromeCanary,Firefox).
  --capture-timeout     <integer> Kill browser if does not capture in given time [ms].         
  --single-run          Run the test when browsers captured and exit.                          
  --no-single-run       Disable single-run.                                                    
  --report-slower-than  <integer> Report tests that are slower than given time [ms].           
  --help                Print usage and options.                                               
  --version             Print current version.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读