So, I've been looking all over for this, found "similar" answers here, but not exactly what I want.  Right now if I want to test a single file with karma, I need to do fit(), fdescribe() on the file in question...  However, what I do want...
I have created an application using ng-table , the application is working fine but i don'nt know how to write a test case for that sorting and getData.   Can anyone please tell me some solution for testing that functionality  My code is as given...
I have a javascript function which is supposed to behave differently when offline than online as a safeguard.  I would like to have a Jasmine unit test which tests the function in both offline and online modes - e.g.,  // offline describe('When t...
I'm having trouble testing my directive with an ng-mouseenter directive.  I'd like to test several things, but first off, I need to test that the method supplied to ng-mouseenter is called.  my test:  describe('hover tests', function...
I have some test files with tests I'd like to run against my app.   I am attempting to use karma, karma-webpack, karma-babel-preprocessor, karma-chrome-launcher, and jasmine in my testing. My app depends on many things, including backbone, marion...
I have an ngResourceMockFactory which looks like this:  (function() {   'use strict';    angular.module('app')     .factory('NgResourceMock', ngResourceMockFactory)   ;    ngResourceMockFactory.$inject = [];    function ngReso...
So, here's my test:  describe('My Test', function(){    var $componentController, $compile, controller, scope;    beforeEach(inject(function($injector, $rootScope, $templateCache){      $templateCache.put('my-component.html', '...
I'm trying to get a basic unit test example working. It all works fine with this app.js  var whapp = angular.module('whapp', []) .filter('reverse',[function(){     return function(string){         return string.split('').r...
I have just started learning angular unit testing. However, this test on a function with http call fails. I have pin pointed the problem but however I am not being able to fix it. I know it's some simple issue  Controller  //Get data from URL vm....
I have my project setup in WebStorm to transpile TypeScript into JavaScript etc. So I write my code as well as my tests in TypeScript.  When I run "Karma with coverage" in webstorm it all runs fine.  But, when for example a tests fails, the o...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.