Top "Jasmine" questions

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

Test a function that contains a setTimeout()

I have a close function in my component that contains a setTimeout() in order to give time for the animation …

angular testing jasmine settimeout karma-jasmine
Protractor e2e test case for downloading pdf file

Can anyone tell me how to write test case for a link to download pdf file using jasmine framework ? Thanks …

selenium-webdriver jasmine protractor
How can I run tests with a headless browser?

Using: ng test Angular CLI runs the tests by default in Chrome, which is great, but what if I need …

angular unit-testing jasmine karma-runner angular-cli
How to generate allure report

I am new to allure reports and want to generate the allure report. Can anyone help with this? I am …

maven jasmine protractor allure
Sinon JS "Attempted to wrap ajax which is already wrapped"

I got the above error message when I ran my test. Below is my code (I'm using Backbone JS and …

testing backbone.js jasmine sinon
How to test behavior in the link function of a directive

In some of my directives, I'm adding functions to the scope to handle logic specific for the directive. For example: …

javascript angularjs jasmine
Angular2, testing and resolved data: How to test ngOnInit?

I'm working through the Angular2 testing guide and wish to write a test for the ngOnInit() function. The one from …

javascript angular jasmine karma-runner resolver
Unit-testing directive controllers in Angular without making controller global

In Vojta Jina's excellent repository where he demonstrates testing of directives, he defines the directive controller outside of the module …

unit-testing angularjs angularjs-directive jasmine karma-runner
Why can't nested describe() blocks see vars defined in outer blocks?

I've run into this issue in real code, but I put together a trivial example to prove the point. The …

javascript jasmine