2016-07-25 48 views
1

我的測試中都寫在摩卡和他們的工作很好,當我調用使用實際的流星,像這樣的測試:流星測試 - 客戶端的測試沒有根據調度運行:摩卡phantomjs

meteor test --full-app --driver-package practicalmeteor:mocha --port 4000 --settings test_settings.json 

但是當我嘗試使用調度:摩卡phantomjs,僅在服務器端運行測試:

meteor test --once --full-app --driver-package dispatch:mocha-phantomjs --settings test_settings.json 

我是不是失去了一些東西約流星客戶端和服務器的分離?

我試圖用特拉維斯CI的,所以我需要在命令行輸出切換我的測試,而不是瀏覽器

從我的流星/版本

dispatch:[email protected] 
dispatch:[email protected] 
practicalmeteor:[email protected]_1 
practicalmeteor:[email protected]_2 
practicalmeteor:[email protected]_3 
practicalmeteor:[email protected] 
practicalmeteor:[email protected]_2 

我使用的是2.4。 5 rc3的實際流星,因爲在調度和實際流星存在於同一個包文件中時出現一個錯誤

謝謝!

+0

你把你的測試文件放在哪裏 – securecurve

回答

2

我最終使用了spacejam/practicalmeteor:mocha-console-runner來讓我的客戶端測試在travis中運行。我發佈我的.travis.yml給任何感興趣的人。

sudo: true 

language: node_js 

before_install: 
- npm install -g spacejam 
- echo $METEOR_SETTINGS > test_settings.json 
# assumes that meteor is not installed 
# - curl https://install.meteor.com | /bin/sh 
# if meteor has been properly cached 
- sudo ln -s $HOME/.meteor/meteor /usr/local/bin/meteor 

cache: 
    directories: 
    - node_modules 
    - $HOME/.meteor/ 

before_script: 
    - meteor npm install 

script: 
    - spacejam test --full-app --once --driver-package practicalmeteor:mocha-console-runner --settings test_settings.json