{"library":"rollup-jest","title":"rollup-jest","description":"Rollup preprocessor for Jest that transforms files using Rollup. Current version 3.1.0, actively maintained. Allows using Rollup plugins and configuration in Jest tests, supporting ES modules. Key differentiator: integrates Rollup's bundling and plugin ecosystem into Jest's transform pipeline, enabling features like plugin injection, caching, and custom resolve behavior. Peer dependency on Rollup ^2.3.0 || ^3. Provides preset for zero-config setup. Suitable for projects already using Rollup who want to reuse rollup config in tests.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-jest"],"cli":null},"imports":["// In jest.config.json: \"preset\": \"rollup-jest\"","// In jest.config.json: \"transform\": { \"\\\\.m?js$\": \"rollup-jest\" }","// In jest.config.json: \"transform\": { \"\\\\.js$\": [\"rollup-jest\", {\"configFile\": \"./rollup.config.js\"}] }"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm install rollup-jest rollup --save-dev\n# jest.config.json\n{\n  \"jest\": {\n    \"preset\": \"rollup-jest\"\n  }\n}\n# __tests__/example.test.js\nimport path from 'path';\ntest('parses extname', () => {\n  expect(path.extname('foo.md')).toBe('.md');\n});","lang":"javascript","description":"Install, configure preset, and write ES module test with default import.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}