🌐
npm
npmjs.com β€Ί package β€Ί jasmine-node
jasmine-node - npm
DOM-less simple JavaScript BDD testing framework for Node. Latest version: 3.0.0, last published: 7 years ago. Start using jasmine-node in your project by running `npm i jasmine-node`. There are 188 other projects in the npm registry using jasmine-node.
      Β» npm install jasmine-node
    
Published Β  May 21, 2019
Version Β  3.0.0
🌐
Jasmine
jasmine.github.io β€Ί setup β€Ί nodejs.html
Node.js Setup
The jasmine module is a command line interface and supporting code for running Jasmine specs under Node.js. Jasmine 5.x supports Node versions 18, 20, and 22.
Discussions

What is the purpose of jasmine-node?
I can run my specs with either jasmine-node or just jasmine. They both run my specs. So, what value does jasmine-node add? The readme says: This node.js module makes the wonderful Pivotal Lab's j... More on stackoverflow.com
🌐 stackoverflow.com
Newest 'jasmine-node' Questions - Stack Overflow
Stack Overflow | The World’s Largest Online Community for Developers More on stackoverflow.com
🌐 stackoverflow.com
How to run Jasmine tests on Node.js from command line - Stack Overflow
How do I run Jasmine tests on Node.js from command line? I have installed jasmine-node via npm and written some tests. I want to run tests inside the spec directory and get results in the terminal,... More on stackoverflow.com
🌐 stackoverflow.com
What's the correct way to use Jasmine from Node?
After much hacking, I've managed to get a simple Jasmine test running via Node. However, there is some weird stuff I do not understand... The jasmine files export functions that appear to need a More on stackoverflow.com
🌐 stackoverflow.com
🌐
npm
npmjs.com β€Ί package β€Ί jasmine
jasmine - npm
April 11, 2026 - The jasmine package is a command line interface and supporting code for running Jasmine specs under Node.
      Β» npm install jasmine
    
Published Β  Apr 11, 2026
Version Β  6.2.0
🌐
GitHub
github.com β€Ί mhevery β€Ί jasmine-node
GitHub - mhevery/jasmine-node: Integration of Jasmine Spec framework with Node.js
This node.js module makes the wonderful Pivotal Lab's jasmine spec framework (version 1) available in node.js.
Starred by 1.5K users
Forked by 291 users
Languages Β  JavaScript 96.7% | Shell 1.8% | CoffeeScript 1.5% | JavaScript 96.7% | Shell 1.8% | CoffeeScript 1.5%
🌐
GitHub
github.com β€Ί jasmine β€Ί jasmine
GitHub - jasmine/jasmine: Simple JavaScript testing framework for browsers and node.js Β· GitHub
Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.
Starred by 15.8K users
Forked by 2.2K users
Languages Β  JavaScript 98.1% | CSS 1.2%
🌐
DEV Community
dev.to β€Ί ivadyhabimana β€Ί setup-jasmine-testing-framework-in-node-js-a-step-by-step-guide-50kg
Setup Jasmine testing Framework in Node JS | a step by step guide - DEV Community
August 26, 2025 - We will introduce Jasmine as a testing Framework, get it installed and configured and write a simple tests to demonstrate the process of Testing with Jasmine. ... Node: You need to have node installed on your machine as we will be using it to install Jasmine and run our files
🌐
GitHub
github.com β€Ί AndyLPK247 β€Ί jasmine-node-js-example
GitHub - AndyLPK247/jasmine-node-js-example: An example project for Jasmine tests running on Node.js and written in JavaScript
This is an example project for Jasmine tests written in JavaScript and running on Node.js. Run tests by simply running the jasmine command from the project root directory.
Starred by 3 users
Forked by 41 users
Languages Β  JavaScript 100.0% | JavaScript 100.0%
🌐
GitHub
github.com β€Ί jasmine β€Ί jasmine-npm
GitHub - jasmine/jasmine-npm: A jasmine runner for node projects. Β· GitHub
The jasmine package is a command line interface and supporting code for running Jasmine specs under Node.
Starred by 380 users
Forked by 145 users
Languages Β  JavaScript
Find elsewhere
🌐
CloudBees
cloudbees.com β€Ί blog β€Ί jasmine-node-js-application-testing-tutorial
Using Jasmine to Test Node.js Applications
Learn how to test node.js applications with the JavaScript framework Jasmine in this screencast. Watch now!
🌐
Jasmine
jasmine.github.io β€Ί archives β€Ί 2.7 β€Ί node.html
node.js - Jasmine Documentation
This page is for an older version of Jasmine (2.7) The current stable version of Jasmine is: 5.13 - You can also look at the docs for the next release: Edge Β· Jump To: ajax.js Β· boot.js Β· custom_boot.js Β· custom_equality.js Β· custom_matcher.js Β· custom_reporter.js Β· focused_specs.js Β· introduction.js Β· node.js Β·
testing framework for JavaScript
Jasmine is an open-source testing framework for JavaScript. It aims to run on any JavaScript-enabled platform, to not intrude on the application nor the IDE, and to have easy-to-read syntax. It is … Wikipedia
Factsheet
Developer Pivotal Labs
Initial release September 14, 2010; 15 years ago (2010-09-14)
Stable release 6.2.0
/ 11 April 2026; 34 days ago (11 April 2026)
Factsheet
Developer Pivotal Labs
Initial release September 14, 2010; 15 years ago (2010-09-14)
Stable release 6.2.0
/ 11 April 2026; 34 days ago (11 April 2026)
🌐
Jasmine
jasmine.github.io
Jasmine Documentation
Jasmine is a framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It runs in browsers and in Node.js.
Top answer
1 of 1
2

