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

Angularjs Testing With Jasmine Unable To Call "angular.mock.module" While Using Angular-mocks.js

I'm trying to get a basic unit test working and am running into an issue using angular-mocks.js… Read more Angularjs Testing With Jasmine Unable To Call "angular.mock.module" While Using Angular-mocks.js

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

How To Include Php File To Run Test In Karma/jasmine?

The JS file I want to test is useless without PHP app on top of which it executes, because backend … Read more How To Include Php File To Run Test In Karma/jasmine?

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?

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

Scroll Down To An Element With Protractor

I have an element on the page that I'm testing that I have to scroll down to be visible. When I… Read more Scroll Down To An Element With Protractor

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

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?

An Angular2 App With Karma & Jasmine Throws Errors With Multi-level Directory Structure

I am building an Angular 2 app with the current 4.0.0-beta.1 release. After many hours of struggle,… Read more An Angular2 App With Karma & Jasmine Throws Errors With Multi-level Directory Structure

Jasmine Specs Without Specrunner.html - Js Dependencies

I have unit tests for an application where the javascript I wanted to test was dependent on other J… Read more Jasmine Specs Without Specrunner.html - Js Dependencies

Protractor - Works Well On Localhost But Remote Throws Timeout - Async Callback Was Not Invoked Within Timeout Specified

When I execute protractor protractor.conf.js --baseUrl=http://localhost:4200/, it works well - fill… Read more Protractor - Works Well On Localhost But Remote Throws Timeout - Async Callback Was Not Invoked Within Timeout Specified

Why Is Jasmine Not Executing It() On This Async Test?

I'm trying to test a prototypal method that returns insights about a dataset I am loading via A… Read more Why Is Jasmine Not Executing It() On This Async Test?

In Jasmine, How Does One Test A Function That Uses Document.write

I have a function: var foo = function() { document.write( bar() ); }; My Jasmine test is: desc… Read more In Jasmine, How Does One Test A Function That Uses Document.write

How To Test Code Setup With Babel Configuration(for Library) Using Jasmine?

Good day to all, I am struggling from quite a few days and raised few questions here here and I hav… Read more How To Test Code Setup With Babel Configuration(for Library) Using Jasmine?

Chutzpah Or Jasmine Does Not Let Me Run Tests Which Use Prototype

Chutzpah and Jasmine runs fine in my solution in Visual Studio, for my javascript tests. I have an … Read more Chutzpah Or Jasmine Does Not Let Me Run Tests Which Use Prototype

How Do I Inject $rootscope Into An Angularjs Unit Test?

Suppose I have a service that depends on a value in $rootScope, as with the following (trivial) ser… Read more How Do I Inject $rootscope Into An Angularjs Unit Test?

Is There A Way To Run Particular Protractor Test Depending On The Result Of The Other Test?

This kind of question has been asked before but most of this question has pretty complicated backgr… Read more Is There A Way To Run Particular Protractor Test Depending On The Result Of The Other Test?

How To Write A Jasmine Test For Printer Function

I am trying to write a Jasmine test for the following print function: printContent( contentName: … Read more How To Write A Jasmine Test For Printer Function

How Does One Stub Promise With Sinon?

I have a data service with following function function getInsureds(searchCriteria) { var defer… Read more How Does One Stub Promise With Sinon?

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