我正在尝试使用 Ember 测试集成自动化测试。
该应用程序在浏览器上运行良好,没有任何错误。我试着简单地跑
ember test
在命令行上,但得到一堆全局错误并且所有测试都失败了。
这些是我得到的错误:
not ok 1 PhantomJS 2.1 - Global error: SyntaxError: Unexpected token ',' at http://localhost:4302/assets/vendor.js, line 145617
not ok 2 PhantomJS 2.1 - Global error: Error: Could not find module ember-metal/core required by: ember-testing/index at http://localhost:4302/assets/test-support.js, line 62
not ok 3 PhantomJS 2.1 - Global error: ReferenceError: Can't find variable: define at http://localhost:4302/assets/tests.js, line 1
...
当我在浏览器上运行测试时,我没有收到语法错误(上面的第一个),第一个错误是
Uncaught Error: Could not find module `analogue/resolver` imported from `analogue/tests/helpers/resolver`
这些对我来说没有意义,因为我不应该编辑 vendor.js 并且它说它找不到的模块在那里。有任何想法吗?