Skip to content Skip to sidebar Skip to footer
Showing posts with the label Jasmine

Mocking Xhr Calls In Jasmine

I have a question regarding mocking xhr in Jasmine. I have the following Javascript situation: func… Read more Mocking Xhr Calls In Jasmine

Jasmine 2.0 How To Wait Real Time Before Running An Expectation

I am trying to test the postMessage API as there is a slight delay before message are receive i can… Read more Jasmine 2.0 How To Wait Real Time Before Running An Expectation

Element Is Not Currently Visible And So May Not Be Interacted With When Clicking A Button

My Protrator code is element(by.dataHook('delete-button')).click(); Getting: Element is … Read more Element Is Not Currently Visible And So May Not Be Interacted With When Clicking A Button

Angular 1.5 Test Component With Jasmine

I try test my component with Jasmine and Angular-mock, but I don't know how this do. This is m… Read more Angular 1.5 Test Component With Jasmine

Jasmine 2.0 Test With A Custom Matcher Fails: Undefined Is Not A Function

I have this function in my source file: function gimmeANumber(){ var x = 4; return x; } An… Read more Jasmine 2.0 Test With A Custom Matcher Fails: Undefined Is Not A Function

I Am Finding Trouble Using Log4js-protractor-appender

My log4js.js file code 'use strict'; var log4js = require('log4js'); var log4jsGen … Read more I Am Finding Trouble Using Log4js-protractor-appender

How To Change $httpbackend When[method] Statements Between Requests In Unit Testing?

In my testing i initiate some model data and mock the response: beforeEach(function(){ var re = … Read more How To Change $httpbackend When[method] Statements Between Requests In Unit Testing?

Jasmine Async Test Generation

let's imagine we have a promise that does a large amounts of operations and return helper funct… Read more Jasmine Async Test Generation

How To Deal With Thrown Errors In Async Code With Jasmine?

The following test causes Jasmine (2.3.4, run in browser via Karma) to crash and not run any subseq… Read more How To Deal With Thrown Errors In Async Code With Jasmine?

Run Javascript Es6 Code In Jasmine

I am exploring JavaScript es6 code in angularjs app and used grunt babel to compile the es6 to es5.… Read more Run Javascript Es6 Code In Jasmine

How Do I Test Angularjs Directive To Spy On The Function Call?

Code below executes but complains about element.popover not being invoked. I can't seem to figu… Read more How Do I Test Angularjs Directive To Spy On The Function Call?

Angular-Jasmine, Loading Json

I am trying to load json from local folder and then feed it into function to test it. Here is what … Read more Angular-Jasmine, Loading Json

Jasmine Testing .load() To Get Called URL

I have a function which loads a template and I want to check the correct URL is being called. As I … Read more Jasmine Testing .load() To Get Called URL