I have a method which is being called using a d3 timer. Whenever the method is called, the method emits an object with a couple of values.  One of the values increases over time. I would like to write a test to check whether the values are in the asc...
I've struggled in problem with my e2e tests runs on selenium grid. Sometimes the tests are failed due to   Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.   Tried to solve it somehow b...
According to the Angular Testing documentation, to trigger the events from the tests, we use the triggerEventHandler() method on the debug element. This method takes the event name and the object. Now, this works if we are adding the events using the...
I recently upgraded to protractor 2.5.1 and all of my tests are now failing. I suspect it is something to do with Jasmine but I'm not sure how to fix. Any help would be appreciated, thank you in advance. Here is the error I receive:  Should login...
I'm building my first Ionic app and trying hard to follow TDD. I've hit a stumbling block with the Platform.ready promise that Ionic provides. I cannot, for the life of me, figure out how to trigger it while testing. In the Ionic demos it app...
How can I spy on MyFunction and return 2 in Jasmine 2.0?  I have the following code that errors on the first line inside shouldPass with:     Error: function MyFunction(){ return 1; }() method does not exist    It appears to be using the entire funct...
I'm trying to override/re=assign a Jasmine spy on a mock and can't seem to get it to work. The mock looks like this:  export class UserClassMock {     public static instance(): any {         let instance = jasmine.createSpyObj('userClass&...
I am quite new with Jasmine tests and I don't know what to test for example in this code --   Cemcloud.CRUDEvents = function(onlyEdit) {  if (onlyEdit == undefined) {     onlyEdit = false; } var elements = $('.add, .edit'); if (onlyEdit)...
So I'm using Typescript/RequireJs/Jasmine, and can't get my spy to work for modules loaded in another module.  Here is my Spec:  import { CrmWebApiLib }     from "../../../webresources/allgnt_/scripts/Allgnt.RestLib"; import { TextFor...
Using Protractor 5.1.2 and Jasmine2 for describing test cases, how does one get the current testcase/spec being run in the beforeEach method?  I would like to do some different setup based on which test case I'm running.  I do not want to put the...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.