npmjasmine

Difference between npm jasmine and jasmine-core packages


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 .


Solution

  • 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