Top "Jasmine" questions

Jasmine is a behavior-driven development (BDD) framework for testing JavaScript code.

Global variables in Karma test runner

I have a global variable defined in my main template, which I use to store information bits from the back …

javascript unit-testing angularjs jasmine karma-runner
How to Unit Test Isolated Scope Directive in AngularJS

What is a good way to unit test isolated scope in AngularJS JSFiddle showing unit test Directive snippet scope: {name: …

javascript unit-testing angularjs jasmine angularjs-directive
How do I read an Istanbul Coverage Report?

I've always used Jasmine for my unit tests, but recently I started using Istanbul to give me code coverage reports. …

javascript testing jasmine code-coverage istanbul
Getting requirejs to work with Jasmine

I first want to say that I am new to RequireJS and even newer to Jasmine. I am having some …

javascript unit-testing requirejs bdd jasmine
Unit Testing Angular Service that uses $timeout with Jasmine's Mock Clock

I have a function inside one of my angular services that I'd like to be called repeatedly at a regular …

javascript angularjs jasmine
Loading external file from Karma/Jasmine test

I'm trying to accomplish a Jasmine test (using Karma and IntelliJ 13) to validate JSON files. Ideally, my test would simply …

javascript json intellij-idea jasmine karma-runner
jasmine unit testing - testing for an undefined property of an object

I have the following statement expect(A.["BAR"].name).toEqual("foo"); which due to the fact my object A has …

javascript unit-testing bdd undefined jasmine
Angular unit testing with Jasmine: how to remove or modify spyOn

AngularJS v1.2.26 Jasmine v2.2.0 How can I change or remove the behavior of a spyOn? When I try to override …

javascript angularjs unit-testing jasmine karma-jasmine
Unable to simulate keypress event in Angular 2 unit test (Jasmine)

I am using a directive to get the data from input used as a filter text. here is my hostlistener …

unit-testing angular input jasmine keypress
How do I unit test if an element is visible when the *ngIf directive is used using Jasmine in Angular

I have an Angular 6 app and writing some unit tests trying to determine if an element is visible or not …

javascript angular jasmine karma-jasmine angular-test