运行ng test命令时出现错误

时间:2019-01-10 12:59:51

标签: angular unit-testing user-interface karma-jasmine

我正在尝试为角度项目运行测试用例。我是UI单元测试的新手。每当我尝试运行“ ng test”命令时,都会出现以下错误。

10 01 2019 18:13:33.754:INFO [Chrome 71.0.3578 (Windows 7.0.0)]: Connected on so
cket 3bR__mAXbLbWIyMdAAAA with id 62613448
Chrome 71.0.3578 (Windows 7.0.0) ERROR
  Uncaught ReferenceError: jQuery is not defined
  at http://localhost:9876/_karma_webpack_/scripts.bundle.js:56

Chrome 71.0.3578 (Windows 7.0.0) ERROR
  Uncaught ReferenceError: jQuery is not defined
  at http://localhost:9876/_karma_webpack_/scripts.bundle.js:56
Chrome 71.0.3578 (Windows 7.0.0) ERROR
  Uncaught ReferenceError: jQuery is not defined
  at http://localhost:9876/_karma_webpack_/scripts.bundle.js:56

https://stackoverflow.com/questions/46701835/cant-find-jquery-when-running-ng-test-command

我遵循了以上答案。仍未得到相同的jquery错误。

0 个答案:

没有答案