我正试图将卡玛和茉莉花融入我的项目中。
我从一个非常基本的测试开始,以确保定义了我的控制器,并且一个$scope变量等于一个字符串--正如预期的那样通过。
我的控制器,也调用一个执行$http.get的服务,在运行我的测试时,没有提到服务,我得到了错误:
Error: Unexpected request: GET /my/endpoint/
No more request expected
主计长:
define(['module'], function (module) {
'use strict';
var MyController =
我在经营一个种子项目,运行茉莉花和卡玛。一切都是正确的。
Webpack启动了应用程序"npm“,但是当我运行"npm测试”时,Webpack看了一个.ts文件,然后加载.spec.ts文件。从种子项目运行此代码时会出现错误。
bundle is now VALID.
[32m06 10 2016 10:16:42.660:INFO [karma]:
[39mKarma v0.13.22 server started at http://localhost:9876/
[32m06 10 2016 10:16:42.664:INFO [launcher]:
[39mSta
我的ng test的输出如下:
> ng test
24 12 2019 14:20:07.854:WARN [karma]: No captured browser, open http://localhost:9876/
24 12 2019 14:20:07.860:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
24 12 2019 14:20:07.860:INFO [launcher]: Launching browsers ChromeNoSandbox with concu
我正试图为角控制器编写一个基本的测试。我使用茉莉花框架和业力作为测试跑步者。我的测试失败,有以下错误:
Firefox 35.0.0 (Linux) MessageCtrl should get the correct message FAILED
minErr/<@/home/jenselme/tests/javascript/angular/unit_tests/angular.js:78:12
loadModules/<@/home/jenselme/tests/javascript/angular/unit_tests/angular.js:3906:15
我试图用需求配置我的业力茉莉花单元测试。但是,每次运行它,我都会得到以下错误:
Chrome 34.0.1847 (Mac OS X 10.9.2) ERROR
Uncaught Error: Mismatched anonymous define() module: function (angular){
describe('Unit: Testing RequireJS', function(){
var ctrl;
var scope;
var rootScope;
beforeEach(angular.mock.module('wsaApp
我正在尝试创建"Angular.js实际操作“中描述的茉莉花单元测试。该应用程序运行正常,但在尝试运行测试时,我在node.js命令提示符中不断收到此错误。
我的配置:
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// frameworks to use
frameworks: ['jasmine'],
// list of files / p
我知道这个问题已经有了答案,但是没有一个答案是为我解决的,我仍然可以得到堆栈跟踪:
Could not find module "@angular-devkit/build-angular" from "F:\\Documents\\...".
Error: Could not find module "@angular-devkit/build-angular" from "F:\\Documents\\...".
at Object.resolve (C:\Users\...\AppData\Roaming\npm\n
更新了修改后的代码,删除了其中的一个#pickerDal
我已经迁移了一个角8项目到角9,但数据报警器正在产生错误。我有:
this._datepicker._registerInput is not a function
at MatDatepickerInput.set [as matDatepicker]
这是我的package.json文件:
"dependencies": {
"@angular/animations": "^9.1.11",
"@angular/cdk": "^9.2.4
我们的项目结构如下:。
我们的项目成功编译、构建,并且可以在浏览器中看到。这里没有问题。
但是,当我们尝试使用karma and jasmine运行测试用例时,我们得到了这个错误。
FAILED TESTS:
XXXXXXComponent
:heavy_multiplication_x: Should Match Current Tab as 1
Chrome 55.0.2883 (Mac OS X 10.10.5)
Error: Template parse errors:
Can't bind to 'formgroup' since
我遇到了一个奇怪的问题。我研究过这个错误,它通常看起来与@Output或EventEmitter的使用有关,但这里不是这样。
如果我有一个特定的polyfill,我的应用程序中会出现以下错误:
TypeError: instance[output.propName].subscribe is not a function
at createDirectiveInstance (http://localhost:9876/_karma_webpack_/webpack:/Users/stuart/localhost/projects/tt-new/work-group/node_modu