{"id":27073,"library":"jest-runner-rollup","title":"jest-runner-rollup","description":"Jest runner for Rollup, designed to integrate Rollup bundling into Jest test runs. Currently at version 1.3.9 (last released in 2020), it works with Rollup ^1.29.1 and Node >=10.13. It plays well in monorepo scenarios, using Jest's runner API to bundle test files with Rollup before execution. Key differentiators: seamless monorepo support, simple configuration, and leverages Rollup's tree-shaking for faster test runs. However, it is no longer actively maintained and may not work with modern Rollup versions (v2+).","status":"maintenance","version":"1.3.9","language":"javascript","source_language":"en","source_url":"https://github.com/tunnckoCore/opensource","tags":["javascript","build","bundle","bundling","developer-experience","development","dx","hela","jest"],"install":[{"cmd":"npm install jest-runner-rollup","lang":"bash","label":"npm"},{"cmd":"yarn add jest-runner-rollup","lang":"bash","label":"yarn"},{"cmd":"pnpm add jest-runner-rollup","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required to bundle test files; must be version ^1.29.1","package":"rollup","optional":true}],"imports":[{"note":"Default export is the runner function used in Jest config under 'runner' field. No named exports.","symbol":"default","correct":"import jestRunnerRollup from 'jest-runner-rollup'"},{"note":"createRunner is a named export if package exposes it; but docs show only default. Verify package exports.","wrong":"import createRunner from 'jest-runner-rollup'","symbol":"createRunner","correct":"import { createRunner } from 'jest-runner-rollup'"},{"note":"CommonJS require returns the default export; there is no named Runner export. Use default import for ESM.","wrong":"import { Runner } from 'jest-runner-rollup'","symbol":"Runner","correct":"const Runner = require('jest-runner-rollup')"}],"quickstart":{"code":"// jest.config.js\nmodule.exports = {\n  runner: 'jest-runner-rollup',\n  testEnvironment: 'node',\n  testMatch: ['**/__tests__/**/*.test.js'],\n  // Optional Rollup config passed to runner:\n  // rollupConfig: {\n  //   input: 'src/index.js',\n  //   plugins: [/* your rollup plugins */]\n  // }\n};","lang":"javascript","description":"Configures Jest to use jest-runner-rollup as the default test runner, enabling Rollup bundling for each test file."},"warnings":[{"fix":"Consider alternatives like @rollup/jest-transform or rollup-jest.","message":"jest-runner-rollup is no longer actively maintained; last release in 2020. May have compatibility issues with modern Rollup v2+ and Jest versions >=27.","severity":"deprecated","affected_versions":"all"},{"fix":"Pin Rollup to version ^1.29.1 or use a different Jest runner that supports Rollup v2+.","message":"Requires Rollup ^1.29.1 as a peer dependency. Using with Rollup v2+ may cause unexpected errors due to API changes.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set `runner: 'jest-runner-rollup'` in Jest config (string) rather than trying to import and instantiate.","message":"The package exposes a default export (a function), not a class. Using `new Runner()` will fail.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install rollup@^1.29.1: npm install rollup@1.29.1 --save-dev","cause":"Missing peer dependency rollup (required version ^1.29.1).","error":"Cannot find module 'rollup'"},{"fix":"Set `runner: 'jest-runner-rollup'` in Jest config instead of using `runner: require('jest-runner-rollup')`.","cause":"Attempted to use `new require('jest-runner-rollup')()` but the package exports a function, not a class.","error":"TypeError: runner is not a constructor"},{"fix":"Use a string like 'jest-runner-rollup' or a valid runner class/function.","cause":"Passed an object or other invalid type as runner value.","error":"Jest: 'runner' option must be a string, a class, or a function."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}