{"id":13264,"library":"grunt-jasmine-node","title":"Grunt Jasmine Node Task Runner","description":"This package provides a Grunt task for integrating Jasmine test suites, specifically leveraging the `jasmine-node` test runner. Its latest version, 0.3.1, was published in 2014, indicating it is an effectively abandoned project. The underlying `jasmine-node` library, which bundled Jasmine 1.3.1 for Node.js environments, itself entered maintenance mode in May 2019 and advises users to migrate to the actively maintained `jasmine` or `jasmine-npm` packages for modern Node.js development. Consequently, `grunt-jasmine-node` lacks compatibility with contemporary Node.js versions, current Grunt releases, and Jasmine versions beyond 1.x (e.g., Jasmine 2.x and 3.x series). Developers seeking to run Jasmine tests within a Grunt workflow should instead consider `grunt-contrib-jasmine`, which is an actively maintained plugin supporting modern Jasmine features and Node.js environments.","status":"abandoned","version":"0.3.1","language":"javascript","source_language":"en","source_url":"git://github.com/jasmine-contrib/grunt-jasmine-node","tags":["javascript","gruntplugin","grunt","plugins","builds","ci","jasmine","jasmine-node"],"install":[{"cmd":"npm install grunt-jasmine-node","lang":"bash","label":"npm"},{"cmd":"yarn add grunt-jasmine-node","lang":"bash","label":"yarn"},{"cmd":"pnpm add grunt-jasmine-node","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as the task runner for this plugin.","package":"grunt","optional":false},{"reason":"This plugin wraps jasmine-node to run Jasmine tests. jasmine-node itself is in maintenance mode and deprecated.","package":"jasmine-node","optional":false}],"imports":[{"note":"Grunt plugins are loaded into the Gruntfile, not imported via ES modules or CommonJS require for direct use.","symbol":"grunt.loadNpmTasks","correct":"grunt.loadNpmTasks('grunt-jasmine-node');"},{"note":"The 'jasmine_node' task is configured within Grunt's `initConfig` object.","symbol":"Task Configuration","correct":"grunt.initConfig({\n  jasmine_node: {\n    // ... options ...\n  }\n});"}],"quickstart":{"code":"module.exports = function(grunt) {\n  grunt.initConfig({\n    jasmine_node: {\n      options: {\n        forceExit: true,\n        match: '.', // Match all files in spec directory\n        matchall: false,\n        extensions: 'js',\n        specNameMatcher: 'spec' // Look for files ending with 'spec.js'\n      },\n      all: ['spec/'] // Directory containing your spec files\n    }\n  });\n\n  grunt.loadNpmTasks('grunt-jasmine-node');\n\n  grunt.registerTask('test', ['jasmine_node']);\n\n  // To run:\n  // 1. npm install grunt grunt-jasmine-node jasmine-node --save-dev\n  // 2. Create 'spec' directory and add 'my-test.spec.js'\n  // 3. grunt test\n};\n","lang":"javascript","description":"Demonstrates how to configure and run the `jasmine_node` task within a Gruntfile to execute Jasmine 1.x tests."},"warnings":[{"fix":"Migrate to `grunt-contrib-jasmine` (for Jasmine 2.x/3.x support) or use modern test runners directly via npm scripts.","message":"This plugin is tied to Jasmine 1.x (specifically 1.3.1 via `jasmine-node`). It does not support features introduced in Jasmine 2.x (e.g., `fit`, `fdescribe`, `beforeAll`, `afterAll`) or later versions, leading to significant compatibility issues with modern test suites.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Use a Node.js version compatible with the plugin's last known good configuration (likely Node.js <14) or, preferably, migrate to a modern, actively maintained test runner setup.","message":"The plugin is likely incompatible with recent Node.js versions (e.g., Node.js 14+). The underlying `jasmine-node` officially supported up to Node.js 12, and this plugin ceased updates even earlier.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Avoid using `jasmine-node` and by extension `grunt-jasmine-node`. Transition to `jasmine` or `jasmine-npm` for Node.js testing, potentially integrated with `grunt-contrib-jasmine` or npm scripts.","message":"The `jasmine-node` library, which `grunt-jasmine-node` relies upon, is in maintenance mode and explicitly recommends migrating to the official `jasmine` or `jasmine-npm` packages.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Evaluate modern Grunt plugins like `grunt-contrib-jasmine` or consider moving away from Grunt entirely for running tests, opting for direct integration with `npm test` scripts.","message":"The Grunt ecosystem for test running has largely shifted. More actively maintained alternatives like `grunt-contrib-jasmine` (which uses Headless Chrome for modern Jasmine versions) or direct npm scripts with contemporary test runners are widely preferred.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Discontinue use immediately and migrate to actively maintained testing solutions to mitigate security risks. Regularly scan new dependencies for vulnerabilities.","message":"Due to being abandoned for over a decade, this package and its transitively included dependencies are highly susceptible to known but unpatched security vulnerabilities.","severity":"breaking","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure `npm install grunt-jasmine-node --save-dev` has been run and `grunt.loadNpmTasks('grunt-jasmine-node');` is present in your Gruntfile.js.","cause":"The Grunt task was not correctly loaded or installed.","error":"Warning: Task \"jasmine_node\" not found."},{"fix":"Verify that only one version of Jasmine is being loaded and that your test code is written for Jasmine 1.x. If you require newer Jasmine features, you must migrate to a different plugin or runner.","cause":"This error often occurs when mixing different Jasmine versions or using an older Jasmine API (like 1.x) with code expecting a newer one, or vice-versa. `jasmine-node` uses Jasmine 1.x.","error":"TypeError: global.jasmine.getEnv is not a function"},{"fix":"Run `npm install jasmine-node --save-dev` (or remove `node_modules` and run `npm install`) to ensure `jasmine-node` is available to the Grunt plugin.","cause":"The `jasmine-node` package, a dependency of this plugin, was not installed correctly.","error":"Cannot find module 'jasmine-node'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null}