{"id":19418012,"url":"https://github.com/americanexpress/amex-jest-preset-react","last_synced_at":"2025-04-24T13:34:18.352Z","repository":{"id":21935996,"uuid":"93082059","full_name":"americanexpress/amex-jest-preset-react","owner":"americanexpress","description":"✨ An opinionated Jest preset for React modules","archived":false,"fork":false,"pushed_at":"2025-04-23T15:30:20.000Z","size":2383,"stargazers_count":14,"open_issues_count":1,"forks_count":5,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-23T16:45:56.189Z","etag":null,"topics":["jest","one-app","react","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/americanexpress.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-01T17:22:16.000Z","updated_at":"2025-04-23T15:29:17.000Z","dependencies_parsed_at":"2023-01-14T13:13:34.585Z","dependency_job_id":"29ba4feb-8413-40a1-a5a7-4a9daf549e88","html_url":"https://github.com/americanexpress/amex-jest-preset-react","commit_stats":{"total_commits":91,"total_committers":20,"mean_commits":4.55,"dds":0.7252747252747253,"last_synced_commit":"95dd20c59a6dd90b40252eb8aa415802b0dba9ed"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Famex-jest-preset-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Famex-jest-preset-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Famex-jest-preset-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Famex-jest-preset-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/americanexpress","download_url":"https://codeload.github.com/americanexpress/amex-jest-preset-react/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250475398,"owners_count":21436728,"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":["jest","one-app","react","testing"],"created_at":"2024-11-10T13:12:25.167Z","updated_at":"2025-04-24T13:34:17.944Z","avatar_url":"https://github.com/americanexpress.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src='https://github.com/americanexpress/amex-jest-preset-react/raw/main/amex-jest-preset-react.png' alt=\"amex-jest-preset-react - One Amex\" width='50%'/\u003e\n\u003c/h1\u003e\n\n\u003e An opinionated [Jest preset](http://facebook.github.io/jest/docs/en/configuration.html#preset-string) for React modules. For non-React projects use [amex-jest-preset](https://github.com/americanexpress/amex-jest-preset)\n\n## 👩‍💻 Hiring 👨‍💻\n\n\u003e Want to get paid for your contributions to `amex-jest-preset-react`?\n\u003e Send your resume to oneamex.careers@aexp.com\n\n## 📖 Table of Contents\n\n* [Features](#-features)\n* [Usage](#-usage)\n* [API](#%EF%B8%8F-api)\n* [License](#%EF%B8%8F-license)\n* [Code Of Conduct](#%EF%B8%8F-code-of-conduct)\n* [Contributing](#-contributing)\n\n\n## ✨ Features\n\n* Base for Jest's configuration for React modules\n\n## 🤹‍ Usage\n\n1. Install:\n\n    ```bash\n    npm install --save-dev amex-jest-preset-react\n    ```\n\n2. And in your [Jest configuration][]:\n\n    ```json\n    {\n      \"preset\": \"amex-jest-preset-react\"\n    }\n   ```\n\nAnd... that's it! You now have all the boilerplate Jest configurations set up for you! Running `jest` from your `npm test` script will use all these configurations!\n\n## 🎛️ API\n\n### Extending the preset provided configuration\n\nYou can add on and/or override any values provided in this preset as you wish in your [Jest configuration][].\n\nIt should be noted that if overriding the `setupFilesAfterEnv` option you may want to extend off of the [setup file provided by amex-jest-preset-react](./jest-setup.js) in order to preserve that files' content. Otherwise you will lose anything we provide for you in [there](./jest-setup.js). Do so as follows:\n\n```javascript\n// in custom-jest-setup.js\nrequire('amex-jest-preset-react/jest-setup');\n\n// your own custom setup\n```\n\n### Configurations\n\nExtends [amex-jest-preset](https://github.com/americanexpress/amex-jest-preset) and adds the following configurations that are specific to testing React modules:\n\n- [testEnvironment](https://jestjs.io/docs/en/configuration.html#testenvironment-string) tells Jest to use `jsdom` test environment as it is often used while testing React components ([amex-jest-preset](https://github.com/americanexpress/amex-jest-preset) sets `testEnvironment` to `node`)\n\n- [moduleNameMapper](http://facebook.github.io/jest/docs/en/configuration.html#modulenamemapper-object-string-string) tells Jest to treat CSS modules as identity objects\n\n### Compatibility\n\nThis package is compatible only with React 17+.\n\n## 🗝️ License\n\nAny contributions made under this project will be governed by the [Apache License\n2.0](./LICENSE.txt).\n\n## 🗣️ Code of Conduct\n\nThis project adheres to the [American Express Community Guidelines](./CODE_OF_CONDUCT.md).\nBy participating, you are expected to honor these guidelines.\n\n[Jest configuration]: http://facebook.github.io/jest/docs/en/configuration.html\n\n## 🏆 Contributing\n\nWe welcome Your interest in the American Express Open Source Community on Github.\nAny Contributor to any Open Source Project managed by the American Express Open\nSource Community must accept and sign an Agreement indicating agreement to the\nterms below. Except for the rights granted in this Agreement to American Express\nand to recipients of software distributed by American Express, You reserve all\nright, title, and interest, if any, in and to Your Contributions. Please [fill\nout the Agreement](https://cla-assistant.io/americanexpress/).\n\nPlease feel free to open pull requests and see [CONTRIBUTING.md](./CONTRIBUTING.md) to learn how to get started contributing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famericanexpress%2Famex-jest-preset-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famericanexpress%2Famex-jest-preset-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famericanexpress%2Famex-jest-preset-react/lists"}