karma

Karma throws error: Can not load “ng-html2js”, it is not registered

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm getting an error when I run karma start : $ karma start INFO [ karma ]: Karma v0 . 10.2 server started at http : //localhost:9876/ INFO [ launcher ]: Starting browser Chrome WARN [ preprocess ]: Can not load "ng-html2js" , it is not registered ! Perhaps you are missing some plugin ? ... But in my package file I have "karma-ng-html2js-preprocessor": "*", and the folder with code for this preprocessor exists in node_modules . Any ideas on how to solve the problem? 回答1: In my cases, the problem was connected to lack of karma-ng

npm install -g karma error MSB4019: The imported project “C:\\Microsoft.Cpp.Default.props” was not found

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've been looking into AngularJS and following its install steps, but I get an error running step #1: npm install - g karma Here is the full output: Microsoft Windows [ Version 6.2 . 9200 ] ( c ) 2012 Microsoft Corporation . All rights reserved . C : \Users\Travis > node -- version v0 . 10.18 C : \Users\Travis > python -- version Python 2.7 . 3 C : \Users\Travis > npm install - g karma npm http GET https : //registry.npmjs.org/karma npm http 304 https : //registry.npmjs.org/karma npm http GET https : //registry.npmjs.org/di npm

EXCEPTION: Runtime compiler is not loaded

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Versions. @angular/cli@1.0.0-rc.2 Repro steps. ng build -prod -e prod The log given by the failure. vendor . 380a744 …. bundle . js : 218 Error : Runtime compiler is not loaded at new Error ( native ) at Error . d ( http : //localhost:9000/portal/assets/dist/polyfills.a61f849adcea6ec74b69.bundle.js:36:1731) at r ( http : //localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:1410:3338) at t . compileModuleAndAllComponentsAsync ( http : //localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:1417

Babel / Karma / Chai gives TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I having trouble figuring out why this test is not passing. var expect = require('chai').expect; describe('HelloComponent', function() { it('passes a quite simple test', function() { expect(1 + 4).to.equal(5); }); }); produces this error: DEBUG [web-server]: serving: /Users/ivan/dev/react-starter/node_modules/karma/static/context.html DEBUG [web-server]: serving (cached): /Users/ivan/dev/react-starter/node_modules/mocha/mocha.js DEBUG [web-server]: serving (cached): /Users/ivan/dev/react-starter/node_modules/karma-mocha/lib/adapter.js DEBUG

Module build failed: TypeError: Cannot read property 'newLine' of undefined

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Everything was running fine yesterday, now when I try to ng serve I get these errors: ERROR in ./src/main.ts Module build failed: TypeError: Cannot read property 'newLine' of undefined at Object.getNewLineCharacter (/Users/leongaban/Projects/TickerTags/wikitags/node_modules/typescript/lib/typescript.js:8062:20) I tried the answers here and here but no effect :( My global and local npm version for angular-cli is 1.0.0-beta.28.3 how do I upgrade that to .30? I tried @latest My local package.json: "devDependencies": { "@angular/cli": "1.0.0

Angular 2 Karma Test 'component-name' is not a known element

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In the AppComponent, I'm using the nav component in the HTML code. The UI looks fine. No errors when doing ng serve. and no errors in console when I look at the app. But when I ran Karma for my project, there is an error: 'app-nav' is not a known element: 1. If 'app-nav' is an Angular component, then verify that it is part of this module. 2. If 'app-nav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. In my app.module.ts : there is: import { NavComponent } from '.

Karma throws error: Can not load “ng-html2js”, it is not registered

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm getting an error when I run karma start : $ karma start INFO [karma]: Karma v0.10.2 server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome WARN [preprocess]: Can not load "ng-html2js", it is not registered! Perhaps you are missing some plugin? ... But in my package file I have "karma-ng-html2js-preprocessor": "*", and the folder with code for this preprocessor exists in node_modules . Any ideas on how to solve the problem? 回答1: In my cases, the problem was connected to lack of karma-ng-html2js-preprocessor

Angular module not available in Karma Jasmine test run

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using angular full stack for development, my karma.conf.js file is files: [ 'app/bower_components/jquery/jquery.js', 'app/bower_components/angular/angular.js', 'app/bower_components/angular-mocks/angular-mocks.js', 'app/bower_components/angular-cookies/angular-cookies.js', 'app/bower_components/angular-resource/angular-resource.js', 'app/bower_components/angular-route/angular-route.js', 'app/bower_components/angular-sanitize/angular-sanitize.js', 'app/bower_components/angular-scenario/angular-scenario.js', 'app/scripts/controllers/*.js',

karma plugin dependencies not being found

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I run karma start I get the following issues C:\devl\JS\myProject>karma start 06 09 2015 11:30:19.133:WARN [plugin]: Cannot find plugin "karma-chrome-launcher ". Did you forget to install it ? npm install karma-chrome-launcher --save-dev 06 09 2015 11:30:19.149:WARN [plugin]: Cannot find plugin "karma-firefox-launche r". Did you forget to install it ? npm install karma-firefox-launcher --save-dev 06 09 2015 11:30:19.159:WARN [plugin]: Cannot find plugin "karma-ie-launcher". Did you forget to install it ? npm install karma-ie-launcher -

karma-sinon-chai fails after moving to Windows

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have unit tests running under Karma, and am using the sinon-chai library. Everything was working fine on Mac, but now I have moved to Windows the following error is occuring: C : \Users\mchambe4\dev\simple\client > node ./ node_modules / gulp / bin / gulp . js unit - tests - dev [ 16 : 29 : 31 ] Using gulpfile ~ \dev\simple\client\gulpfile . js [ 16 : 29 : 31 ] Starting 'unit-tests-dev' ... [ 16 : 29 : 31 ] Starting Karma server ... WARN [ karma ]: Port 9876 in use INFO [ karma ]: Karma v0 . 12.37 server started at http : /