Registry / testing / jest-spin-reporter

jest-spin-reporter

JSON →
library2.0.0jsnpmunverified

jest-spin-reporter is a straightforward Jest test reporter that displays a progress spinner during test execution. Its primary function is to provide visual feedback for ongoing test suites, enhancing the developer experience by showing that tests are actively running, unlike default reporters that might appear stuck during long runs. The current stable version is 2.0.0, released in August 2019. The package has an infrequent release cadence, with no further updates since 2.0.0, suggesting it is in maintenance mode. Key differentiators include its minimalistic design focused solely on a spinner-based progress indicator, offering a clear visual cue without additional detailed logging or complex reporting features. It contrasts with more verbose reporters by prioritizing simplicity and immediate 'active' status feedback, making it ideal for quick visual status checks.

npm install jest-spin-reporter
INSTALL
IMPORT
SIG · JEST-SPIN-REPORTER
J
jest-spin-reporter
testingjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

Reporter Configuration
/* In your jest.config.js or package.json */ { "reporters": [ "jest-spin-reporter" ] }
import JestSpinReporter from 'jest-spin-reporter'; // Not the primary or documented usage pattern const JestSpinReporter = require('jest-spin-reporter'); // Not the primary or documented usage pattern
This package is a Jest reporter and is primarily consumed by configuring it in Jest's `reporters` array. Direct programmatic import of the reporter module is generally not required for standard usage, as Jest handles its instantiation.

Demonstrates how to install `jest-spin-reporter` and configure Jest to use it, including a simple test setup to observe the spinner during a simulated long test.

npm install --save-dev jest-spin-reporter // jest.config.js (or 'jest' field in package.json) module.exports = { // ... other Jest configurations reporters: [ "default", // It's often beneficial to keep the default reporter for summary output "jest-spin-reporter" ] }; // Example of a test file (e.g., my-test.spec.js) describe('My test suite', () => { test('should pass quickly', () => { expect(true).toBe(true); }); test('should simulate a longer test to observe spinner', async () => { // Simulate asynchronous work that takes time await new Promise(resolve => setTimeout(resolve, 800)); expect(true).toBe(true); }); test('another quick test', () => { expect('hello').toBe('hello'); }); });
Debug
Known issues
breakingVersion 2.0.0 introduced a breaking change by updating the Node.js target, explicitly stating support for 'latest node only'. This means it may be incompatible with older Node.js environments.
fix
Ensure your Node.js environment is updated to a modern version. For Node.js versions prior to what was considered 'latest' in August 2019, you may need to remain on jest-spin-reporter 1.x or upgrade your Node.js runtime.
affects: >=2.0.0
gotchaBy default, adding 'jest-spin-reporter' to your `reporters` array without also including 'default' will remove Jest's default test summary output. This can lead to a lack of detailed pass/fail information at the end of a test run.
fix
To retain the standard Jest summary, explicitly include the 'default' reporter in your `reporters` array alongside 'jest-spin-reporter', e.g., `"reporters": ["default", "jest-spin-reporter"]`.
affects: >=1.0.0
gotchaWhen combining `jest-spin-reporter` with other Jest reporters, there's a potential for conflicting or messy terminal output, especially if other reporters also use interactive elements or extensive logging to stdout.
fix
Test your reporter configuration thoroughly in your CI/CD and local environments. Consider the order of reporters in the array, as some reporters might overwrite or interfere with the output of others. Prioritize reporters that provide essential information and use the spinner reporter for visual feedback.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'jest-spin-reporter' from 'jest.config.js'
The package 'jest-spin-reporter' is not installed or Jest cannot resolve its path.
fix
Run `npm install --save-dev jest-spin-reporter` to ensure the package is installed. Verify that the name 'jest-spin-reporter' is spelled correctly in your Jest configuration file.
Jest exited with unexpected code: 1 - Likely a Node.js incompatibility or uncaught reporter error.
Using `jest-spin-reporter` v2.0.0 or higher with an older, unsupported Node.js version, or an unhandled error within the reporter itself.
fix
Upgrade your Node.js runtime to a modern version. If the issue persists, try downgrading `jest-spin-reporter` to a 1.x version, or temporarily remove it from your Jest config to isolate the problem.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
jest-spin-reporter — npm install jest-spin-reporter · libregistry