karma-runner

How to select icon for customized menu entry in VisualStudio?

大憨熊 提交于 2019-12-23 01:58:59
问题 I use a custom command (external tool command) as entry for the Item context menu of the SolutionExplorer. How can I assign an icon to my custom command? I am able to choose the name of the command using "Modify Selection" and I am able to select the option "Image and Text". However, I did not find an option to choose the icon that should be used for my customized menu entry. Related question: How to execute custom file specific command / task in Visual Studio? 来源: https://stackoverflow.com

AngularJS e2e tests hang when changing between two separate angular apps

て烟熏妆下的殇ゞ 提交于 2019-12-22 19:31:16
问题 I have a frustrating problem: I want to write end to end tests for a complex angular app. The problem is that the login screen is a separate app. The initial idea was that it would branch out to separate other angular apps in our ecosystem based on the login credentials. It works like a charm. For the tests it is a nightmare though. The tests work as expected but as soon as correct credentials are entered and the main angular app is loaded the tests just time out. No error message or debug

AngularJS e2e tests hang when changing between two separate angular apps

余生长醉 提交于 2019-12-22 19:31:13
问题 I have a frustrating problem: I want to write end to end tests for a complex angular app. The problem is that the login screen is a separate app. The initial idea was that it would branch out to separate other angular apps in our ecosystem based on the login credentials. It works like a charm. For the tests it is a nightmare though. The tests work as expected but as soon as correct credentials are entered and the main angular app is loaded the tests just time out. No error message or debug

Cannot inject service into its Angular unit test

大城市里の小女人 提交于 2019-12-22 17:54:58
问题 I'm trying to unit test an Angular service using: angular 1.3.8 angular-mocks 1.3.8 karma 0.13.19 jasmine 2.4.1 node 0.10.33 OS: Windows 7 Browser: PhantomJS 2.1.3 The problem is, the service I wish to test ( MyService ) is not injected in the test file by the angular-mocks lib (i.e. the 'inject' method does nothing). My code looks as follows: main.js (function() { 'use strict'; angular.module('module', [ 'ngCookies', 'ngSanitize' ]); })(); service.js (function () { 'use strict'; angular

Karma-Jasmine: How to test $translate.use?

无人久伴 提交于 2019-12-22 17:49:15
问题 THE SITUATION: I am testing the function that allow the user to select a language. But I am getting the following error: TypeError: $translate.use is not a function I have seen similar questions in SO and other forums but they are not working for me. THE CODE: The configuration: app.config(function($stateProvider, $urlRouterProvider, $translateProvider) { $translateProvider.useSanitizeValueStrategy('sanitize'); $translateProvider.translations('EN', { "MY_ACCOUNT": "My account", "PROJECT_LIST"

Is it possible to run a single test using QUnit inside Karma?

孤者浪人 提交于 2019-12-22 15:07:13
问题 Jasmine has iit() and ddescribe , and Mocha has it.only and describe.only , but I can't see any way to get QUnit to focus on running a single test. The QUnit UI allows you to run a single test, but I can't see how to get this to work inside Karma, because it doesn't display the QUnit UI. 回答1: Here is my solution. It works fine for me, but YMMV. Download qunit-karma-setup.js, qunit-karma-launch.js from here Then, in your Gruntfile: config.set({ frameworks: ['qunit'], files: [ 'your-app-files

karma/jasmine console more detailed test results

余生长醉 提交于 2019-12-22 11:42:32
问题 I'm using Karma with Jasmine for my javascript unit tests. Suppose I have a failing test like this: expect(objectA).toEqual(expectedObjectA); When it fails, I see the two objects dumped on the console and a message telling me the objects are not equal: This is not very helpful because in order to find out why they are not equal, I have to to copy paste the text from the console, split the two objects from that object dump, format them, put them in a diff editor. (Sometimes even that doesn't

karma/jasmine console more detailed test results

和自甴很熟 提交于 2019-12-22 11:42:11
问题 I'm using Karma with Jasmine for my javascript unit tests. Suppose I have a failing test like this: expect(objectA).toEqual(expectedObjectA); When it fails, I see the two objects dumped on the console and a message telling me the objects are not equal: This is not very helpful because in order to find out why they are not equal, I have to to copy paste the text from the console, split the two objects from that object dump, format them, put them in a diff editor. (Sometimes even that doesn't

Submitting a form within Karma process => Some of your tests did a full page reload

会有一股神秘感。 提交于 2019-12-22 10:13:24
问题 In one angular directive, I have this code: $('[name=' + formName + ']').bind('submit', function () { validate(); }); In the beforeEach clause of a Karma test, I have this code: bootstrapInput = $compile('<form novalidate name="aForm">' + '<input-field icon="true" for="email">' + '<div>' + '<input class="form-control" class="email" name="email" id="email" type="email" ng-model="user.email" required />' + '</div>' + '<input-validation for="email" custom-error="custom error" required="Email is

How does the createSpy work in Angular + Jasmine?

自作多情 提交于 2019-12-22 07:08:17
问题 I made a simple demo of a factory and I am trying to test this using jasmine . I am able to run the test but I am using the spyOn method. I would rather use jasmine.createSpy or jasmine.createSpyObj to do the same test. Could someone help me to refactor my code so that uses these methods instead in my example? http://plnkr.co/edit/zdfYdtWbnQz22nEbl6V8?p=preview describe('value check',function(){ var $scope, ctrl, fac; beforeEach(function(){ module('app'); }); beforeEach(inject(function(