Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between npm jasmine and jasmine-core packages

Tags:

npm

jasmine

https://www.npmjs.com/package/jasmine-core said it contains core files only. Why so many projects use core-files only instead of complete files? Such as https://angular.io/docs/ts/latest/guide/webpack.html .

like image 732
new2cpp Avatar asked Jul 24 '16 15:07

new2cpp


People also ask

What is npm Jasmine?

The jasmine module is a command line interface and supporting code for running Jasmine specs under Node. The core of jasmine lives at https://github.com/jasmine/jasmine and is jasmine-core in npm.

What is Jasmine core js?

A JavaScript Testing Framework 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.

How do I know what version of Jasmine core I have?

Do above mentioned or simply go to jasmine. js file and look for function getJasmineRequireObj(). version. This function is returning the version of the jasmine.

Which command is used to install Jasmine using npm?

Use the terminal below to run each of the following commands: npm install --save-dev jasmine installs the Jasmine npm package.


1 Answers

The reason the jasmine repo has so many more downloads is because all the language-specific Jasmine modules/packages depend on it. For example, when I added the jasmine gem to my Rails app, it installed both jasmine-gem and jasmine-core.

The naming is a bit confusing. Basically, they are trying to direct npm users to the jasmine-npm module that adds Node.js-specific features to Jasmine.

jasmine-core on npm points to the jasmine repository, which has the main Jasmine code. It's used in multiple types of projects, including Ruby, Node, and Python.

jasmine on npm points to the jasmine-npm repository, and it depends upon the code in the jasmine repository. Its README says: "This module allows you to run Jasmine specs for your Node.js code. The output will be displayed in your terminal by default."

Comparing jasmine vs. jasmine-core vs. jasmine-node vs. mocha

like image 108
Ryan Avatar answered Sep 28 '22 08:09

Ryan