# Jasmine

Jasmine is a JavaScript testing framework that runs in browsers and Node.js.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Learning Angular: Testing $q promise resolves with Sinon and Jasmine

DevFeed: [Learning Angular: Testing $q promise resolves with Sinon and Jasmine](<https://devfeed.tech/articles/learning-angular-testing-q-promise-resolves-with-sinon-and-jasmine-21246.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2015/06/learning-ng-testing-promises/>)

Published: 2015-06-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [Jasmine](<https://devfeed.tech/topics/jasmine.md>), [Promise](<https://devfeed.tech/topics/promise.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [js](<https://devfeed.tech/tags/js.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>)

### AI overview

A tutorial showing how to mock and resolve an asynchronous Angular $q promise in a Jasmine unit test using Sinon.js. It explains stubbing the promise-returning function, observing another function's invocations, invoking the subject under test, and resolving the promise before checking expectations.

### Source excerpt

Lorem ipsum dolor sit amet

## Avoid test code duplication in Jasmine tests

DevFeed: [Avoid test code duplication in Jasmine tests](<https://devfeed.tech/articles/avoid-test-code-duplication-in-jasmine-tests-21223.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2014/10/avoid-test-code-duplication-jasmine/>)

Published: 2014-10-29T00:00:00Z

Content type: article

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Jasmine](<https://devfeed.tech/topics/jasmine.md>), [test](<https://devfeed.tech/topics/test.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Code](<https://devfeed.tech/topics/code.md>), [Angular](<https://devfeed.tech/topics/angular.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [exception](<https://devfeed.tech/tags/exception.md>), [providers](<https://devfeed.tech/tags/providers.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This tutorial explains how to remove duplicated test code in Jasmine when testing equivalent functionality exposed through an Angular provider and service. It demonstrates extracting shared behavior into a function and passing a constructor function to create test objects lazily when the tests run.

### Source excerpt

Lorem ipsum dolor sit amet

## Jasmine - An Introduction

DevFeed: [Jasmine - An Introduction](<https://devfeed.tech/articles/jasmine-an-introduction-21165.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2012/08/jasmine---an-introduction/>)

Published: 2012-08-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Jasmine](<https://devfeed.tech/topics/jasmine.md>), [test](<https://devfeed.tech/topics/test.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Mocking](<https://devfeed.tech/topics/mocking.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [test](<https://devfeed.tech/tags/test.md>)

### AI overview

An introduction to Jasmine for testing JavaScript, covering setup, matchers, spies, inspection, the mock clock, and Jasmine Ajax.

### Source excerpt

Lorem ipsum dolor sit amet