The subtitle of jasmine-node is a good answer to your question:

DOM-less simple JavaScript BDD testing framework for Node

Let's go and look at the different parts of the answer:

DOM-less simple testing framework

jasmine is a JS testing tool. At the beginning JS was just for browsers. To give an output inside the browser there is this DOM Model, which is not so easy to use. Node.js gives you the possibility to run JS also on a server. On the server-side there is no DOM. To make things faster and easier you don't need a DOM implementation for your testing tool, when it just runs inside node.js

Jasmine itself is independent of a browser, so that is an intention for both jasmine and jasmine-node.

for Node

This is easy - jasmine-node is just for node and not for browser JS.

But behind that part there is the main purpose. Because the requirements between a brwoser test and a node.js test are totaly different. Because jamsine supports both ways it can not have all features, which are possible with node. If you look at the possible arguments at the documentation you see that there are much more options inside the CLI of jasmine-node. Some of the most interesting features are maybe:

  • Test a file automaticaly, when it changes
  • test coffeescript files directly

So to give you an answer to your question:

What is the purpose of jasmine-node?

jasmine-node provides you more CLI options for you tests. It can make some work automaticaly and it uses more of the node functions to provide that. So the future way for jasmine-node will be in providing more functions, which are just able to implement, when you just test on node.js

🌐
Nicholasjohnson
nicholasjohnson.com β€Ί node-course β€Ί jasmine
Jasmine - Nicholas Johnson.com
Jasmine is a unit testing framework for JavaScript. It was originally developed for the browser, but it works equally well in Node using the jasmine-node module
🌐
Stack Overflow
stackoverflow.com β€Ί questions β€Ί tagged β€Ί jasmine-node
Newest 'jasmine-node' Questions - Stack Overflow
I'm running jasmine-node 3.0.0. When I run the following spec, jasmine reports "TypeError: Cannot read properties of undefined (reading 'returnValue')".
Top answer
1 of 4
94

This should get you going quickly:

  1. install Node.js (obviously).
  2. Next install Jasmine. Open a command prompt and run:

    npm install -g jasmine

  3. Next, cd to any directory and set up an example 'project':

    jasmine init
    jasmine examples

  4. Now run your unit tests:

    jasmine

If your jasmine.json file is somewhere else besides spec/support/jasmine.json, simply run:

jasmine JASMINE_CONFIG_PATH=relative/path/to/your/jasmine.json

