【问题标题】:AngularJS / Karma Unit testing in AppEngine Python projectAppEngine Python项目中的AngularJS / Karma单元测试
【发布时间】:2013-10-02 01:46:24
【问题描述】:

我正在 GAE/Python 之上试验 AngularJS。我尝试移入一些引导模板文件,但在我的单元测试(默认单元测试)中没有收到以下错误。

来源: https://github.com/m2mIO/angular-portal

Starting Karma Server (http://karma-runner.github.io)
-------------------------------------------------------------------
WARN [config]: "/" is proxied, you should probably change urlRoot to avoid conflicts
WARN [plugin]: Cannot find plugin "karma-junit-reporter".
  Did you forget to install it ?
  npm install karma-junit-reporter --save-dev
WARN [proxy]: proxy "http://localhost:8080" normalized to "http://localhost:8080/"
INFO [karma]: Karma v0.10.2 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 30.0.1599 (Mac OS X 10.8.5)]: Connected on socket 4fu9UWsj1npbCkHr1G-4
Chrome 30.0.1599 (Mac OS X 10.8.5) ERROR
    Uncaught ReferenceError: jQuery is not defined
    at /Users/kyleroche/PycharmProjects/2lemetry/app/js/fullcalendar.min.js:7
Chrome 30.0.1599 (Mac OS X 10.8.5) ERROR
    Uncaught ReferenceError: jQuery is not defined
    at /Users/kyleroche/PycharmProjects/2lemetry/app/js/gcal.js:107
Chrome 30.0.1599 (Mac OS X 10.8.5) ERROR
    Uncaught ReferenceError: jQuery is not defined
    at /Users/kyleroche/PycharmProjects/2lemetry/app/js/jquery-ui-1.10.2.custom.min.js:6
Chrome 30.0.1599 (Mac OS X 10.8.5) ERROR
    Uncaught ReferenceError: jQuery is not defined
    at /Users/kyleroche/PycharmProjects/2lemetry/app/js/jquery.dataTables.js:39
Chrome 30.0.1599 (Mac OS X 10.8.5) ERROR
    Uncaught ReferenceError: jQuery is not defined
    at /Users/kyleroche/PycharmProjects/2lemetry/app/js/jquery.flot.js:32
Chrome 30.0.1599 (Mac OS X 10.8.5): Executed 0 of 0 ERROR (0.716 secs / 0 secs)

我也不确定要添加到我的 app.yaml 中以服务于 e2e 测试。它们位于 test/e2e/runner.html 中。

【问题讨论】:

    标签: python google-app-engine unit-testing angularjs karma-runner


    【解决方案1】:

    我想通了。用于模板文件的排除,并且必须从静态资产目录服务器/测试。

    【讨论】:

      猜你喜欢
      • 2014-07-12
      • 2018-02-23
      • 1970-01-01
      • 2014-11-15
      • 2017-06-24
      • 1970-01-01
      • 1970-01-01
      • 2015-11-29
      • 2016-04-24
      相关资源
      最近更新 更多