Registry / testing / atom-jasmine3-test-runner

atom-jasmine3-test-runner

JSON →
library5.2.13jsnpmunverified

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.

npm install atom-jasmine3-test-runner
INSTALL
IMPORT
SIG · ATOM-JASMINE3-TEST
A
atom-jasmine3-test-runner
testingjavascriptv5.2.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createRunner
const { createRunner } = require('atom-jasmine3-test-runner')
import { createRunner } from 'atom-jasmine3-test-runner'
CommonJS only; package does not provide ESM exports.
default (runner)
module.exports = require('atom-jasmine3-test-runner')
import runner from 'atom-jasmine3-test-runner'
When using as atomTestRunner in package.json, just set the string; programmatic usage requires require().
config function
const { createRunner } = require('atom-jasmine3-test-runner'); const runner = createRunner({}, configFunction)
const runner = createRunner()
Config function is optional; if provided, it's called before Jasmine starts.

Shows drop-in usage via package.json and a custom runner with options and a configuration function.

// In package.json: // "atomTestRunner": "atom-jasmine3-test-runner" // For custom runner: // spec/custom-runner.js const { createRunner } = require('atom-jasmine3-test-runner'); const extraOptions = { suffix: '-spec', legacySuffix: '-spec-v1' }; const configFn = function() { require('some-jasmine-plugin'); beforeEach(function() { jasmine.addMatchers({ toBeTheAnswer: function(util) { return { compare: function(actual) { const pass = util.equals(actual, 42); return { pass, message: `Expected ${actual} ${pass ? 'not to be' : 'to be'} 42` }; } }; } }); }); }; const runner = createRunner(extraOptions, configFn); module.exports = runner;
Debug
Known issues
breakingGlob dependency updated to v8 (v5.2.12+). Path separators may behave differently on Windows.
fix
Ensure glob patterns use forward slashes or update path handling.
affects: >=5.2.12
deprecatedLegacy support for -spec-v1 files will be removed in future major versions.
fix
Migrate all specs to Jasmine 3 syntax and remove legacy suffix.
affects: >=5.0.0
gotchaAtom's compile cache may cache package.json; changes to atomTestRunner may not take effect until restart.
fix
Restart Atom after modifying package.json.
affects: all
gotchaTypeScript specs require atom-ts-transpiler; custom runner file must be .js, not .ts.
fix
Use atom-ts-transpiler and keep custom runner as .js.
affects: all
breakingJasmine version upgrades (e.g., 3.8 to 3.10) may introduce new behavior or deprecations.
fix
Review Jasmine changelogs for breaking changes between versions.
affects: >=5.2.7
Errors
Common errors & fixes
Error: Cannot find module 'atom-jasmine3-test-runner'
Missing npm install or incorrect path in atomTestRunner.
fix
Run `npm install --save-dev atom-jasmine3-test-runner` and ensure package.json has the correct string.
TypeError: (0 , _atomJasmine3TestRunner.createRunner) is not a function
Using ESM import syntax instead of CommonJS require.
fix
Replace `import { createRunner } from '...'` with `const { createRunner } = require('...')`.
ReferenceError: jasmine is not defined
Using jasmine globals outside of spec files or before Jasmine is loaded.
fix
Ensure configuration function is called after Jasmine is loaded; use inside spec files or the config callback.
Error: Unrecognized token '...' (trying to parse .ts file)
TypeScript specs without atom-ts-transpiler configured.
fix
Install atom-ts-transpiler and add 'atomTranspilers' to package.json.
Upgrade
Version history
5.2.13latest on npm
Audit
Dependencies
jasminerequiredCore testing framework, version ~3.10
globrequiredFile pattern matching for spec files
jasmine-local-storagerequiredMock localStorage for tests
jasmine2-focusedrequiredSupport focused specs (fit/fdescribe)
Agent activity
23 hits · last 30 days
node
18
OpenAI (training)
2
Resources
atom-jasmine3-test-runner — npm install atom-jasmine3-test-runner · libregistry