dcsimg
Main » TERM » J »

Jasmine (JavaScript Testing Framework)

Jasmine is JavaScript’s open-source testing framework that’s capable of testing any kind of JavaScript application. It is independent of any browser, JavaScript framework, or DOM. Instead, it runs on any JavaScript-enabled platform. Jasmine ensures each line of JavaScript statement is tested properly by following the Behavior Driven Development (BDD) framework. Doing so allows Jasmine to provide a small syntax that allows testing the smallest unit of an application instead of the entire application. The process helps QA experts, developers, and stakeholders share ideas and work together. 

Jasmine is easy to implement in different development methodologies. Users simply need to download the standalone library files from the official website of Jasmine and implement these into the application.

Reasons to use Jasmine

Jasmine is a better option than other JavaScript testing frameworks for the following reasons:

  • The Jasmine framework uses only clean and obvious syntax similar to a natural language
  • Jasmine does not require a DOM
  • It is independent from other JavaScript frameworks
  • Jspec,  JS spec, Rspec heavily influence Jasmine
  • Jasmine is available in different versions such as ruby gem, stand-alone, and Node
  • The standalone version of Jasmine makes it easy to see how everything is set up, allowing users to use it the right way
  • Jasmine supports both front-end and back-end tests
  • It has strong community support and documentation

Jasmine vs. Mocha

Both Jasmine and Mocha are popular JavaScript testing frameworks. Here is a short comparison:

  • Jasmine uses spies to implement test doubles while Mocha uses an external library without any test doubles.
  • Both Jasmine and Mocha have command line utility for running tests.
  • Jasmine has built-in assertions while Mocha uses Chai for assertions instead of an assertions library.









LATEST ARTICLES
Texting & Chat Abbreviations

From A3 to ZZZ we list 1,559 text message and online chat abbreviations to help you translate and understand today's texting lingo. Includes Top... Read More »

Huge List of Computer Certifications

Have you heard about a computer certification program but can't figure out if it's right for you? Use this handy list to help you decide. Read More »

STUDY GUIDES
Computer Architecture Study Guide

Computer architecture provides an introduction to system design basics for most computer science students. Read More »

Network Fundamentals Study Guide

Networking fundamentals teaches the building blocks of modern network design. Learn different types of networks, concepts, architecture and... Read More »

The Five Generations of Computers

Learn about each of the five generations of computers and major technology developments that have led to the computing devices that we use... Read More »