For more info see:

  • https://www.npmjs.com/package/jasmine
  • http://jasmine.github.io/2.2/node.html
2 of 4
23

EDIT

It seems this is no longer the current best answer as the package is unmaintained. Please see the answer below


You can do this

from your test directory

Copysudo npm install jasmine-node

This installs jasmine into ../node_modules/jasmine-node

then

Copy../node_modules/jasmine-node/bin/jasmine-node --verbose --junitreport --noColor spec

which from my demo does this

CopyPlayer - 5 ms
    should be able to play a Song - 2 ms

    when song has been paused - 1 ms
        should indicate that the song is currently paused - 0 ms
        should be possible to resume - 0 ms
    tells the current song if the user has made it a favorite - 1 ms

    #resume - 0 ms
        should throw an exception if song is already playing - 0 ms

Player - 5 ms
    should be able to play a Song - 2 ms

    when song has been paused - 1 ms
        should indicate that the song is currently paused - 0 ms
        should be possible to resume - 0 ms
    tells the current song if the user has made it a favorite - 1 ms

    #resume - 0 ms
        should throw an exception if song is already playing - 0 ms

Finished in 0.01 seconds
5 tests, 8 assertions, 0 failures, 0 skipped
Top answer
1 of 2
6

Pivatol recently added better node.js support to Jasmine in 2.0 and plans to release an official NPM package. For now you can use it from node by following the implementation used in their own node test suite.

Here is a brief explanation into what is happening under the covers in the code you wrote:

jasmine = jasmine.core(jasmine); When you initially require('jasmine') you are getting back a single function, getJasmineRequiredObj(); By calling jasmine.core(jasmine), you are tell jasmine to return it's behavioral methods using node exports statements instead of adding them onto the window.jasmineRequire object.

https://github.com/pivotal/jasmine/blob/master/src/core/requireCore.js

function getJasmineRequireObj() {
  if (typeof module !== 'undefined' && module.exports) {
    return exports;  
  } else {
    window.jasmineRequire = window.jasmineRequire || {};
    return window.jasmineRequire;
  }
}

// jRequire is window.jasmineRequire in a browser or exports in node.
getJasmineRequireObj().core = function(jRequire) {
  var j$ = {};

  jRequire.base(j$);
  j$.util = jRequire.util();
  j$.Any = jRequire.Any();
  ...
  return j$; // here is our jasmine object with all the functions we want.
};

jasmineConsole.console(jasmineConsole, jasmine) Jasmine initializes it's core functions separately from it's reporters. This statement is essentially the same thing as jasmine.core(jasmine) only for the console reporter.

https://github.com/pivotal/jasmine/blob/master/src/console/requireConsole.js

2 of 2
3

There is also jasmine-node (that still uses jasmine 1.3 and has a beta version with jasmine 2.0 - February 2015) and jasmine-npm (from the jasmine maintainers themselves, with the latest version).

Both of them are easy to use from the command line, with no code required (except the tests, of course!).

🌐
Fossasia
blog.fossasia.org β€Ί testing-with-node-jasmine
Testing with Jasmine-Node – blog.fossasia.org
January 23, 2018 - I have gone through various articles and find out Jasmine as one of the best frameworks for testing Javascript applications. For specifically NodeJS, a better option will be to use Jasmine-Node.
🌐
Testim
testim.io β€Ί blog β€Ί jasmine-js-a-from-scratch-tutorial-to-start-testing
Jasmine unit testing JS: A guide to start testing from-scratch
June 16, 2025 - Yes, you can debug Jasmine Test cases. You can add debugger; in browser-based setups in your spec or source files. After that, you can use the browser’s built-in dev tools to debug the code. While using Node.js, you can run the tests with node inspect node_modules/.bin/jasmine for starting ...
🌐
Semaphore
semaphore.io β€Ί home β€Ί getting started with node.js and jasmine
Getting Started with Node.js and Jasmine - Semaphore Tutorial
March 18, 2015 - Jasmine is a BDD style testing library for Node.js. This article will walk you through its installation, configuration and usage.