Jest Spin Reporter

2.0.0 · maintenance · verified Sun Apr 19

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.

Common errors

Warnings

Install

Imports

Quickstart

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');
  });
});

view raw JSON →