Problem When testing Angular Components, I often stumble upon the following error message: Reason It's usually because I use a Component (here: & ...
Problem When testing Angular Components, I often stumble upon the following error message: Reason It's usually because I use a Component (here: & ...
I am testing a component using ngMocks and my spec keeps failing with "formGroup expects an instance of type FormGroup please supply one". I was able ...
I'm facing an issue mocking a child component in an Angular 9 component test using @ngneat/spectator. The mocking and passing of the mock work fine, b ...
I am using Spectator to write my Angular 8 tests and Jest to run them. I am new to frontend unit testing, so I may have overlooked something simple; a ...
I have an AngularJS module defined in a single HTML file. Unfortunately, I cannot refactor it into separate files. I need to add unit tests with angu ...
I have a template with behavior I want to test, but it invokes a controller with code I'd like to avoid, and I'd rather inject a mock for it. How do I ...
I'm trying to write a unit test for a service that has a dependency on another factory function that returns a promise. I've followed the process as s ...
I'm using unit-testing in my angularJS application. Here's a test spec I have for a service: And, here's the getTest function in my service: Why ...
I have been playing a bit with the following code and I am not able to find the issue, the test fails wit the following message: "Expected undefined n ...
I have a sails, node-js application in angular-js and I decided to make some tests for it, especifycally in the backend part, for which I am using Jas ...
Problem I am attempting to test a the following controller using Karma, Mocha, Chai, PhantomJS IndexCtrl.js (simplified) index.controller.test.j ...
I am trying to put together some tests of a component. I have the following the controller for item-selector has an activate() method. How can I in ...
I have a function: and I call it like this: Where createClub() is called from an Angular controller. I haven't got to writing the controller ye ...
I'm writing test using protractor and it always waits when $timeout will finished. If I use ignoreSynchronization = true; it stops to wait and test r ...
I have hit a strange thing when trying to test a service returning ordinary $q promise. No promise I try in any test is actually being ever resolved/r ...
I'm trying to create tests for a provider, but I can't seem to configure it in the test. Here's my provider with which I'm configuring a service with ...
I have been stuck on this problem for the past 24 hrs and cannot see what is wrong with my code here. I am getting an injector error from Angular and ...
I get an unexpected request error on GET /#/car/view/0 where 0 is the :carId. It's for a basic angular crud application on a ngMock backend. The $htt ...
My app works fine when i deploy it and run it in a browser I can successfully reach all my controllers/services. and they were linked together via su ...
I'm trying to test a component with controller, with some bindings: In my unit test file I don't want to load the complete application, just the th ...