{"id":14990557,"url":"https://github.com/justinsisley/jest-css-modules","last_synced_at":"2025-04-06T11:10:30.735Z","repository":{"id":44151241,"uuid":"43989246","full_name":"justinsisley/Jest-CSS-Modules","owner":"justinsisley","description":"A Jest script processor that prevents CSS module parse errors.","archived":false,"fork":false,"pushed_at":"2023-01-03T18:52:11.000Z","size":345,"stargazers_count":75,"open_issues_count":15,"forks_count":16,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T10:08:00.154Z","etag":null,"topics":["css-modules","jest","testing","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/jest-css-modules","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinsisley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-10T02:03:27.000Z","updated_at":"2022-01-07T17:22:05.000Z","dependencies_parsed_at":"2023-02-01T09:00:40.206Z","dependency_job_id":null,"html_url":"https://github.com/justinsisley/Jest-CSS-Modules","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinsisley%2FJest-CSS-Modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinsisley%2FJest-CSS-Modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinsisley%2FJest-CSS-Modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinsisley%2FJest-CSS-Modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinsisley","download_url":"https://codeload.github.com/justinsisley/Jest-CSS-Modules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471521,"owners_count":20944158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css-modules","jest","testing","webpack"],"created_at":"2024-09-24T14:20:22.409Z","updated_at":"2025-04-06T11:10:30.706Z","avatar_url":"https://github.com/justinsisley.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e Note: As of v2.0.0, this library is simply implementing [identity-obj-proxy](https://github.com/keyz/identity-obj-proxy).\n\u003e The [Jest documentation](https://jestjs.io/docs/en/webpack.html#mocking-css-modules) provides more details on using identity-obj-proxy to solve this problem directly, and I recommend that you use that library instead of this one.\n\n# Jest CSS Modules\nA [Jest](https://facebook.github.io/jest/) [script processor](https://facebook.github.io/jest/docs/en/configuration.html#transform-object-string-string) that prevents [CSS module](https://github.com/css-modules/css-modules) parse errors.\n\n## Installation\n\n```shell\nnpm install -D jest-css-modules\n```\n\nUpdate your package.json file's `jest` configuration:\n\n```json\n{\n  \"jest\": {\n    \"moduleNameMapper\": {\n      \"\\\\.(css|less|scss|sss|styl)$\": \"\u003crootDir\u003e/node_modules/jest-css-modules\"\n    }\n  }\n}\n```\n\nNow, imports such as `import styles from './MyModule.css';` will pass through Jest without causing any pain.\n\nSupports `.css`, `.less`, `.scss`, `.sss`, and `.styl` extensions.\n\n\u003e Note: If you continue to experience CSS module parsing errors after installing and configuring this library, try running jest with the `--no-cache` flag. Read the [Jest documentation on caching](https://jestjs.io/docs/en/cli#cache) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinsisley%2Fjest-css-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinsisley%2Fjest-css-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinsisley%2Fjest-css-modules/lists"}