在配置/环境中导入时,Ember测试失败

时间:2016-03-14 16:58:05

标签: ember.js requirejs phantomjs ember-testing

当我在项目上运行ember test时,我收到此错误

    Log: |
        { type: 'error',
          text: 'Error: Could not find module `otherapp/config/environment` imported from `otherapp/tests/helpers/resolver` at http://localhost:7357/assets/vendor.js, line 173\n' }
...
not ok 2 PhantomJS 2.1 - Global error: Error: Assertion Failed: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:7357/assets/vendor.js, line 15359
---
    Log: |
        { type: 'error',
          text: 'Error: Assertion Failed: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:7357/assets/vendor.js, line 15359\n' }
...

我不知道如何调试它,因为这是在测试套件中发生的,没有调试窗口,放置debugger;没有帮助。这也是别人的项目。

这不是ember-cli或任何软件包中的问题,因为我创建了一个新的ember应用程序并编写了一些验收测试而没有任何此类错误。我不确定如何跟踪或调试此错误。

1 个答案:

答案 0 :(得分:3)

我有这个问题,这是一个严格的模式错误。我实际上是在控制器上声明了一个具有相同名称的属性两次。 您可以通过将phantomjs挂载到端口然后在那里浏览来调试它。

将此内容放入 #create a surv object in order to adjust a Cox model on dataset mydata.surv <- Surv(mydata$START,mydata$END, mydata$STATE) # Andersen-Gill model fit <- cph(formula = mydata.surv~SEX+AGE_CLASS+STUDYAREA, data=mydata, method=c("exact"), se.fit=T, linear.predictors=TRUE, x=T, y=T, surv="summary") #create new dataset in order to predict survival newdata <- expand.grid(AGE_CLASS=c(1,2,3),SEX=c("M","F"), STUDYAREA=c("north","mid","south")) #predict survival for each cohorts out <- summary(survfit(fit, newdata = newdata , type = "breslow"))

testem.json

然后浏览到"phantomjs_debug_port": 9000第二个链接,并将您发送到幻像开发工具!