{"id":24934,"library":"atom-jasmine3-test-runner","title":"Atom Jasmine 3 Test Runner","description":"Atom Jasmine 3 Test Runner (v5.2.13) lets you run Atom package tests with Jasmine 3.x instead of the default Jasmine 1.3. It provides a simple drop-in replacement via the atomTestRunner field in package.json, with options for custom runners and legacy spec support. Maintained by UziTech, with updates for dependency compatibility. Key differentiators: minimal configuration, TypeScript support via atom-ts-transpiler, and custom matchers/plugins.","status":"active","version":"5.2.13","language":"javascript","source_language":"en","source_url":"https://github.com/UziTech/atom-jasmine3-test-runner","tags":["javascript","atom","jasmine","tests","typescript"],"install":[{"cmd":"npm install atom-jasmine3-test-runner","lang":"bash","label":"npm"},{"cmd":"yarn add atom-jasmine3-test-runner","lang":"bash","label":"yarn"},{"cmd":"pnpm add atom-jasmine3-test-runner","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core testing framework, version ~3.10","package":"jasmine","optional":false},{"reason":"File pattern matching for spec files","package":"glob","optional":false},{"reason":"Mock localStorage for tests","package":"jasmine-local-storage","optional":false},{"reason":"Support focused specs (fit/fdescribe)","package":"jasmine2-focused","optional":false}],"imports":[{"note":"CommonJS only; package does not provide ESM exports.","wrong":"import { createRunner } from 'atom-jasmine3-test-runner'","symbol":"createRunner","correct":"const { createRunner } = require('atom-jasmine3-test-runner')"},{"note":"When using as atomTestRunner in package.json, just set the string; programmatic usage requires require().","wrong":"import runner from 'atom-jasmine3-test-runner'","symbol":"default (runner)","correct":"module.exports = require('atom-jasmine3-test-runner')"},{"note":"Config function is optional; if provided, it's called before Jasmine starts.","wrong":"const runner = createRunner()","symbol":"config function","correct":"const { createRunner } = require('atom-jasmine3-test-runner'); const runner = createRunner({}, configFunction)"}],"quickstart":{"code":"// In package.json:\n// \"atomTestRunner\": \"atom-jasmine3-test-runner\"\n\n// For custom runner:\n// spec/custom-runner.js\nconst { createRunner } = require('atom-jasmine3-test-runner');\nconst extraOptions = {\n  suffix: '-spec',\n  legacySuffix: '-spec-v1'\n};\nconst configFn = function() {\n  require('some-jasmine-plugin');\n  beforeEach(function() {\n    jasmine.addMatchers({\n      toBeTheAnswer: function(util) {\n        return {\n          compare: function(actual) {\n            const pass = util.equals(actual, 42);\n            return { pass, message: `Expected ${actual} ${pass ? 'not to be' : 'to be'} 42` };\n          }\n        };\n      }\n    });\n  });\n};\nconst runner = createRunner(extraOptions, configFn);\nmodule.exports = runner;","lang":"javascript","description":"Shows drop-in usage via package.json and a custom runner with options and a configuration function."},"warnings":[{"fix":"Ensure glob patterns use forward slashes or update path handling.","message":"Glob dependency updated to v8 (v5.2.12+). Path separators may behave differently on Windows.","severity":"breaking","affected_versions":">=5.2.12"},{"fix":"Migrate all specs to Jasmine 3 syntax and remove legacy suffix.","message":"Legacy support for -spec-v1 files will be removed in future major versions.","severity":"deprecated","affected_versions":">=5.0.0"},{"fix":"Restart Atom after modifying package.json.","message":"Atom's compile cache may cache package.json; changes to atomTestRunner may not take effect until restart.","severity":"gotcha","affected_versions":"all"},{"fix":"Use atom-ts-transpiler and keep custom runner as .js.","message":"TypeScript specs require atom-ts-transpiler; custom runner file must be .js, not .ts.","severity":"gotcha","affected_versions":"all"},{"fix":"Review Jasmine changelogs for breaking changes between versions.","message":"Jasmine version upgrades (e.g., 3.8 to 3.10) may introduce new behavior or deprecations.","severity":"breaking","affected_versions":">=5.2.7"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev atom-jasmine3-test-runner` and ensure package.json has the correct string.","cause":"Missing npm install or incorrect path in atomTestRunner.","error":"Error: Cannot find module 'atom-jasmine3-test-runner'"},{"fix":"Replace `import { createRunner } from '...'` with `const { createRunner } = require('...')`.","cause":"Using ESM import syntax instead of CommonJS require.","error":"TypeError: (0 , _atomJasmine3TestRunner.createRunner) is not a function"},{"fix":"Ensure configuration function is called after Jasmine is loaded; use inside spec files or the config callback.","cause":"Using jasmine globals outside of spec files or before Jasmine is loaded.","error":"ReferenceError: jasmine is not defined"},{"fix":"Install atom-ts-transpiler and add 'atomTranspilers' to package.json.","cause":"TypeScript specs without atom-ts-transpiler configured.","error":"Error: Unrecognized token '...' (trying to parse .ts file)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}