From 21ca18fed5f61972210736bc98c4b6b9ac59fce3 Mon Sep 17 00:00:00 2001 From: Victor Martins Date: Mon, 12 Nov 2018 20:33:31 -0200 Subject: [PATCH 1/3] docs: custom render with create-react-app Added an explanation on how to configure the custom render section on top of Create React App. --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 0333068f..de989d15 100644 --- a/README.md +++ b/README.md @@ -283,6 +283,27 @@ module.exports = { ], // ... other options ... } +``` + +If your project is based on top of Create React App, to make the file accessible without using relative imports, you just need to create a ```.env``` file in the root of your project with the following configuration: + +``` +// Create React App project structure + +$ app +. +├── .env +├── src +│ ├── utils +│ │ └── test-utils.js +│ +``` + +``` +// .env + +// example if your utils folder is inside the /src directory. +NODE_PATH=src/utils ``` There is the case when you want to wrap your components in a `Provider`, this From bd75ce660c134d31a2a6466f69bc820f8cf67670 Mon Sep 17 00:00:00 2001 From: Victor Martins Date: Mon, 12 Nov 2018 21:46:08 -0200 Subject: [PATCH 2/3] Added vctormb as contributor --- .all-contributorsrc | 9 +++++++++ README.md | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 0e26afed..e11f50c3 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -586,6 +586,15 @@ "contributions": [ "doc" ] + }, + { + "login": "vctormb", + "name": "Victor Martins", + "avatar_url": "https://avatars2.githubusercontent.com/u/13953703?v=4", + "profile": "https://github.com/vctormb", + "contributions": [ + "doc" + ] } ] } diff --git a/README.md b/README.md index de989d15..5709891b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ [![version][version-badge]][package] [![downloads][downloads-badge]][npmtrends] [![MIT License][license-badge]][license] -[![All Contributors](https://img.shields.io/badge/all_contributors-60-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-61-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] [![Join the community on Spectrum][spectrum-badge]][spectrum] @@ -1358,8 +1358,7 @@ Thanks goes to these people ([emoji key][emojis]): | [
Mark Pollmann](https://markpollmann.com/)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=MarkPollmann "Documentation") | [
Ehtesham Kafeel](https://github.com/ehteshamkafeel)
[💻](https://github.com/kentcdodds/react-testing-library/commits?author=ehteshamkafeel "Code") [📖](https://github.com/kentcdodds/react-testing-library/commits?author=ehteshamkafeel "Documentation") | [
Julio Pavón](http://jpavon.com)
[💻](https://github.com/kentcdodds/react-testing-library/commits?author=jpavon "Code") | [
Duncan L](http://www.duncanleung.com/)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=duncanleung "Documentation") [💡](#example-duncanleung "Examples") | [
Tiago Almeida](https://www.linkedin.com/in/tyagow/?locale=en_US)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=tyagow "Documentation") | [
Robert Smith](http://rbrtsmith.com/)
[🐛](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Arbrtsmith "Bug reports") | [
Zach Green](https://offbyone.tech)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=zgreen "Documentation") | | [
dadamssg](https://github.com/dadamssg)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=dadamssg "Documentation") | [
Yazan Aabed](https://www.yaabed.com/)
[📝](#blog-YazanAabeed "Blogposts") | [
Tim](https://github.com/timbonicus)
[🐛](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Atimbonicus "Bug reports") [💻](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Code") [📖](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Documentation") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Tests") | [
Divyanshu Maithani](http://divyanshu.xyz)
[✅](#tutorial-divyanshu013 "Tutorials") [📹](#video-divyanshu013 "Videos") | [
Deepak Grover](https://www.linkedin.com/in/metagrover)
[✅](#tutorial-metagrover "Tutorials") [📹](#video-metagrover "Videos") | [
Eyal Cohen](https://github.com/eyalcohen4)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=eyalcohen4 "Documentation") | [
Peter Makowski](https://github.com/petermakowski)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=petermakowski "Documentation") | | [
Michiel Nuyts](https://github.com/Michielnuyts)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=Michielnuyts "Documentation") | [
Joe Ng'ethe](https://github.com/joeynimu)
[💻](https://github.com/kentcdodds/react-testing-library/commits?author=joeynimu "Code") [📖](https://github.com/kentcdodds/react-testing-library/commits?author=joeynimu "Documentation") | [
Kate](https://github.com/Enikol)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=Enikol "Documentation") | [
Sean](http://www.seanrparker.com)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=SeanRParker "Documentation") | [
James Long](http://jlongster.com)
[🤔](#ideas-jlongster "Ideas, Planning, & Feedback") [📦](#platform-jlongster "Packaging/porting to new platform") | [
Herb Hagely](https://github.com/hhagely)
[💡](#example-hhagely "Examples") | [
Alex Wendte](http://www.wendtedesigns.com/)
[💡](#example-themostcolm "Examples") | -| [
Monica Powell](http://www.aboutmonica.com)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=M0nica "Documentation") | [
Vitaly Sivkov](http://sivkoff.com)
[💻](https://github.com/kentcdodds/react-testing-library/commits?author=sivkoff "Code") | [
Weyert de Boer](https://github.com/weyert)
[🤔](#ideas-weyert "Ideas, Planning, & Feedback") [👀](#review-weyert "Reviewed Pull Requests") | [
EstebanMarin](https://github.com/EstebanMarin)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=EstebanMarin "Documentation") | - +| [
Monica Powell](http://www.aboutmonica.com)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=M0nica "Documentation") | [
Vitaly Sivkov](http://sivkoff.com)
[💻](https://github.com/kentcdodds/react-testing-library/commits?author=sivkoff "Code") | [
Weyert de Boer](https://github.com/weyert)
[🤔](#ideas-weyert "Ideas, Planning, & Feedback") [👀](#review-weyert "Reviewed Pull Requests") | [
EstebanMarin](https://github.com/EstebanMarin)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=EstebanMarin "Documentation") | [
Victor Martins](https://github.com/vctormb)
[📖](https://github.com/kentcdodds/react-testing-library/commits?author=vctormb "Documentation") | This project follows the [all-contributors][all-contributors] specification. From 322c53e5c8aa5d21b568929c67f57e0e6c2626a9 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Mon, 12 Nov 2018 20:40:23 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5709891b..28d25fa6 100644 --- a/README.md +++ b/README.md @@ -285,7 +285,7 @@ module.exports = { } ``` -If your project is based on top of Create React App, to make the file accessible without using relative imports, you just need to create a ```.env``` file in the root of your project with the following configuration: +If your project is based on top of Create React App, to make the file accessible without using relative imports, you just need to create a `.env` file in the root of your project with the following configuration: ``` // Create React App project structure