main f32bd1b033d5 cached
64 files
245.5 KB
67.9k tokens
99 symbols
1 requests
Download .txt
Showing preview only (261K chars total). Download the full file or copy to clipboard to get everything.
Repository: testing-library/react-testing-library
Branch: main
Commit: f32bd1b033d5
Files: 64
Total size: 245.5 KB

Directory structure:
gitextract_9zkgrm11/

├── .all-contributorsrc
├── .bundle.main.env
├── .bundle.pure.env
├── .codesandbox/
│   └── ci.json
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── Bug_Report.md
│   │   ├── Feature_Request.md
│   │   └── Question.md
│   ├── ISSUE_TEMPLATE.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       ├── release.yml
│       └── validate.yml
├── .gitignore
├── .huskyrc.js
├── .npmrc
├── .prettierignore
├── .prettierrc.js
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── codecov.yml
├── dont-cleanup-after-each.js
├── jest.config.js
├── other/
│   ├── MAINTAINING.md
│   ├── USERS.md
│   ├── design files/
│   │   ├── README.txt
│   │   └── cheat-sheet.afpub
│   └── manual-releases.md
├── package.json
├── pure.d.ts
├── pure.js
├── src/
│   ├── __mocks__/
│   │   └── axios.js
│   ├── __tests__/
│   │   ├── __snapshots__/
│   │   │   └── render.js.snap
│   │   ├── act.js
│   │   ├── auto-cleanup-skip.js
│   │   ├── auto-cleanup.js
│   │   ├── cleanup.js
│   │   ├── config.js
│   │   ├── debug.js
│   │   ├── end-to-end.js
│   │   ├── error-handlers.js
│   │   ├── events.js
│   │   ├── multi-base.js
│   │   ├── new-act.js
│   │   ├── render.js
│   │   ├── renderHook.js
│   │   ├── rerender.js
│   │   └── stopwatch.js
│   ├── act-compat.js
│   ├── config.js
│   ├── fire-event.js
│   ├── index.js
│   └── pure.js
├── tests/
│   ├── failOnUnexpectedConsoleCalls.js
│   ├── setup-env.js
│   ├── shouldIgnoreConsoleError.js
│   └── toWarnDev.js
├── tsconfig.json
└── types/
    ├── index.d.ts
    ├── pure.d.ts
    ├── test.tsx
    └── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .all-contributorsrc
================================================
{
  "projectName": "react-testing-library",
  "projectOwner": "testing-library",
  "repoType": "github",
  "files": [
    "README.md"
  ],
  "imageSize": 100,
  "commit": false,
  "skipCi": false,
  "contributors": [
    {
      "login": "kentcdodds",
      "name": "Kent C. Dodds",
      "avatar_url": "https://avatars.githubusercontent.com/u/1500684?v=3",
      "profile": "https://kentcdodds.com",
      "contributions": [
        "code",
        "doc",
        "infra",
        "test"
      ]
    },
    {
      "login": "audiolion",
      "name": "Ryan Castner",
      "avatar_url": "https://avatars1.githubusercontent.com/u/2430381?v=4",
      "profile": "http://audiolion.github.io",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "dnlsandiego",
      "name": "Daniel Sandiego",
      "avatar_url": "https://avatars0.githubusercontent.com/u/8008023?v=4",
      "profile": "https://www.dnlsandiego.com",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "Miklet",
      "name": "Paweł Mikołajczyk",
      "avatar_url": "https://avatars2.githubusercontent.com/u/12592677?v=4",
      "profile": "https://github.com/Miklet",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "alejandronanez",
      "name": "Alejandro Ñáñez Ortiz",
      "avatar_url": "https://avatars3.githubusercontent.com/u/464978?v=4",
      "profile": "http://co.linkedin.com/in/alejandronanez/",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "pbomb",
      "name": "Matt Parrish",
      "avatar_url": "https://avatars0.githubusercontent.com/u/1402095?v=4",
      "profile": "https://github.com/pbomb",
      "contributions": [
        "bug",
        "code",
        "doc",
        "test"
      ]
    },
    {
      "login": "wKovacs64",
      "name": "Justin Hall",
      "avatar_url": "https://avatars1.githubusercontent.com/u/1288694?v=4",
      "profile": "https://github.com/wKovacs64",
      "contributions": [
        "platform"
      ]
    },
    {
      "login": "antoaravinth",
      "name": "Anto Aravinth",
      "avatar_url": "https://avatars1.githubusercontent.com/u/1241511?s=460&v=4",
      "profile": "https://github.com/antoaravinth",
      "contributions": [
        "code",
        "test",
        "doc"
      ]
    },
    {
      "login": "JonahMoses",
      "name": "Jonah Moses",
      "avatar_url": "https://avatars2.githubusercontent.com/u/3462296?v=4",
      "profile": "https://github.com/JonahMoses",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "lgandecki",
      "name": "Łukasz Gandecki",
      "avatar_url": "https://avatars1.githubusercontent.com/u/4002543?v=4",
      "profile": "http://team.thebrain.pro",
      "contributions": [
        "code",
        "test",
        "doc"
      ]
    },
    {
      "login": "sompylasar",
      "name": "Ivan Babak",
      "avatar_url": "https://avatars2.githubusercontent.com/u/498274?v=4",
      "profile": "https://sompylasar.github.io",
      "contributions": [
        "bug",
        "ideas"
      ]
    },
    {
      "login": "jday3",
      "name": "Jesse Day",
      "avatar_url": "https://avatars3.githubusercontent.com/u/4439618?v=4",
      "profile": "https://github.com/jday3",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "gnapse",
      "name": "Ernesto García",
      "avatar_url": "https://avatars0.githubusercontent.com/u/15199?v=4",
      "profile": "http://gnapse.github.io",
      "contributions": [
        "question",
        "code",
        "doc"
      ]
    },
    {
      "login": "jomaxx",
      "name": "Josef Maxx Blake",
      "avatar_url": "https://avatars2.githubusercontent.com/u/2747424?v=4",
      "profile": "http://jomaxx.com",
      "contributions": [
        "code",
        "doc",
        "test"
      ]
    },
    {
      "login": "mbaranovski",
      "name": "Michal Baranowski",
      "avatar_url": "https://avatars1.githubusercontent.com/u/29602306?v=4",
      "profile": "https://twitter.com/baranovskim",
      "contributions": [
        "blog",
        "tutorial"
      ]
    },
    {
      "login": "aputhin",
      "name": "Arthur Puthin",
      "avatar_url": "https://avatars3.githubusercontent.com/u/13985684?v=4",
      "profile": "https://github.com/aputhin",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "thchia",
      "name": "Thomas Chia",
      "avatar_url": "https://avatars2.githubusercontent.com/u/21194045?v=4",
      "profile": "https://github.com/thchia",
      "contributions": [
        "code",
        "doc"
      ]
    },
    {
      "login": "thiagopaiva99",
      "name": "Thiago Galvani",
      "avatar_url": "https://avatars3.githubusercontent.com/u/20430611?v=4",
      "profile": "http://ilegra.com/",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "ChrisWcs",
      "name": "Christian",
      "avatar_url": "https://avatars1.githubusercontent.com/u/19828824?v=4",
      "profile": "http://Chriswcs.github.io",
      "contributions": [
        "test"
      ]
    },
    {
      "login": "alexkrolick",
      "name": "Alex Krolick",
      "avatar_url": "https://avatars3.githubusercontent.com/u/1571667?v=4",
      "profile": "https://alexkrolick.com",
      "contributions": [
        "question",
        "doc",
        "example",
        "ideas"
      ]
    },
    {
      "login": "johann-sonntagbauer",
      "name": "Johann Hubert Sonntagbauer",
      "avatar_url": "https://avatars3.githubusercontent.com/u/1239401?v=4",
      "profile": "https://github.com/johann-sonntagbauer",
      "contributions": [
        "code",
        "doc",
        "test"
      ]
    },
    {
      "login": "maddijoyce",
      "name": "Maddi Joyce",
      "avatar_url": "https://avatars2.githubusercontent.com/u/2224291?v=4",
      "profile": "http://www.maddijoyce.com",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "RyanAtViceSoftware",
      "name": "Ryan Vice",
      "avatar_url": "https://avatars2.githubusercontent.com/u/10080111?v=4",
      "profile": "http://www.vicesoftware.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "iwilsonq",
      "name": "Ian Wilson",
      "avatar_url": "https://avatars1.githubusercontent.com/u/7942604?v=4",
      "profile": "https://ianwilson.io",
      "contributions": [
        "blog",
        "tutorial"
      ]
    },
    {
      "login": "InExtremaRes",
      "name": "Daniel",
      "avatar_url": "https://avatars2.githubusercontent.com/u/1635491?v=4",
      "profile": "https://github.com/InExtremaRes",
      "contributions": [
        "bug",
        "code"
      ]
    },
    {
      "login": "Gpx",
      "name": "Giorgio Polvara",
      "avatar_url": "https://avatars0.githubusercontent.com/u/767959?v=4",
      "profile": "https://twitter.com/Gpx",
      "contributions": [
        "bug",
        "ideas"
      ]
    },
    {
      "login": "jgoz",
      "name": "John Gozde",
      "avatar_url": "https://avatars2.githubusercontent.com/u/132233?v=4",
      "profile": "https://github.com/jgoz",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "SavePointSam",
      "name": "Sam Horton",
      "avatar_url": "https://avatars0.githubusercontent.com/u/8203211?v=4",
      "profile": "https://twitter.com/SavePointSam",
      "contributions": [
        "doc",
        "example",
        "ideas"
      ]
    },
    {
      "login": "rkotze",
      "name": "Richard Kotze (mobile)",
      "avatar_url": "https://avatars2.githubusercontent.com/u/10452163?v=4",
      "profile": "http://www.richardkotze.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "sotobuild",
      "name": "Brahian E. Soto Mercedes",
      "avatar_url": "https://avatars2.githubusercontent.com/u/10819833?v=4",
      "profile": "https://github.com/sotobuild",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "bdelaforest",
      "name": "Benoit de La Forest",
      "avatar_url": "https://avatars2.githubusercontent.com/u/7151559?v=4",
      "profile": "https://github.com/bdelaforest",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "thesalah",
      "name": "Salah",
      "avatar_url": "https://avatars3.githubusercontent.com/u/6624197?v=4",
      "profile": "https://github.com/thesalah",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "icfantv",
      "name": "Adam Gordon",
      "avatar_url": "https://avatars2.githubusercontent.com/u/370054?v=4",
      "profile": "http://gordonizer.com",
      "contributions": [
        "bug",
        "code"
      ]
    },
    {
      "login": "silvenon",
      "name": "Matija Marohnić",
      "avatar_url": "https://avatars2.githubusercontent.com/u/471278?v=4",
      "profile": "https://silvenon.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "Dajust",
      "name": "Justice Mba",
      "avatar_url": "https://avatars3.githubusercontent.com/u/8015514?v=4",
      "profile": "https://github.com/Dajust",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "MarkPollmann",
      "name": "Mark Pollmann",
      "avatar_url": "https://avatars2.githubusercontent.com/u/5286559?v=4",
      "profile": "https://markpollmann.com/",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "ehteshamkafeel",
      "name": "Ehtesham Kafeel",
      "avatar_url": "https://avatars1.githubusercontent.com/u/1213123?v=4",
      "profile": "https://github.com/ehteshamkafeel",
      "contributions": [
        "code",
        "doc"
      ]
    },
    {
      "login": "jpavon",
      "name": "Julio Pavón",
      "avatar_url": "https://avatars2.githubusercontent.com/u/1493505?v=4",
      "profile": "http://jpavon.com",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "duncanleung",
      "name": "Duncan L",
      "avatar_url": "https://avatars3.githubusercontent.com/u/1765048?v=4",
      "profile": "http://www.duncanleung.com/",
      "contributions": [
        "doc",
        "example"
      ]
    },
    {
      "login": "tyagow",
      "name": "Tiago Almeida",
      "avatar_url": "https://avatars1.githubusercontent.com/u/700778?v=4",
      "profile": "https://www.linkedin.com/in/tyagow/?locale=en_US",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "rbrtsmith",
      "name": "Robert Smith",
      "avatar_url": "https://avatars2.githubusercontent.com/u/4982001?v=4",
      "profile": "http://rbrtsmith.com/",
      "contributions": [
        "bug"
      ]
    },
    {
      "login": "zgreen",
      "name": "Zach Green",
      "avatar_url": "https://avatars0.githubusercontent.com/u/1700355?v=4",
      "profile": "https://offbyone.tech",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "dadamssg",
      "name": "dadamssg",
      "avatar_url": "https://avatars3.githubusercontent.com/u/881986?v=4",
      "profile": "https://github.com/dadamssg",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "YazanAabeed",
      "name": "Yazan Aabed",
      "avatar_url": "https://avatars0.githubusercontent.com/u/8734097?v=4",
      "profile": "https://www.yaabed.com/",
      "contributions": [
        "blog"
      ]
    },
    {
      "login": "timbonicus",
      "name": "Tim",
      "avatar_url": "https://avatars0.githubusercontent.com/u/556258?v=4",
      "profile": "https://github.com/timbonicus",
      "contributions": [
        "bug",
        "code",
        "doc",
        "test"
      ]
    },
    {
      "login": "divyanshu013",
      "name": "Divyanshu Maithani",
      "avatar_url": "https://avatars3.githubusercontent.com/u/6682655?v=4",
      "profile": "http://divyanshu.xyz",
      "contributions": [
        "tutorial",
        "video"
      ]
    },
    {
      "login": "metagrover",
      "name": "Deepak Grover",
      "avatar_url": "https://avatars2.githubusercontent.com/u/9116042?v=4",
      "profile": "https://www.linkedin.com/in/metagrover",
      "contributions": [
        "tutorial",
        "video"
      ]
    },
    {
      "login": "eyalcohen4",
      "name": "Eyal Cohen",
      "avatar_url": "https://avatars0.githubusercontent.com/u/16276358?v=4",
      "profile": "https://github.com/eyalcohen4",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "petermakowski",
      "name": "Peter Makowski",
      "avatar_url": "https://avatars3.githubusercontent.com/u/7452681?v=4",
      "profile": "https://github.com/petermakowski",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "Michielnuyts",
      "name": "Michiel Nuyts",
      "avatar_url": "https://avatars2.githubusercontent.com/u/20361668?v=4",
      "profile": "https://github.com/Michielnuyts",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "joeynimu",
      "name": "Joe Ng'ethe",
      "avatar_url": "https://avatars0.githubusercontent.com/u/1195863?v=4",
      "profile": "https://github.com/joeynimu",
      "contributions": [
        "code",
        "doc"
      ]
    },
    {
      "login": "Enikol",
      "name": "Kate",
      "avatar_url": "https://avatars3.githubusercontent.com/u/19998290?v=4",
      "profile": "https://github.com/Enikol",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "SeanRParker",
      "name": "Sean",
      "avatar_url": "https://avatars1.githubusercontent.com/u/11980217?v=4",
      "profile": "http://www.seanrparker.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "jlongster",
      "name": "James Long",
      "avatar_url": "https://avatars2.githubusercontent.com/u/17031?v=4",
      "profile": "http://jlongster.com",
      "contributions": [
        "ideas",
        "platform"
      ]
    },
    {
      "login": "hhagely",
      "name": "Herb Hagely",
      "avatar_url": "https://avatars1.githubusercontent.com/u/10118777?v=4",
      "profile": "https://github.com/hhagely",
      "contributions": [
        "example"
      ]
    },
    {
      "login": "themostcolm",
      "name": "Alex Wendte",
      "avatar_url": "https://avatars2.githubusercontent.com/u/5779538?v=4",
      "profile": "http://www.wendtedesigns.com/",
      "contributions": [
        "example"
      ]
    },
    {
      "login": "M0nica",
      "name": "Monica Powell",
      "avatar_url": "https://avatars0.githubusercontent.com/u/6998954?v=4",
      "profile": "http://www.aboutmonica.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "sivkoff",
      "name": "Vitaly Sivkov",
      "avatar_url": "https://avatars1.githubusercontent.com/u/2699953?v=4",
      "profile": "http://sivkoff.com",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "weyert",
      "name": "Weyert de Boer",
      "avatar_url": "https://avatars3.githubusercontent.com/u/7049?v=4",
      "profile": "https://github.com/weyert",
      "contributions": [
        "ideas",
        "review",
        "design"
      ]
    },
    {
      "login": "EstebanMarin",
      "name": "EstebanMarin",
      "avatar_url": "https://avatars3.githubusercontent.com/u/13613037?v=4",
      "profile": "https://github.com/EstebanMarin",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "vctormb",
      "name": "Victor Martins",
      "avatar_url": "https://avatars2.githubusercontent.com/u/13953703?v=4",
      "profile": "https://github.com/vctormb",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "RoystonS",
      "name": "Royston Shufflebotham",
      "avatar_url": "https://avatars0.githubusercontent.com/u/19773?v=4",
      "profile": "https://github.com/RoystonS",
      "contributions": [
        "bug",
        "doc",
        "example"
      ]
    },
    {
      "login": "chrbala",
      "name": "chrbala",
      "avatar_url": "https://avatars0.githubusercontent.com/u/6834804?v=4",
      "profile": "https://github.com/chrbala",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "donavon",
      "name": "Donavon West",
      "avatar_url": "https://avatars3.githubusercontent.com/u/887639?v=4",
      "profile": "http://donavon.com",
      "contributions": [
        "code",
        "doc",
        "ideas",
        "test"
      ]
    },
    {
      "login": "maisano",
      "name": "Richard Maisano",
      "avatar_url": "https://avatars2.githubusercontent.com/u/689081?v=4",
      "profile": "https://github.com/maisano",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "marcobiedermann",
      "name": "Marco Biedermann",
      "avatar_url": "https://avatars0.githubusercontent.com/u/5244986?v=4",
      "profile": "https://www.marcobiedermann.com",
      "contributions": [
        "code",
        "maintenance",
        "test"
      ]
    },
    {
      "login": "alexzherdev",
      "name": "Alex Zherdev",
      "avatar_url": "https://avatars3.githubusercontent.com/u/93752?v=4",
      "profile": "https://github.com/alexzherdev",
      "contributions": [
        "bug",
        "code"
      ]
    },
    {
      "login": "Andrewmat",
      "name": "André Matulionis dos Santos",
      "avatar_url": "https://avatars0.githubusercontent.com/u/5133846?v=4",
      "profile": "https://twitter.com/Andrewmat",
      "contributions": [
        "code",
        "example",
        "test"
      ]
    },
    {
      "login": "FredyC",
      "name": "Daniel K.",
      "avatar_url": "https://avatars0.githubusercontent.com/u/1096340?v=4",
      "profile": "https://github.com/FredyC",
      "contributions": [
        "bug",
        "code",
        "ideas",
        "test",
        "review"
      ]
    },
    {
      "login": "mohamedmagdy17593",
      "name": "mohamedmagdy17593",
      "avatar_url": "https://avatars0.githubusercontent.com/u/40938625?v=4",
      "profile": "https://github.com/mohamedmagdy17593",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "lorensr",
      "name": "Loren ☺️",
      "avatar_url": "https://avatars2.githubusercontent.com/u/251288?v=4",
      "profile": "http://lorensr.me",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "MarkFalconbridge",
      "name": "MarkFalconbridge",
      "avatar_url": "https://avatars1.githubusercontent.com/u/20678943?v=4",
      "profile": "https://github.com/MarkFalconbridge",
      "contributions": [
        "bug",
        "code"
      ]
    },
    {
      "login": "viniciusavieira",
      "name": "Vinicius",
      "avatar_url": "https://avatars0.githubusercontent.com/u/2073019?v=4",
      "profile": "https://github.com/viniciusavieira",
      "contributions": [
        "doc",
        "example"
      ]
    },
    {
      "login": "pschyma",
      "name": "Peter Schyma",
      "avatar_url": "https://avatars2.githubusercontent.com/u/2489928?v=4",
      "profile": "https://github.com/pschyma",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "ianschmitz",
      "name": "Ian Schmitz",
      "avatar_url": "https://avatars1.githubusercontent.com/u/6355370?v=4",
      "profile": "https://github.com/ianschmitz",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "joual",
      "name": "Joel Marcotte",
      "avatar_url": "https://avatars0.githubusercontent.com/u/157877?v=4",
      "profile": "https://github.com/joual",
      "contributions": [
        "bug",
        "test",
        "code"
      ]
    },
    {
      "login": "aledustet",
      "name": "Alejandro Dustet",
      "avatar_url": "https://avatars3.githubusercontent.com/u/2413802?v=4",
      "profile": "http://aledustet.com",
      "contributions": [
        "bug"
      ]
    },
    {
      "login": "bcarroll22",
      "name": "Brandon Carroll",
      "avatar_url": "https://avatars2.githubusercontent.com/u/11020406?v=4",
      "profile": "https://github.com/bcarroll22",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "lucas0707",
      "name": "Lucas Machado",
      "avatar_url": "https://avatars1.githubusercontent.com/u/26284338?v=4",
      "profile": "https://github.com/lucas0707",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "pascalduez",
      "name": "Pascal Duez",
      "avatar_url": "https://avatars3.githubusercontent.com/u/335467?v=4",
      "profile": "http://pascalduez.me",
      "contributions": [
        "platform"
      ]
    },
    {
      "login": "NMinhNguyen",
      "name": "Minh Nguyen",
      "avatar_url": "https://avatars3.githubusercontent.com/u/2852660?v=4",
      "profile": "https://twitter.com/minh_ngvyen",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "LiaoJimmy",
      "name": "LiaoJimmy",
      "avatar_url": "https://avatars0.githubusercontent.com/u/11155585?v=4",
      "profile": "http://iababy46.blogspot.tw/",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "threepointone",
      "name": "Sunil Pai",
      "avatar_url": "https://avatars2.githubusercontent.com/u/18808?v=4",
      "profile": "https://github.com/threepointone",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "gaearon",
      "name": "Dan Abramov",
      "avatar_url": "https://avatars0.githubusercontent.com/u/810438?v=4",
      "profile": "http://twitter.com/dan_abramov",
      "contributions": [
        "review"
      ]
    },
    {
      "login": "ChristianMurphy",
      "name": "Christian Murphy",
      "avatar_url": "https://avatars3.githubusercontent.com/u/3107513?v=4",
      "profile": "https://github.com/ChristianMurphy",
      "contributions": [
        "infra"
      ]
    },
    {
      "login": "jeetiss",
      "name": "Ivakhnenko Dmitry",
      "avatar_url": "https://avatars1.githubusercontent.com/u/6726016?v=4",
      "profile": "https://jeetiss.github.io/",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "jamesgeorge007",
      "name": "James George",
      "avatar_url": "https://avatars2.githubusercontent.com/u/25279263?v=4",
      "profile": "https://ghuser.io/jamesgeorge007",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "JSFernandes",
      "name": "João Fernandes",
      "avatar_url": "https://avatars1.githubusercontent.com/u/1075053?v=4",
      "profile": "https://joaofernandes.me/",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "alejandroperea",
      "name": "Alejandro Perea",
      "avatar_url": "https://avatars3.githubusercontent.com/u/6084749?v=4",
      "profile": "https://github.com/alejandroperea",
      "contributions": [
        "review"
      ]
    },
    {
      "login": "nickmccurdy",
      "name": "Nick McCurdy",
      "avatar_url": "https://avatars0.githubusercontent.com/u/927220?v=4",
      "profile": "https://nickmccurdy.com/",
      "contributions": [
        "review",
        "question",
        "infra"
      ]
    },
    {
      "login": "eps1lon",
      "name": "Sebastian Silbermann",
      "avatar_url": "https://avatars3.githubusercontent.com/u/12292047?v=4",
      "profile": "https://twitter.com/sebsilbermann",
      "contributions": [
        "review"
      ]
    },
    {
      "login": "afontcu",
      "name": "Adrià Fontcuberta",
      "avatar_url": "https://avatars0.githubusercontent.com/u/9197791?v=4",
      "profile": "https://afontcu.dev",
      "contributions": [
        "review",
        "doc"
      ]
    },
    {
      "login": "johnnyreilly",
      "name": "John Reilly",
      "avatar_url": "https://avatars0.githubusercontent.com/u/1010525?v=4",
      "profile": "https://blog.johnnyreilly.com/",
      "contributions": [
        "review"
      ]
    },
    {
      "login": "MichaelDeBoey",
      "name": "Michaël De Boey",
      "avatar_url": "https://avatars3.githubusercontent.com/u/6643991?v=4",
      "profile": "https://michaeldeboey.be",
      "contributions": [
        "review",
        "code"
      ]
    },
    {
      "login": "cimbul",
      "name": "Tim Yates",
      "avatar_url": "https://avatars2.githubusercontent.com/u/927923?v=4",
      "profile": "https://cimbul.com",
      "contributions": [
        "review"
      ]
    },
    {
      "login": "eventualbuddha",
      "name": "Brian Donovan",
      "avatar_url": "https://avatars3.githubusercontent.com/u/1938?v=4",
      "profile": "https://github.com/eventualbuddha",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "JaysQubeXon",
      "name": "Noam Gabriel Jacobson",
      "avatar_url": "https://avatars1.githubusercontent.com/u/18309230?v=4",
      "profile": "https://github.com/JaysQubeXon",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "rvdkooy",
      "name": "Ronald van der Kooij",
      "avatar_url": "https://avatars1.githubusercontent.com/u/4119960?v=4",
      "profile": "https://github.com/rvdkooy",
      "contributions": [
        "test",
        "code"
      ]
    },
    {
      "login": "aayushrajvanshi",
      "name": "Aayush Rajvanshi",
      "avatar_url": "https://avatars0.githubusercontent.com/u/14968551?v=4",
      "profile": "https://github.com/aayushrajvanshi",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "ely-alamillo",
      "name": "Ely Alamillo",
      "avatar_url": "https://avatars2.githubusercontent.com/u/24350492?v=4",
      "profile": "https://elyalamillo.com",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "danieljcafonso",
      "name": "Daniel Afonso",
      "avatar_url": "https://avatars3.githubusercontent.com/u/35337607?v=4",
      "profile": "https://github.com/danieljcafonso",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "LaurensBosscher",
      "name": "Laurens Bosscher",
      "avatar_url": "https://avatars0.githubusercontent.com/u/13363196?v=4",
      "profile": "http://www.laurensbosscher.nl",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "sakito21",
      "name": "Sakito Mukai",
      "avatar_url": "https://avatars1.githubusercontent.com/u/15010907?v=4",
      "profile": "https://twitter.com/__sakito__",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "tteke",
      "name": "Türker Teke",
      "avatar_url": "https://avatars3.githubusercontent.com/u/12457162?v=4",
      "profile": "http://turkerteke.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "zbrogz",
      "name": "Zach Brogan",
      "avatar_url": "https://avatars1.githubusercontent.com/u/319162?v=4",
      "profile": "http://linkedin.com/in/zachbrogan",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "ryota-murakami",
      "name": "Ryota Murakami",
      "avatar_url": "https://avatars2.githubusercontent.com/u/5501268?v=4",
      "profile": "https://ryota-murakami.github.io/",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "hottmanmichael",
      "name": "Michael Hottman",
      "avatar_url": "https://avatars3.githubusercontent.com/u/10534502?v=4",
      "profile": "https://github.com/hottmanmichael",
      "contributions": [
        "ideas"
      ]
    },
    {
      "login": "stevenfitzpatrick",
      "name": "Steven Fitzpatrick",
      "avatar_url": "https://avatars0.githubusercontent.com/u/23268855?v=4",
      "profile": "https://github.com/stevenfitzpatrick",
      "contributions": [
        "bug"
      ]
    },
    {
      "login": "juangl",
      "name": "Juan Je García",
      "avatar_url": "https://avatars0.githubusercontent.com/u/1887029?v=4",
      "profile": "https://github.com/juangl",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "Ishaan28malik",
      "name": "Championrunner",
      "avatar_url": "https://avatars3.githubusercontent.com/u/27343592?v=4",
      "profile": "https://ghuser.io/Ishaan28malik",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "samtsai",
      "name": "Sam Tsai",
      "avatar_url": "https://avatars0.githubusercontent.com/u/225526?v=4",
      "profile": "https://github.com/samtsai",
      "contributions": [
        "code",
        "test",
        "doc"
      ]
    },
    {
      "login": "screendriver",
      "name": "Christian Rackerseder",
      "avatar_url": "https://avatars0.githubusercontent.com/u/149248?v=4",
      "profile": "https://www.echooff.dev",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "NiGhTTraX",
      "name": "Andrei Picus",
      "avatar_url": "https://avatars0.githubusercontent.com/u/485061?v=4",
      "profile": "https://github.com/NiGhTTraX",
      "contributions": [
        "bug",
        "review"
      ]
    },
    {
      "login": "kettanaito",
      "name": "Artem Zakharchenko",
      "avatar_url": "https://avatars3.githubusercontent.com/u/14984911?v=4",
      "profile": "https://redd.one",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "michael-siek",
      "name": "Michael",
      "avatar_url": "https://avatars0.githubusercontent.com/u/45568605?v=4",
      "profile": "http://michaelsiek.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "2dubbing",
      "name": "Braden Lee",
      "avatar_url": "https://avatars2.githubusercontent.com/u/15885679?v=4",
      "profile": "http://2dubbing.tistory.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "kamranayub",
      "name": "Kamran Ayub",
      "avatar_url": "https://avatars1.githubusercontent.com/u/563819?v=4",
      "profile": "http://kamranicus.com/",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "MatanBobi",
      "name": "Matan Borenkraout",
      "avatar_url": "https://avatars2.githubusercontent.com/u/12711091?v=4",
      "profile": "https://twitter.com/matanbobi",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "radar",
      "name": "Ryan Bigg",
      "avatar_url": "https://avatars3.githubusercontent.com/u/2687?v=4",
      "profile": "http://ryanbigg.com",
      "contributions": [
        "maintenance"
      ]
    },
    {
      "login": "antonhalim",
      "name": "Anton Halim",
      "avatar_url": "https://avatars1.githubusercontent.com/u/10498035?v=4",
      "profile": "https://antonhalim.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "artem-malko",
      "name": "Artem Malko",
      "avatar_url": "https://avatars0.githubusercontent.com/u/1823689?v=4",
      "profile": "http://artmalko.ru",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "ljosberinn",
      "name": "Gerrit Alex",
      "avatar_url": "https://avatars1.githubusercontent.com/u/29307652?v=4",
      "profile": "http://gerritalex.de",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "karthick3018",
      "name": "Karthick Raja",
      "avatar_url": "https://avatars1.githubusercontent.com/u/47154512?v=4",
      "profile": "https://github.com/karthick3018",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "theashraf",
      "name": "Abdelrahman Ashraf",
      "avatar_url": "https://avatars1.githubusercontent.com/u/39750790?v=4",
      "profile": "https://github.com/theashraf",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "lidoravitan",
      "name": "Lidor Avitan",
      "avatar_url": "https://avatars0.githubusercontent.com/u/35113398?v=4",
      "profile": "https://github.com/lidoravitan",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "ljharb",
      "name": "Jordan Harband",
      "avatar_url": "https://avatars1.githubusercontent.com/u/45469?v=4",
      "profile": "https://github.com/ljharb",
      "contributions": [
        "review",
        "ideas"
      ]
    },
    {
      "login": "marcosvega91",
      "name": "Marco Moretti",
      "avatar_url": "https://avatars2.githubusercontent.com/u/5365582?v=4",
      "profile": "https://github.com/marcosvega91",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "sanchit121",
      "name": "sanchit121",
      "avatar_url": "https://avatars2.githubusercontent.com/u/30828115?v=4",
      "profile": "https://github.com/sanchit121",
      "contributions": [
        "bug",
        "code"
      ]
    },
    {
      "login": "solufa",
      "name": "Solufa",
      "avatar_url": "https://avatars.githubusercontent.com/u/9402912?v=4",
      "profile": "https://github.com/solufa",
      "contributions": [
        "bug",
        "code"
      ]
    },
    {
      "login": "AriPerkkio",
      "name": "Ari Perkkiö",
      "avatar_url": "https://avatars.githubusercontent.com/u/14806298?v=4",
      "profile": "https://codepen.io/ariperkkio/",
      "contributions": [
        "test"
      ]
    },
    {
      "login": "jhnns",
      "name": "Johannes Ewald",
      "avatar_url": "https://avatars.githubusercontent.com/u/781746?v=4",
      "profile": "https://github.com/jhnns",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "anpaopao",
      "name": "Angus J. Pope",
      "avatar_url": "https://avatars.githubusercontent.com/u/44686792?v=4",
      "profile": "https://github.com/anpaopao",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "leschdom",
      "name": "Dominik Lesch",
      "avatar_url": "https://avatars.githubusercontent.com/u/62334278?v=4",
      "profile": "https://github.com/leschdom",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "ImADrafter",
      "name": "Marcos Gómez",
      "avatar_url": "https://avatars.githubusercontent.com/u/44379989?v=4",
      "profile": "https://github.com/ImADrafter",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "akashshyamdev",
      "name": "Akash Shyam",
      "avatar_url": "https://avatars.githubusercontent.com/u/56759828?v=4",
      "profile": "https://www.akashshyam.online/",
      "contributions": [
        "bug"
      ]
    },
    {
      "login": "fmeum",
      "name": "Fabian Meumertzheim",
      "avatar_url": "https://avatars.githubusercontent.com/u/4312191?v=4",
      "profile": "https://hen.ne.ke",
      "contributions": [
        "code",
        "bug"
      ]
    },
    {
      "login": "Nokel81",
      "name": "Sebastian Malton",
      "avatar_url": "https://avatars.githubusercontent.com/u/8225332?v=4",
      "profile": "https://github.com/Nokel81",
      "contributions": [
        "bug",
        "code"
      ]
    },
    {
      "login": "mboettcher",
      "name": "Martin Böttcher",
      "avatar_url": "https://avatars.githubusercontent.com/u/2325337?v=4",
      "profile": "https://github.com/mboettcher",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "TkDodo",
      "name": "Dominik Dorfmeister",
      "avatar_url": "https://avatars.githubusercontent.com/u/1021430?v=4",
      "profile": "http://tkdodo.eu",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "stephensauceda",
      "name": "Stephen Sauceda",
      "avatar_url": "https://avatars.githubusercontent.com/u/1017723?v=4",
      "profile": "https://stephensauceda.com",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "cmdcolin",
      "name": "Colin Diesh",
      "avatar_url": "https://avatars.githubusercontent.com/u/6511937?v=4",
      "profile": "http://cmdcolin.github.io",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "yinm",
      "name": "Yusuke Iinuma",
      "avatar_url": "https://avatars.githubusercontent.com/u/13295106?v=4",
      "profile": "http://yinm.info",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "trappar",
      "name": "Jeff Way",
      "avatar_url": "https://avatars.githubusercontent.com/u/525726?v=4",
      "profile": "https://github.com/trappar",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "bernardobelchior",
      "name": "Bernardo Belchior",
      "avatar_url": "https://avatars.githubusercontent.com/u/12778398?v=4",
      "profile": "http://belchior.me",
      "contributions": [
        "code",
        "doc"
      ]
    }
  ],
  "contributorsPerLine": 7,
  "repoHost": "https://github.com",
  "commitType": "docs",
  "commitConvention": "angular"
}


================================================
FILE: .bundle.main.env
================================================
BUILD_GLOBALS={"react-dom/test-utils":"ReactTestUtils","react":"React","react-dom":"ReactDOM"}



================================================
FILE: .bundle.pure.env
================================================
BUILD_FILENAME_SUFFIX=.pure
BUILD_INPUT=src/pure.js



================================================
FILE: .codesandbox/ci.json
================================================
{
  "installCommand": "install:csb",
  "sandboxes": ["new", "github/kentcdodds/react-testing-library-examples"],
  "node": "18"
}


================================================
FILE: .gitattributes
================================================
* text=auto eol=lf


================================================
FILE: .github/ISSUE_TEMPLATE/Bug_Report.md
================================================
---
name: 🐛 Bug Report
about: Bugs, missing documentation, or unexpected behavior 🤔.
---

<!--

* Please fill out this template with all the relevant information so we can
  understand what's going on and fix the issue. We appreciate bugs filed and PRs
  submitted!

* If your issue is regarding one of the query APIs (`getByText`,
  `getByLabelText`, etc), then please file it on the `dom-testing-library`
  repository instead. If you file it here it will be closed. Thanks :)

* Please make sure that you are familiar with and follow the Code of Conduct for
  this project (found in the CODE_OF_CONDUCT.md file).

We'll probably ask you to submit the fix (after giving some direction). If
you've never done that before, that's great! Check this free short video
tutorial to learn how: http://kcd.im/pull-request

-->

- `@testing-library/react` version:
- Testing Framework and version:
  <!-- are you using jest, mocha, puppeteer, ava? And what version? -->
- DOM Environment:
  <!-- If you're using jsdom (the default with jest), what version? Otherwise, what browser and version are you running tests in? -->

<!--
Keep in mind that if you're using a version of node we don't support that
could also be an issue. Check our package.json file "engines" config for the
supported version.

Also keep in mind that if you're using a version of react we don't support
that could be an issue. Check our package.json file "peerDependencies" config
for the supported version.
-->

### Relevant code or config:

```js
var your => (code) => here;
```

<!--
If this is an issue with documentation, please file an issue on the docs repo:
https://github.com/testing-library/testing-library-docs
-->

### What you did:

<!-- What you were doing -->

### What happened:

<!-- Please provide the full error message/screenshots/anything -->

### Reproduction:

<!--
If possible, please try to reproduce this issue in Stackblitz. You can fork the one
here: https://testing-library.com/new-rtl
-->

### Problem description:

<!-- Please describe why the current behavior is a problem -->

### Suggested solution:

<!--
It's ok if you don't have a suggested solution, but it really helps if you could
do a little digging to come up with some suggestion of how to improve things.
-->


================================================
FILE: .github/ISSUE_TEMPLATE/Feature_Request.md
================================================
---
name: 💡 Feature Request
about: I have a suggestion (and might want to implement myself 🙂)!
---

<!--

Vote on feature requests by adding a 👍. This helps maintainers prioritize what
to work on.

* Please fill out this template with all the relevant information so we can
  understand what's going on and fix the issue. We appreciate bugs filed and PRs
  submitted!

* If you're issue is regarding one of the query APIs (`getByText`
  `getByLabelText`, etc), then please file it on the `dom-testing-library`
  repository instead. If you file it here it will be closed. Thanks :)

* Please make sure that you are familiar with and follow the Code of Conduct for
  this project (found in the CODE_OF_CONDUCT.md file).

It'd be great if after the discussion you're the one who submits the PR that
implements this feature. If you've never done that before, that's great! Check
this free short video tutorial to learn how: http://kcd.im/pull-request

-->

### Describe the feature you'd like:

<!--
A clear and concise description of what you want to happen. Add any considered
drawbacks.
-->

### Suggested implementation:

<!-- Helpful but optional 😀 -->

### Describe alternatives you've considered:

<!--
A clear and concise description of any alternative solutions or features you've
considered.
-->

### Teachability, Documentation, Adoption, Migration Strategy:

<!--
If you can, explain how users will be able to use this and possibly write out a
version of the docs.
-->


================================================
FILE: .github/ISSUE_TEMPLATE/Question.md
================================================
---
name: ❓ Support Question
about: 🛑 If you have a question 💬, please check out our support channels!
---

-------------- 👆 Click "Preview"!

Issues on GitHub are intended to be related to problems with the library itself
and feature requests so we recommend not using this medium to ask them here 😁.

---

## ❓ Support Forums

For questions related to using the library, please visit a support community
instead of filing an issue on GitHub. You can follow the instructions in this
codesandbox to make a reproduction of your issue: https://kcd.im/rtl-help

- Discord https://discord.gg/testing-library
- Stack Overflow
  https://stackoverflow.com/questions/tagged/react-testing-library
- Documentation: https://github.com/testing-library/testing-library-docs

**ISSUES WHICH ARE QUESTIONS WILL BE CLOSED**


================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
<!--

HI! PLEASE STOP TO READ THIS!! IF YOU DO NOT FOLLOW THE INSTRUCTIONS, YOUR ISSUE
WILL LIKELY BE CLOSED.

Thanks for your interest in the project. We appreciate bugs filed and PRs submitted!

- Please make sure that you are familiar with and follow the Code of Conduct for
  this project (found in the CODE_OF_CONDUCT.md file).

- Please review the Issues policies before filing an issue:

  🐛 Bugs:
  File an issue for bugs, missing documentation, or unexpected behavior.

  💡 Feature Requests:
  File an issue to suggest new features.
  Vote on feature requests by adding a 👍. This helps maintainers prioritize
  what to work on.

  ❓ Questions:
  For questions related to using the library, please visit a support community
  instead of filing an issue on GitHub. You can follow the instructions in this
  codesandbox to make a reproduction of your issue: https://kcd.im/rtl-help
  * Discord
    https://discord.gg/testing-library
  * Stack Overflow
    https://stackoverflow.com/questions/tagged/react-testing-library

  **ISSUES WHICH ARE QUESTIONS WILL BE CLOSED**

- Please fill out this template with all the relevant information so we can
  understand what's going on and fix the issue.

- If you're issue is regarding one of the query APIs (`getByText`,
  `getByLabelText`, etc), then please file it on the `dom-testing-library`
  repository instead. If you file it here it will be closed. Thanks :)

We'll probably ask you to submit the fix (after giving some direction). If
you've never done that before, that's great! Check this free short video
tutorial to learn how: http://kcd.im/pull-request

-->

- `@testing-library/react` version:
- Testing Framework and version:
  <!-- are you using jest, mocha, puppeteer, ava? And what version? -->
- DOM Environment:
  <!-- If you're using jsdom (the default with jest), what version? Otherwise, what browser and version are you running tests in? -->

<!--
Keep in mind that if you're using a version of node we don't support that
could also be an issue. Check our package.json file "engines" config for the
supported version.

Also keep in mind that if you're using a version of react we don't support
that could be an issue. Check our package.json file "peerDependencies" config
for the supported version.
-->

Relevant code or config

```javascript

```

What you did:

What happened:

<!-- Please provide the full error message/screenshots/anything -->

Reproduction repository:

<!--
If possible, please create a repository that reproduces the issue with the
minimal amount of code possible. You may fork the template here:
https://github.com/testing-library/dom-testing-library-template

Or if you can, try to reproduce the issue in a codesandbox. You can fork the
one here: https://codesandbox.io/s/5z6x4r7n0p
-->

Problem description:

<!-- Please describe why the current behavior is a problem -->

Suggested solution:

<!--
It's ok if you don't have a suggested solution, but it really helps if you could
do a little digging to come up with some suggestion of how to improve things.
-->


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!

Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).

Also, please make sure you're familiar with and follow the instructions in the
contributing guidelines (found in the CONTRIBUTING.md file).

If you're new to contributing to open source projects, you might find this free
video course helpful: http://kcd.im/pull-request

Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed here?) -->

**What**:

<!-- Why are these changes necessary? -->

**Why**:

<!-- How were these changes implemented? -->

**How**:

<!-- Have you done all of these things?  -->

**Checklist**:

<!-- add "N/A" to the end of each line that's irrelevant to your changes -->

<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->

- [ ] Documentation added to the
      [docs site](https://github.com/testing-library/testing-library-docs)
- [ ] Tests
- [ ] TypeScript definitions updated
- [ ] Ready to be merged
      <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->

<!-- feel free to add additional comments -->


================================================
FILE: .github/workflows/release.yml
================================================
name: release
on:
  push:
    branches:
      # Match SemVer major release branches
      # e.g. "12.x" or "8.x"
      - '[0-9]+.x'
      - 'main'
      - 'next'
      - 'next-major'
      - 'beta'
      - 'alpha'
      - '!all-contributors/**'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions: {}

jobs:
  validate:
    permissions:
      contents: read #  to fetch code (actions/checkout)
    continue-on-error: ${{ matrix.react != 'latest' }}
    # ignore all-contributors PRs
    if: ${{ !contains(github.head_ref, 'all-contributors') }}
    strategy:
      fail-fast: false
      matrix:
        node: [18, 24]
        react: ['18.x', latest, canary, experimental]
    runs-on: ubuntu-latest
    steps:
      - name: ⬇️ Checkout repo
        uses: actions/checkout@v4

      - name: ⎔ Setup node
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}

      - name: 📥 Download deps
        uses: bahmutov/npm-install@v1
        with:
          useLockFile: false

      # TODO: Can be removed if https://github.com/kentcdodds/kcd-scripts/pull/146 is released
      - name: Verify format (`npm run format` committed?)
        run: npm run format -- --check --no-write

      # as requested by the React team :)
      # https://reactjs.org/blog/2019/10/22/react-release-channels.html#using-the-next-channel-for-integration-testing
      - name: ⚛️ Setup react
        run: npm install react@${{ matrix.react }} react-dom@${{ matrix.react }}

      - name: ⚛️ Setup react types
        if: ${{ matrix.react != 'canary' && matrix.react != 'experimental' }}
        run:
          npm install @types/react@${{ matrix.react }} @types/react-dom@${{
          matrix.react }}

      - name: ▶️ Run validate script
        run: npm run validate

      - name: ⬆️ Upload coverage report
        uses: codecov/codecov-action@v5
        with:
          fail_ci_if_error: true
          flags: ${{ matrix.react }}
          token: ${{ secrets.CODECOV_TOKEN }}

  release:
    permissions:
      id-token: write # to enable use of OIDC (npm trusted publishing and provenance)
      actions: write #  to cancel/stop running workflows (styfle/cancel-workflow-action)
      contents: write #  to create release tags (cycjimmy/semantic-release-action)
      issues: write # to post release that resolves an issue (cycjimmy/semantic-release-action)
      pull-requests: write # to be able to comment on released pull requests

    needs: validate
    runs-on: ubuntu-latest
    if:
      ${{ github.repository == 'testing-library/react-testing-library' &&
      github.event_name == 'push' }}
    steps:
      - name: ⬇️ Checkout repo
        uses: actions/checkout@v4

      - name: ⎔ Setup node
        uses: actions/setup-node@v4
        with:
          node-version: 24

      - name: 📥 Download deps
        uses: bahmutov/npm-install@v1
        with:
          useLockFile: false

      - name: 🏗 Run build script
        run: npm run build

      - name: 🚀 Release
        uses: cycjimmy/semantic-release-action@v5
        with:
          semantic_version: 25
          branches: |
            [
              '+([0-9])?(.{+([0-9]),x}).x',
              'main',
              'next',
              'next-major',
              {name: 'beta', prerelease: true},
              {name: 'alpha', prerelease: true}
            ]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/validate.yml
================================================
name: validate
on:
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  actions: write #  to cancel/stop running workflows (styfle/cancel-workflow-action)
  contents: read #  to fetch code (actions/checkout)

jobs:
  main:
    continue-on-error: ${{ matrix.react != 'latest' }}
    # ignore all-contributors PRs
    if: ${{ !contains(github.head_ref, 'all-contributors') }}
    strategy:
      fail-fast: false
      matrix:
        node: [18, 24]
        react: ['18.x', latest, canary, experimental]
    runs-on: ubuntu-latest
    steps:
      - name: ⬇️ Checkout repo
        uses: actions/checkout@v4

      - name: ⎔ Setup node
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}

      - name: 📥 Download deps
        uses: bahmutov/npm-install@v1
        with:
          useLockFile: false

      # TODO: Can be removed if https://github.com/kentcdodds/kcd-scripts/pull/146 is released
      - name: Verify format (`npm run format` committed?)
        run: npm run format -- --check --no-write

      # as requested by the React team :)
      # https://reactjs.org/blog/2019/10/22/react-release-channels.html#using-the-next-channel-for-integration-testing
      - name: ⚛️ Setup react
        run: npm install react@${{ matrix.react }} react-dom@${{ matrix.react }}

      - name: ⚛️ Setup react types
        if: ${{ matrix.react != 'canary' && matrix.react != 'experimental' }}
        run:
          npm install @types/react@${{ matrix.react }} @types/react-dom@${{
          matrix.react }}

      - name: ▶️ Run validate script
        run: npm run validate

      - name: ⬆️ Upload coverage report
        uses: codecov/codecov-action@v5
        with:
          fail_ci_if_error: true
          flags: ${{ matrix.react }}
          token: ${{ secrets.CODECOV_TOKEN }}


================================================
FILE: .gitignore
================================================
node_modules
coverage
dist
.DS_Store

# these cause more harm than good
# when working with contributors
package-lock.json
yarn.lock


================================================
FILE: .huskyrc.js
================================================
module.exports = require('kcd-scripts/husky')


================================================
FILE: .npmrc
================================================
registry=https://registry.npmjs.org/
package-lock=false


================================================
FILE: .prettierignore
================================================
node_modules
coverage
dist


================================================
FILE: .prettierrc.js
================================================
module.exports = require('kcd-scripts/prettier')


================================================
FILE: CHANGELOG.md
================================================
# CHANGELOG

The changelog is automatically updated using
[semantic-release](https://github.com/semantic-release/semantic-release). You
can see it on the [releases page](../../releases).


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
  community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of
  any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
  without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
me+coc@kentcdodds.com. All complaints will be reviewed and investigated promptly
and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

Thanks for being willing to contribute!

**Working on your first Pull Request?** You can learn how from this _free_
series [How to Contribute to an Open Source Project on GitHub][egghead]

## Project setup

1.  Fork and clone the repo
2.  Run `npm run setup -s` to install dependencies and run validation
3.  Create a branch for your PR with `git checkout -b pr/your-branch-name`

> Tip: Keep your `main` branch pointing at the original repository and make pull
> requests from branches on your fork. To do this, run:
>
> ```
> git remote add upstream https://github.com/testing-library/react-testing-library.git
> git fetch upstream
> git branch --set-upstream-to=upstream/main main
> ```
>
> This will add the original repository as a "remote" called "upstream," Then
> fetch the git information from that remote, then set your local `main` branch
> to use the upstream main branch whenever you run `git pull`. Then you can make
> all of your pull request branches based on this `main` branch. Whenever you
> want to update your version of `main`, do a regular `git pull`.

## Committing and Pushing changes

Please make sure to run the tests before you commit your changes. You can run
`npm run test:update` which will update any snapshots that need updating. Make
sure to include those changes (if they exist) in your commit.

### Update Typings

If your PR introduced some changes in the API, you are more than welcome to
modify the TypeScript type definition to reflect those changes. Just modify the
`/types/index.d.ts` file accordingly. If you have never seen TypeScript
definitions before, you can read more about it in its
[documentation pages](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html).
Though this library itself is not written in TypeScript we use
[dtslint](https://github.com/microsoft/dtslint) to lint our typings.

## Help needed

Please checkout the [the open issues][issues]

Also, please watch the repo and respond to questions/bug reports/feature
requests! Thanks!

[egghead]:
  https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github
[issues]: https://github.com/testing-library/react-testing-library/issues


================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2017-Present Kent C. Dodds

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
<div align="center">
<h1>React Testing Library</h1>

<a href="https://www.emojione.com/emoji/1f410">
  <img
    height="80"
    width="80"
    alt="goat"
    src="https://raw.githubusercontent.com/testing-library/react-testing-library/main/other/goat.png"
  />
</a>

<p>Simple and complete React DOM testing utilities that encourage good testing
practices.</p>

<br />

[**Read The Docs**](https://testing-library.com/react) |
[Edit the docs](https://github.com/testing-library/testing-library-docs)

<br />
</div>

<hr />

<!-- prettier-ignore-start -->
[![Build Status][build-badge]][build]
[![Code Coverage][coverage-badge]][coverage]
[![version][version-badge]][package]
[![downloads][downloads-badge]][npmtrends]
[![MIT License][license-badge]][license]
[![All Contributors][all-contributors-badge]](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Code of Conduct][coc-badge]][coc]
[![Discord][discord-badge]][discord]

[![Watch on GitHub][github-watch-badge]][github-watch]
[![Star on GitHub][github-star-badge]][github-star]
[![Tweet][twitter-badge]][twitter]
<!-- prettier-ignore-end -->

<div align="center">
  <a href="https://testingjavascript.com">
    <img
      width="500"
      alt="TestingJavaScript.com Learn the smart, efficient way to test any JavaScript application."
      src="https://raw.githubusercontent.com/testing-library/react-testing-library/main/other/testingjavascript.jpg"
    />
  </a>
</div>

## Table of Contents

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [The problem](#the-problem)
- [The solution](#the-solution)
- [Installation](#installation)
  - [Suppressing unnecessary warnings on React DOM 16.8](#suppressing-unnecessary-warnings-on-react-dom-168)
- [Examples](#examples)
  - [Basic Example](#basic-example)
  - [Complex Example](#complex-example)
  - [More Examples](#more-examples)
- [Hooks](#hooks)
- [Guiding Principles](#guiding-principles)
- [Docs](#docs)
- [Issues](#issues)
  - [🐛 Bugs](#-bugs)
  - [💡 Feature Requests](#-feature-requests)
  - [❓ Questions](#-questions)
- [Contributors](#contributors)
- [LICENSE](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## The problem

You want to write maintainable tests for your React components. As a part of
this goal, you want your tests to avoid including implementation details of your
components and rather focus on making your tests give you the confidence for
which they are intended. As part of this, you want your testbase to be
maintainable in the long run so refactors of your components (changes to
implementation but not functionality) don't break your tests and slow you and
your team down.

## The solution

The `React Testing Library` is a very lightweight solution for testing React
components. It provides light utility functions on top of `react-dom` and
`react-dom/test-utils`, in a way that encourages better testing practices. Its
primary guiding principle is:

> [The more your tests resemble the way your software is used, the more
> confidence they can give you.][guiding-principle]

## Installation

This module is distributed via [npm][npm] which is bundled with [node][node] and
should be installed as one of your project's `devDependencies`.  
Starting from RTL version 16, you'll also need to install
`@testing-library/dom`:

```
npm install --save-dev @testing-library/react @testing-library/dom
```

or

for installation via [yarn][yarn]

```
yarn add --dev @testing-library/react @testing-library/dom
```

This library has `peerDependencies` listings for `react`, `react-dom` and
starting from RTL version 16 also `@testing-library/dom`.

_React Testing Library versions 13+ require React v18. If your project uses an
older version of React, be sure to install version 12:_

```
npm install --save-dev @testing-library/react@12


yarn add --dev @testing-library/react@12
```

You may also be interested in installing `@testing-library/jest-dom` so you can
use [the custom jest matchers](https://github.com/testing-library/jest-dom).

> [**Docs**](https://testing-library.com/react)

### Suppressing unnecessary warnings on React DOM 16.8

There is a known compatibility issue with React DOM 16.8 where you will see the
following warning:

```
Warning: An update to ComponentName inside a test was not wrapped in act(...).
```

If you cannot upgrade to React DOM 16.9, you may suppress the warnings by adding
the following snippet to your test configuration
([learn more](https://github.com/testing-library/react-testing-library/issues/281)):

```js
// this is just a little hack to silence a warning that we'll get until we
// upgrade to 16.9. See also: https://github.com/facebook/react/pull/14853
const originalError = console.error
beforeAll(() => {
  console.error = (...args) => {
    if (/Warning.*not wrapped in act/.test(args[0])) {
      return
    }
    originalError.call(console, ...args)
  }
})

afterAll(() => {
  console.error = originalError
})
```

## Examples

### Basic Example

```jsx
// hidden-message.js
import * as React from 'react'

// NOTE: React Testing Library works well with React Hooks and classes.
// Your tests will be the same regardless of how you write your components.
function HiddenMessage({children}) {
  const [showMessage, setShowMessage] = React.useState(false)
  return (
    <div>
      <label htmlFor="toggle">Show Message</label>
      <input
        id="toggle"
        type="checkbox"
        onChange={e => setShowMessage(e.target.checked)}
        checked={showMessage}
      />
      {showMessage ? children : null}
    </div>
  )
}

export default HiddenMessage
```

```jsx
// __tests__/hidden-message.js
// these imports are something you'd normally configure Jest to import for you
// automatically. Learn more in the setup docs: https://testing-library.com/docs/react-testing-library/setup#cleanup
import '@testing-library/jest-dom'
// NOTE: jest-dom adds handy assertions to Jest and is recommended, but not required

import * as React from 'react'
import {render, fireEvent, screen} from '@testing-library/react'
import HiddenMessage from '../hidden-message'

test('shows the children when the checkbox is checked', () => {
  const testMessage = 'Test Message'
  render(<HiddenMessage>{testMessage}</HiddenMessage>)

  // query* functions will return the element or null if it cannot be found
  // get* functions will return the element or throw an error if it cannot be found
  expect(screen.queryByText(testMessage)).toBeNull()

  // the queries can accept a regex to make your selectors more resilient to content tweaks and changes.
  fireEvent.click(screen.getByLabelText(/show/i))

  // .toBeInTheDocument() is an assertion that comes from jest-dom
  // otherwise you could use .toBeDefined()
  expect(screen.getByText(testMessage)).toBeInTheDocument()
})
```

### Complex Example

```jsx
// login.js
import * as React from 'react'

function Login() {
  const [state, setState] = React.useReducer((s, a) => ({...s, ...a}), {
    resolved: false,
    loading: false,
    error: null,
  })

  function handleSubmit(event) {
    event.preventDefault()
    const {usernameInput, passwordInput} = event.target.elements

    setState({loading: true, resolved: false, error: null})

    window
      .fetch('/api/login', {
        method: 'POST',
        headers: {'Content-Type': 'application/json'},
        body: JSON.stringify({
          username: usernameInput.value,
          password: passwordInput.value,
        }),
      })
      .then(r => r.json().then(data => (r.ok ? data : Promise.reject(data))))
      .then(
        user => {
          setState({loading: false, resolved: true, error: null})
          window.localStorage.setItem('token', user.token)
        },
        error => {
          setState({loading: false, resolved: false, error: error.message})
        },
      )
  }

  return (
    <div>
      <form onSubmit={handleSubmit}>
        <div>
          <label htmlFor="usernameInput">Username</label>
          <input id="usernameInput" />
        </div>
        <div>
          <label htmlFor="passwordInput">Password</label>
          <input id="passwordInput" type="password" />
        </div>
        <button type="submit">Submit{state.loading ? '...' : null}</button>
      </form>
      {state.error ? <div role="alert">{state.error}</div> : null}
      {state.resolved ? (
        <div role="alert">Congrats! You're signed in!</div>
      ) : null}
    </div>
  )
}

export default Login
```

```jsx
// __tests__/login.js
// again, these first two imports are something you'd normally handle in
// your testing framework configuration rather than importing them in every file.
import '@testing-library/jest-dom'
import * as React from 'react'
// import API mocking utilities from Mock Service Worker.
import {rest} from 'msw'
import {setupServer} from 'msw/node'
// import testing utilities
import {render, fireEvent, screen} from '@testing-library/react'
import Login from '../login'

const fakeUserResponse = {token: 'fake_user_token'}
const server = setupServer(
  rest.post('/api/login', (req, res, ctx) => {
    return res(ctx.json(fakeUserResponse))
  }),
)

beforeAll(() => server.listen())
afterEach(() => {
  server.resetHandlers()
  window.localStorage.removeItem('token')
})
afterAll(() => server.close())

test('allows the user to login successfully', async () => {
  render(<Login />)

  // fill out the form
  fireEvent.change(screen.getByLabelText(/username/i), {
    target: {value: 'chuck'},
  })
  fireEvent.change(screen.getByLabelText(/password/i), {
    target: {value: 'norris'},
  })

  fireEvent.click(screen.getByText(/submit/i))

  // just like a manual tester, we'll instruct our test to wait for the alert
  // to show up before continuing with our assertions.
  const alert = await screen.findByRole('alert')

  // .toHaveTextContent() comes from jest-dom's assertions
  // otherwise you could use expect(alert.textContent).toMatch(/congrats/i)
  // but jest-dom will give you better error messages which is why it's recommended
  expect(alert).toHaveTextContent(/congrats/i)
  expect(window.localStorage.getItem('token')).toEqual(fakeUserResponse.token)
})

test('handles server exceptions', async () => {
  // mock the server error response for this test suite only.
  server.use(
    rest.post('/api/login', (req, res, ctx) => {
      return res(ctx.status(500), ctx.json({message: 'Internal server error'}))
    }),
  )

  render(<Login />)

  // fill out the form
  fireEvent.change(screen.getByLabelText(/username/i), {
    target: {value: 'chuck'},
  })
  fireEvent.change(screen.getByLabelText(/password/i), {
    target: {value: 'norris'},
  })

  fireEvent.click(screen.getByText(/submit/i))

  // wait for the error message
  const alert = await screen.findByRole('alert')

  expect(alert).toHaveTextContent(/internal server error/i)
  expect(window.localStorage.getItem('token')).toBeNull()
})
```

> We recommend using [Mock Service Worker](https://github.com/mswjs/msw) library
> to declaratively mock API communication in your tests instead of stubbing
> `window.fetch`, or relying on third-party adapters.

### More Examples

> We're in the process of moving examples to the
> [docs site](https://testing-library.com/docs/example-codesandbox)

You'll find runnable examples of testing with different libraries in
[the `react-testing-library-examples` codesandbox](https://codesandbox.io/s/github/kentcdodds/react-testing-library-examples).
Some included are:

- [`react-redux`](https://codesandbox.io/s/github/kentcdodds/react-testing-library-examples/tree/main/?fontsize=14&module=%2Fsrc%2F__tests__%2Freact-redux.js&previewwindow=tests)
- [`react-router`](https://codesandbox.io/s/github/kentcdodds/react-testing-library-examples/tree/main/?fontsize=14&module=%2Fsrc%2F__tests__%2Freact-router.js&previewwindow=tests)
- [`react-context`](https://codesandbox.io/s/github/kentcdodds/react-testing-library-examples/tree/main/?fontsize=14&module=%2Fsrc%2F__tests__%2Freact-context.js&previewwindow=tests)

## Hooks

If you are interested in testing a custom hook, check out [React Hooks Testing
Library][react-hooks-testing-library].

> NOTE: it is not recommended to test single-use custom hooks in isolation from
> the components where it's being used. It's better to test the component that's
> using the hook rather than the hook itself. The `React Hooks Testing Library`
> is intended to be used for reusable hooks/libraries.

## Guiding Principles

> [The more your tests resemble the way your software is used, the more
> confidence they can give you.][guiding-principle]

We try to only expose methods and utilities that encourage you to write tests
that closely resemble how your React components are used.

Utilities are included in this project based on the following guiding
principles:

1.  If it relates to rendering components, it deals with DOM nodes rather than
    component instances, nor should it encourage dealing with component
    instances.
2.  It should be generally useful for testing individual React components or
    full React applications. While this library is focused on `react-dom`,
    utilities could be included even if they don't directly relate to
    `react-dom`.
3.  Utility implementations and APIs should be simple and flexible.

Most importantly, we want React Testing Library to be pretty light-weight,
simple, and easy to understand.

## Docs

[**Read The Docs**](https://testing-library.com/react) |
[Edit the docs](https://github.com/testing-library/testing-library-docs)

## Issues

Looking to contribute? Look for the [Good First Issue][good-first-issue] label.

### 🐛 Bugs

Please file an issue for bugs, missing documentation, or unexpected behavior.

[**See Bugs**][bugs]

### 💡 Feature Requests

Please file an issue to suggest new features. Vote on feature requests by adding
a 👍. This helps maintainers prioritize what to work on.

[**See Feature Requests**][requests]

### ❓ Questions

For questions related to using the library, please visit a support community
instead of filing an issue on GitHub.

- [Discord][discord]
- [Stack Overflow][stackoverflow]

## Contributors

Thanks goes to these people ([emoji key][emojis]):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
  <tbody>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://kentcdodds.com"><img src="https://avatars.githubusercontent.com/u/1500684?v=3?s=100" width="100px;" alt="Kent C. Dodds"/><br /><sub><b>Kent C. Dodds</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=kentcdodds" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=kentcdodds" title="Documentation">📖</a> <a href="#infra-kentcdodds" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=kentcdodds" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://audiolion.github.io"><img src="https://avatars1.githubusercontent.com/u/2430381?v=4?s=100" width="100px;" alt="Ryan Castner"/><br /><sub><b>Ryan Castner</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=audiolion" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.dnlsandiego.com"><img src="https://avatars0.githubusercontent.com/u/8008023?v=4?s=100" width="100px;" alt="Daniel Sandiego"/><br /><sub><b>Daniel Sandiego</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=dnlsandiego" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/Miklet"><img src="https://avatars2.githubusercontent.com/u/12592677?v=4?s=100" width="100px;" alt="Paweł Mikołajczyk"/><br /><sub><b>Paweł Mikołajczyk</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=Miklet" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://co.linkedin.com/in/alejandronanez/"><img src="https://avatars3.githubusercontent.com/u/464978?v=4?s=100" width="100px;" alt="Alejandro Ñáñez Ortiz"/><br /><sub><b>Alejandro Ñáñez Ortiz</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=alejandronanez" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/pbomb"><img src="https://avatars0.githubusercontent.com/u/1402095?v=4?s=100" width="100px;" alt="Matt Parrish"/><br /><sub><b>Matt Parrish</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Apbomb" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=pbomb" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=pbomb" title="Documentation">📖</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=pbomb" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/wKovacs64"><img src="https://avatars1.githubusercontent.com/u/1288694?v=4?s=100" width="100px;" alt="Justin Hall"/><br /><sub><b>Justin Hall</b></sub></a><br /><a href="#platform-wKovacs64" title="Packaging/porting to new platform">📦</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/antoaravinth"><img src="https://avatars1.githubusercontent.com/u/1241511?s=460&v=4?s=100" width="100px;" alt="Anto Aravinth"/><br /><sub><b>Anto Aravinth</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=antoaravinth" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=antoaravinth" title="Tests">⚠️</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=antoaravinth" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/JonahMoses"><img src="https://avatars2.githubusercontent.com/u/3462296?v=4?s=100" width="100px;" alt="Jonah Moses"/><br /><sub><b>Jonah Moses</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=JonahMoses" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://team.thebrain.pro"><img src="https://avatars1.githubusercontent.com/u/4002543?v=4?s=100" width="100px;" alt="Łukasz Gandecki"/><br /><sub><b>Łukasz Gandecki</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=lgandecki" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=lgandecki" title="Tests">⚠️</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=lgandecki" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://sompylasar.github.io"><img src="https://avatars2.githubusercontent.com/u/498274?v=4?s=100" width="100px;" alt="Ivan Babak"/><br /><sub><b>Ivan Babak</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Asompylasar" title="Bug reports">🐛</a> <a href="#ideas-sompylasar" title="Ideas, Planning, & Feedback">🤔</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/jday3"><img src="https://avatars3.githubusercontent.com/u/4439618?v=4?s=100" width="100px;" alt="Jesse Day"/><br /><sub><b>Jesse Day</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=jday3" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://gnapse.github.io"><img src="https://avatars0.githubusercontent.com/u/15199?v=4?s=100" width="100px;" alt="Ernesto García"/><br /><sub><b>Ernesto García</b></sub></a><br /><a href="#question-gnapse" title="Answering Questions">💬</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=gnapse" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=gnapse" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://jomaxx.com"><img src="https://avatars2.githubusercontent.com/u/2747424?v=4?s=100" width="100px;" alt="Josef Maxx Blake"/><br /><sub><b>Josef Maxx Blake</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=jomaxx" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=jomaxx" title="Documentation">📖</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=jomaxx" title="Tests">⚠️</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/baranovskim"><img src="https://avatars1.githubusercontent.com/u/29602306?v=4?s=100" width="100px;" alt="Michal Baranowski"/><br /><sub><b>Michal Baranowski</b></sub></a><br /><a href="#blog-mbaranovski" title="Blogposts">📝</a> <a href="#tutorial-mbaranovski" title="Tutorials">✅</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/aputhin"><img src="https://avatars3.githubusercontent.com/u/13985684?v=4?s=100" width="100px;" alt="Arthur Puthin"/><br /><sub><b>Arthur Puthin</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=aputhin" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/thchia"><img src="https://avatars2.githubusercontent.com/u/21194045?v=4?s=100" width="100px;" alt="Thomas Chia"/><br /><sub><b>Thomas Chia</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=thchia" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=thchia" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://ilegra.com/"><img src="https://avatars3.githubusercontent.com/u/20430611?v=4?s=100" width="100px;" alt="Thiago Galvani"/><br /><sub><b>Thiago Galvani</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=thiagopaiva99" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://Chriswcs.github.io"><img src="https://avatars1.githubusercontent.com/u/19828824?v=4?s=100" width="100px;" alt="Christian"/><br /><sub><b>Christian</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=ChrisWcs" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://alexkrolick.com"><img src="https://avatars3.githubusercontent.com/u/1571667?v=4?s=100" width="100px;" alt="Alex Krolick"/><br /><sub><b>Alex Krolick</b></sub></a><br /><a href="#question-alexkrolick" title="Answering Questions">💬</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=alexkrolick" title="Documentation">📖</a> <a href="#example-alexkrolick" title="Examples">💡</a> <a href="#ideas-alexkrolick" title="Ideas, Planning, & Feedback">🤔</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/johann-sonntagbauer"><img src="https://avatars3.githubusercontent.com/u/1239401?v=4?s=100" width="100px;" alt="Johann Hubert Sonntagbauer"/><br /><sub><b>Johann Hubert Sonntagbauer</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=johann-sonntagbauer" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=johann-sonntagbauer" title="Documentation">📖</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=johann-sonntagbauer" title="Tests">⚠️</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="http://www.maddijoyce.com"><img src="https://avatars2.githubusercontent.com/u/2224291?v=4?s=100" width="100px;" alt="Maddi Joyce"/><br /><sub><b>Maddi Joyce</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=maddijoyce" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://www.vicesoftware.com"><img src="https://avatars2.githubusercontent.com/u/10080111?v=4?s=100" width="100px;" alt="Ryan Vice"/><br /><sub><b>Ryan Vice</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=RyanAtViceSoftware" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://ianwilson.io"><img src="https://avatars1.githubusercontent.com/u/7942604?v=4?s=100" width="100px;" alt="Ian Wilson"/><br /><sub><b>Ian Wilson</b></sub></a><br /><a href="#blog-iwilsonq" title="Blogposts">📝</a> <a href="#tutorial-iwilsonq" title="Tutorials">✅</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/InExtremaRes"><img src="https://avatars2.githubusercontent.com/u/1635491?v=4?s=100" width="100px;" alt="Daniel"/><br /><sub><b>Daniel</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3AInExtremaRes" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=InExtremaRes" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/Gpx"><img src="https://avatars0.githubusercontent.com/u/767959?v=4?s=100" width="100px;" alt="Giorgio Polvara"/><br /><sub><b>Giorgio Polvara</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3AGpx" title="Bug reports">🐛</a> <a href="#ideas-Gpx" title="Ideas, Planning, & Feedback">🤔</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/jgoz"><img src="https://avatars2.githubusercontent.com/u/132233?v=4?s=100" width="100px;" alt="John Gozde"/><br /><sub><b>John Gozde</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=jgoz" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/SavePointSam"><img src="https://avatars0.githubusercontent.com/u/8203211?v=4?s=100" width="100px;" alt="Sam Horton"/><br /><sub><b>Sam Horton</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=SavePointSam" title="Documentation">📖</a> <a href="#example-SavePointSam" title="Examples">💡</a> <a href="#ideas-SavePointSam" title="Ideas, Planning, & Feedback">🤔</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="http://www.richardkotze.com"><img src="https://avatars2.githubusercontent.com/u/10452163?v=4?s=100" width="100px;" alt="Richard Kotze (mobile)"/><br /><sub><b>Richard Kotze (mobile)</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=rkotze" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/sotobuild"><img src="https://avatars2.githubusercontent.com/u/10819833?v=4?s=100" width="100px;" alt="Brahian E. Soto Mercedes"/><br /><sub><b>Brahian E. Soto Mercedes</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=sotobuild" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/bdelaforest"><img src="https://avatars2.githubusercontent.com/u/7151559?v=4?s=100" width="100px;" alt="Benoit de La Forest"/><br /><sub><b>Benoit de La Forest</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=bdelaforest" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/thesalah"><img src="https://avatars3.githubusercontent.com/u/6624197?v=4?s=100" width="100px;" alt="Salah"/><br /><sub><b>Salah</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=thesalah" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=thesalah" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://gordonizer.com"><img src="https://avatars2.githubusercontent.com/u/370054?v=4?s=100" width="100px;" alt="Adam Gordon"/><br /><sub><b>Adam Gordon</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Aicfantv" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=icfantv" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://silvenon.com"><img src="https://avatars2.githubusercontent.com/u/471278?v=4?s=100" width="100px;" alt="Matija Marohnić"/><br /><sub><b>Matija Marohnić</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=silvenon" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/Dajust"><img src="https://avatars3.githubusercontent.com/u/8015514?v=4?s=100" width="100px;" alt="Justice Mba"/><br /><sub><b>Justice Mba</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=Dajust" title="Documentation">📖</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://markpollmann.com/"><img src="https://avatars2.githubusercontent.com/u/5286559?v=4?s=100" width="100px;" alt="Mark Pollmann"/><br /><sub><b>Mark Pollmann</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=MarkPollmann" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/ehteshamkafeel"><img src="https://avatars1.githubusercontent.com/u/1213123?v=4?s=100" width="100px;" alt="Ehtesham Kafeel"/><br /><sub><b>Ehtesham Kafeel</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=ehteshamkafeel" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=ehteshamkafeel" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://jpavon.com"><img src="https://avatars2.githubusercontent.com/u/1493505?v=4?s=100" width="100px;" alt="Julio Pavón"/><br /><sub><b>Julio Pavón</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=jpavon" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://www.duncanleung.com/"><img src="https://avatars3.githubusercontent.com/u/1765048?v=4?s=100" width="100px;" alt="Duncan L"/><br /><sub><b>Duncan L</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=duncanleung" title="Documentation">📖</a> <a href="#example-duncanleung" title="Examples">💡</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/tyagow/?locale=en_US"><img src="https://avatars1.githubusercontent.com/u/700778?v=4?s=100" width="100px;" alt="Tiago Almeida"/><br /><sub><b>Tiago Almeida</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=tyagow" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://rbrtsmith.com/"><img src="https://avatars2.githubusercontent.com/u/4982001?v=4?s=100" width="100px;" alt="Robert Smith"/><br /><sub><b>Robert Smith</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Arbrtsmith" title="Bug reports">🐛</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://offbyone.tech"><img src="https://avatars0.githubusercontent.com/u/1700355?v=4?s=100" width="100px;" alt="Zach Green"/><br /><sub><b>Zach Green</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=zgreen" title="Documentation">📖</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/dadamssg"><img src="https://avatars3.githubusercontent.com/u/881986?v=4?s=100" width="100px;" alt="dadamssg"/><br /><sub><b>dadamssg</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=dadamssg" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.yaabed.com/"><img src="https://avatars0.githubusercontent.com/u/8734097?v=4?s=100" width="100px;" alt="Yazan Aabed"/><br /><sub><b>Yazan Aabed</b></sub></a><br /><a href="#blog-YazanAabeed" title="Blogposts">📝</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/timbonicus"><img src="https://avatars0.githubusercontent.com/u/556258?v=4?s=100" width="100px;" alt="Tim"/><br /><sub><b>Tim</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Atimbonicus" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=timbonicus" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=timbonicus" title="Documentation">📖</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=timbonicus" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://divyanshu.xyz"><img src="https://avatars3.githubusercontent.com/u/6682655?v=4?s=100" width="100px;" alt="Divyanshu Maithani"/><br /><sub><b>Divyanshu Maithani</b></sub></a><br /><a href="#tutorial-divyanshu013" title="Tutorials">✅</a> <a href="#video-divyanshu013" title="Videos">📹</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/metagrover"><img src="https://avatars2.githubusercontent.com/u/9116042?v=4?s=100" width="100px;" alt="Deepak Grover"/><br /><sub><b>Deepak Grover</b></sub></a><br /><a href="#tutorial-metagrover" title="Tutorials">✅</a> <a href="#video-metagrover" title="Videos">📹</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/eyalcohen4"><img src="https://avatars0.githubusercontent.com/u/16276358?v=4?s=100" width="100px;" alt="Eyal Cohen"/><br /><sub><b>Eyal Cohen</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=eyalcohen4" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/petermakowski"><img src="https://avatars3.githubusercontent.com/u/7452681?v=4?s=100" width="100px;" alt="Peter Makowski"/><br /><sub><b>Peter Makowski</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=petermakowski" title="Documentation">📖</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/Michielnuyts"><img src="https://avatars2.githubusercontent.com/u/20361668?v=4?s=100" width="100px;" alt="Michiel Nuyts"/><br /><sub><b>Michiel Nuyts</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=Michielnuyts" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/joeynimu"><img src="https://avatars0.githubusercontent.com/u/1195863?v=4?s=100" width="100px;" alt="Joe Ng'ethe"/><br /><sub><b>Joe Ng'ethe</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=joeynimu" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=joeynimu" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/Enikol"><img src="https://avatars3.githubusercontent.com/u/19998290?v=4?s=100" width="100px;" alt="Kate"/><br /><sub><b>Kate</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=Enikol" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://www.seanrparker.com"><img src="https://avatars1.githubusercontent.com/u/11980217?v=4?s=100" width="100px;" alt="Sean"/><br /><sub><b>Sean</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=SeanRParker" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://jlongster.com"><img src="https://avatars2.githubusercontent.com/u/17031?v=4?s=100" width="100px;" alt="James Long"/><br /><sub><b>James Long</b></sub></a><br /><a href="#ideas-jlongster" title="Ideas, Planning, & Feedback">🤔</a> <a href="#platform-jlongster" title="Packaging/porting to new platform">📦</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/hhagely"><img src="https://avatars1.githubusercontent.com/u/10118777?v=4?s=100" width="100px;" alt="Herb Hagely"/><br /><sub><b>Herb Hagely</b></sub></a><br /><a href="#example-hhagely" title="Examples">💡</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://www.wendtedesigns.com/"><img src="https://avatars2.githubusercontent.com/u/5779538?v=4?s=100" width="100px;" alt="Alex Wendte"/><br /><sub><b>Alex Wendte</b></sub></a><br /><a href="#example-themostcolm" title="Examples">💡</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="http://www.aboutmonica.com"><img src="https://avatars0.githubusercontent.com/u/6998954?v=4?s=100" width="100px;" alt="Monica Powell"/><br /><sub><b>Monica Powell</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=M0nica" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://sivkoff.com"><img src="https://avatars1.githubusercontent.com/u/2699953?v=4?s=100" width="100px;" alt="Vitaly Sivkov"/><br /><sub><b>Vitaly Sivkov</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=sivkoff" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/weyert"><img src="https://avatars3.githubusercontent.com/u/7049?v=4?s=100" width="100px;" alt="Weyert de Boer"/><br /><sub><b>Weyert de Boer</b></sub></a><br /><a href="#ideas-weyert" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Aweyert" title="Reviewed Pull Requests">👀</a> <a href="#design-weyert" title="Design">🎨</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/EstebanMarin"><img src="https://avatars3.githubusercontent.com/u/13613037?v=4?s=100" width="100px;" alt="EstebanMarin"/><br /><sub><b>EstebanMarin</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=EstebanMarin" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/vctormb"><img src="https://avatars2.githubusercontent.com/u/13953703?v=4?s=100" width="100px;" alt="Victor Martins"/><br /><sub><b>Victor Martins</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=vctormb" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/RoystonS"><img src="https://avatars0.githubusercontent.com/u/19773?v=4?s=100" width="100px;" alt="Royston Shufflebotham"/><br /><sub><b>Royston Shufflebotham</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3ARoystonS" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=RoystonS" title="Documentation">📖</a> <a href="#example-RoystonS" title="Examples">💡</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/chrbala"><img src="https://avatars0.githubusercontent.com/u/6834804?v=4?s=100" width="100px;" alt="chrbala"/><br /><sub><b>chrbala</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=chrbala" title="Code">💻</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="http://donavon.com"><img src="https://avatars3.githubusercontent.com/u/887639?v=4?s=100" width="100px;" alt="Donavon West"/><br /><sub><b>Donavon West</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=donavon" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=donavon" title="Documentation">📖</a> <a href="#ideas-donavon" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=donavon" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/maisano"><img src="https://avatars2.githubusercontent.com/u/689081?v=4?s=100" width="100px;" alt="Richard Maisano"/><br /><sub><b>Richard Maisano</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=maisano" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.marcobiedermann.com"><img src="https://avatars0.githubusercontent.com/u/5244986?v=4?s=100" width="100px;" alt="Marco Biedermann"/><br /><sub><b>Marco Biedermann</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=marcobiedermann" title="Code">💻</a> <a href="#maintenance-marcobiedermann" title="Maintenance">🚧</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=marcobiedermann" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/alexzherdev"><img src="https://avatars3.githubusercontent.com/u/93752?v=4?s=100" width="100px;" alt="Alex Zherdev"/><br /><sub><b>Alex Zherdev</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Aalexzherdev" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=alexzherdev" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/Andrewmat"><img src="https://avatars0.githubusercontent.com/u/5133846?v=4?s=100" width="100px;" alt="André Matulionis dos Santos"/><br /><sub><b>André Matulionis dos Santos</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=Andrewmat" title="Code">💻</a> <a href="#example-Andrewmat" title="Examples">💡</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=Andrewmat" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/FredyC"><img src="https://avatars0.githubusercontent.com/u/1096340?v=4?s=100" width="100px;" alt="Daniel K."/><br /><sub><b>Daniel K.</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3AFredyC" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=FredyC" title="Code">💻</a> <a href="#ideas-FredyC" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=FredyC" title="Tests">⚠️</a> <a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3AFredyC" title="Reviewed Pull Requests">👀</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/mohamedmagdy17593"><img src="https://avatars0.githubusercontent.com/u/40938625?v=4?s=100" width="100px;" alt="mohamedmagdy17593"/><br /><sub><b>mohamedmagdy17593</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=mohamedmagdy17593" title="Code">💻</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="http://lorensr.me"><img src="https://avatars2.githubusercontent.com/u/251288?v=4?s=100" width="100px;" alt="Loren ☺️"/><br /><sub><b>Loren ☺️</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=lorensr" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/MarkFalconbridge"><img src="https://avatars1.githubusercontent.com/u/20678943?v=4?s=100" width="100px;" alt="MarkFalconbridge"/><br /><sub><b>MarkFalconbridge</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3AMarkFalconbridge" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=MarkFalconbridge" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/viniciusavieira"><img src="https://avatars0.githubusercontent.com/u/2073019?v=4?s=100" width="100px;" alt="Vinicius"/><br /><sub><b>Vinicius</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=viniciusavieira" title="Documentation">📖</a> <a href="#example-viniciusavieira" title="Examples">💡</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/pschyma"><img src="https://avatars2.githubusercontent.com/u/2489928?v=4?s=100" width="100px;" alt="Peter Schyma"/><br /><sub><b>Peter Schyma</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=pschyma" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/ianschmitz"><img src="https://avatars1.githubusercontent.com/u/6355370?v=4?s=100" width="100px;" alt="Ian Schmitz"/><br /><sub><b>Ian Schmitz</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=ianschmitz" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/joual"><img src="https://avatars0.githubusercontent.com/u/157877?v=4?s=100" width="100px;" alt="Joel Marcotte"/><br /><sub><b>Joel Marcotte</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Ajoual" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=joual" title="Tests">⚠️</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=joual" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://aledustet.com"><img src="https://avatars3.githubusercontent.com/u/2413802?v=4?s=100" width="100px;" alt="Alejandro Dustet"/><br /><sub><b>Alejandro Dustet</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Aaledustet" title="Bug reports">🐛</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/bcarroll22"><img src="https://avatars2.githubusercontent.com/u/11020406?v=4?s=100" width="100px;" alt="Brandon Carroll"/><br /><sub><b>Brandon Carroll</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=bcarroll22" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/lucas0707"><img src="https://avatars1.githubusercontent.com/u/26284338?v=4?s=100" width="100px;" alt="Lucas Machado"/><br /><sub><b>Lucas Machado</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=lucas0707" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://pascalduez.me"><img src="https://avatars3.githubusercontent.com/u/335467?v=4?s=100" width="100px;" alt="Pascal Duez"/><br /><sub><b>Pascal Duez</b></sub></a><br /><a href="#platform-pascalduez" title="Packaging/porting to new platform">📦</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/minh_ngvyen"><img src="https://avatars3.githubusercontent.com/u/2852660?v=4?s=100" width="100px;" alt="Minh Nguyen"/><br /><sub><b>Minh Nguyen</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=NMinhNguyen" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://iababy46.blogspot.tw/"><img src="https://avatars0.githubusercontent.com/u/11155585?v=4?s=100" width="100px;" alt="LiaoJimmy"/><br /><sub><b>LiaoJimmy</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=LiaoJimmy" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/threepointone"><img src="https://avatars2.githubusercontent.com/u/18808?v=4?s=100" width="100px;" alt="Sunil Pai"/><br /><sub><b>Sunil Pai</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=threepointone" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=threepointone" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://twitter.com/dan_abramov"><img src="https://avatars0.githubusercontent.com/u/810438?v=4?s=100" width="100px;" alt="Dan Abramov"/><br /><sub><b>Dan Abramov</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Agaearon" title="Reviewed Pull Requests">👀</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/ChristianMurphy"><img src="https://avatars3.githubusercontent.com/u/3107513?v=4?s=100" width="100px;" alt="Christian Murphy"/><br /><sub><b>Christian Murphy</b></sub></a><br /><a href="#infra-ChristianMurphy" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://jeetiss.github.io/"><img src="https://avatars1.githubusercontent.com/u/6726016?v=4?s=100" width="100px;" alt="Ivakhnenko Dmitry"/><br /><sub><b>Ivakhnenko Dmitry</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=jeetiss" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://ghuser.io/jamesgeorge007"><img src="https://avatars2.githubusercontent.com/u/25279263?v=4?s=100" width="100px;" alt="James George"/><br /><sub><b>James George</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=jamesgeorge007" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://joaofernandes.me/"><img src="https://avatars1.githubusercontent.com/u/1075053?v=4?s=100" width="100px;" alt="João Fernandes"/><br /><sub><b>João Fernandes</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=JSFernandes" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/alejandroperea"><img src="https://avatars3.githubusercontent.com/u/6084749?v=4?s=100" width="100px;" alt="Alejandro Perea"/><br /><sub><b>Alejandro Perea</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Aalejandroperea" title="Reviewed Pull Requests">👀</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://nickmccurdy.com/"><img src="https://avatars0.githubusercontent.com/u/927220?v=4?s=100" width="100px;" alt="Nick McCurdy"/><br /><sub><b>Nick McCurdy</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Anickmccurdy" title="Reviewed Pull Requests">👀</a> <a href="#question-nickmccurdy" title="Answering Questions">💬</a> <a href="#infra-nickmccurdy" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/sebsilbermann"><img src="https://avatars3.githubusercontent.com/u/12292047?v=4?s=100" width="100px;" alt="Sebastian Silbermann"/><br /><sub><b>Sebastian Silbermann</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Aeps1lon" title="Reviewed Pull Requests">👀</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://afontcu.dev"><img src="https://avatars0.githubusercontent.com/u/9197791?v=4?s=100" width="100px;" alt="Adrià Fontcuberta"/><br /><sub><b>Adrià Fontcuberta</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Aafontcu" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=afontcu" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://blog.johnnyreilly.com/"><img src="https://avatars0.githubusercontent.com/u/1010525?v=4?s=100" width="100px;" alt="John Reilly"/><br /><sub><b>John Reilly</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Ajohnnyreilly" title="Reviewed Pull Requests">👀</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://michaeldeboey.be"><img src="https://avatars3.githubusercontent.com/u/6643991?v=4?s=100" width="100px;" alt="Michaël De Boey"/><br /><sub><b>Michaël De Boey</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3AMichaelDeBoey" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=MichaelDeBoey" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://cimbul.com"><img src="https://avatars2.githubusercontent.com/u/927923?v=4?s=100" width="100px;" alt="Tim Yates"/><br /><sub><b>Tim Yates</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Acimbul" title="Reviewed Pull Requests">👀</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/eventualbuddha"><img src="https://avatars3.githubusercontent.com/u/1938?v=4?s=100" width="100px;" alt="Brian Donovan"/><br /><sub><b>Brian Donovan</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=eventualbuddha" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/JaysQubeXon"><img src="https://avatars1.githubusercontent.com/u/18309230?v=4?s=100" width="100px;" alt="Noam Gabriel Jacobson"/><br /><sub><b>Noam Gabriel Jacobson</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=JaysQubeXon" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/rvdkooy"><img src="https://avatars1.githubusercontent.com/u/4119960?v=4?s=100" width="100px;" alt="Ronald van der Kooij"/><br /><sub><b>Ronald van der Kooij</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=rvdkooy" title="Tests">⚠️</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=rvdkooy" title="Code">💻</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/aayushrajvanshi"><img src="https://avatars0.githubusercontent.com/u/14968551?v=4?s=100" width="100px;" alt="Aayush Rajvanshi"/><br /><sub><b>Aayush Rajvanshi</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=aayushrajvanshi" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://elyalamillo.com"><img src="https://avatars2.githubusercontent.com/u/24350492?v=4?s=100" width="100px;" alt="Ely Alamillo"/><br /><sub><b>Ely Alamillo</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=ely-alamillo" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=ely-alamillo" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/danieljcafonso"><img src="https://avatars3.githubusercontent.com/u/35337607?v=4?s=100" width="100px;" alt="Daniel Afonso"/><br /><sub><b>Daniel Afonso</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=danieljcafonso" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=danieljcafonso" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://www.laurensbosscher.nl"><img src="https://avatars0.githubusercontent.com/u/13363196?v=4?s=100" width="100px;" alt="Laurens Bosscher"/><br /><sub><b>Laurens Bosscher</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=LaurensBosscher" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/__sakito__"><img src="https://avatars1.githubusercontent.com/u/15010907?v=4?s=100" width="100px;" alt="Sakito Mukai"/><br /><sub><b>Sakito Mukai</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=sakito21" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://turkerteke.com"><img src="https://avatars3.githubusercontent.com/u/12457162?v=4?s=100" width="100px;" alt="Türker Teke"/><br /><sub><b>Türker Teke</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=tteke" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://linkedin.com/in/zachbrogan"><img src="https://avatars1.githubusercontent.com/u/319162?v=4?s=100" width="100px;" alt="Zach Brogan"/><br /><sub><b>Zach Brogan</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=zbrogz" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=zbrogz" title="Tests">⚠️</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://ryota-murakami.github.io/"><img src="https://avatars2.githubusercontent.com/u/5501268?v=4?s=100" width="100px;" alt="Ryota Murakami"/><br /><sub><b>Ryota Murakami</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=ryota-murakami" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/hottmanmichael"><img src="https://avatars3.githubusercontent.com/u/10534502?v=4?s=100" width="100px;" alt="Michael Hottman"/><br /><sub><b>Michael Hottman</b></sub></a><br /><a href="#ideas-hottmanmichael" title="Ideas, Planning, & Feedback">🤔</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/stevenfitzpatrick"><img src="https://avatars0.githubusercontent.com/u/23268855?v=4?s=100" width="100px;" alt="Steven Fitzpatrick"/><br /><sub><b>Steven Fitzpatrick</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Astevenfitzpatrick" title="Bug reports">🐛</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/juangl"><img src="https://avatars0.githubusercontent.com/u/1887029?v=4?s=100" width="100px;" alt="Juan Je García"/><br /><sub><b>Juan Je García</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=juangl" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://ghuser.io/Ishaan28malik"><img src="https://avatars3.githubusercontent.com/u/27343592?v=4?s=100" width="100px;" alt="Championrunner"/><br /><sub><b>Championrunner</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=Ishaan28malik" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/samtsai"><img src="https://avatars0.githubusercontent.com/u/225526?v=4?s=100" width="100px;" alt="Sam Tsai"/><br /><sub><b>Sam Tsai</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=samtsai" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=samtsai" title="Tests">⚠️</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=samtsai" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.echooff.dev"><img src="https://avatars0.githubusercontent.com/u/149248?v=4?s=100" width="100px;" alt="Christian Rackerseder"/><br /><sub><b>Christian Rackerseder</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=screendriver" title="Code">💻</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/NiGhTTraX"><img src="https://avatars0.githubusercontent.com/u/485061?v=4?s=100" width="100px;" alt="Andrei Picus"/><br /><sub><b>Andrei Picus</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3ANiGhTTraX" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3ANiGhTTraX" title="Reviewed Pull Requests">👀</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://redd.one"><img src="https://avatars3.githubusercontent.com/u/14984911?v=4?s=100" width="100px;" alt="Artem Zakharchenko"/><br /><sub><b>Artem Zakharchenko</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=kettanaito" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://michaelsiek.com"><img src="https://avatars0.githubusercontent.com/u/45568605?v=4?s=100" width="100px;" alt="Michael"/><br /><sub><b>Michael</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=michael-siek" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://2dubbing.tistory.com"><img src="https://avatars2.githubusercontent.com/u/15885679?v=4?s=100" width="100px;" alt="Braden Lee"/><br /><sub><b>Braden Lee</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=2dubbing" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://kamranicus.com/"><img src="https://avatars1.githubusercontent.com/u/563819?v=4?s=100" width="100px;" alt="Kamran Ayub"/><br /><sub><b>Kamran Ayub</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=kamranayub" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=kamranayub" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://twitter.com/matanbobi"><img src="https://avatars2.githubusercontent.com/u/12711091?v=4?s=100" width="100px;" alt="Matan Borenkraout"/><br /><sub><b>Matan Borenkraout</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=MatanBobi" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://ryanbigg.com"><img src="https://avatars3.githubusercontent.com/u/2687?v=4?s=100" width="100px;" alt="Ryan Bigg"/><br /><sub><b>Ryan Bigg</b></sub></a><br /><a href="#maintenance-radar" title="Maintenance">🚧</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://antonhalim.com"><img src="https://avatars1.githubusercontent.com/u/10498035?v=4?s=100" width="100px;" alt="Anton Halim"/><br /><sub><b>Anton Halim</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=antonhalim" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://artmalko.ru"><img src="https://avatars0.githubusercontent.com/u/1823689?v=4?s=100" width="100px;" alt="Artem Malko"/><br /><sub><b>Artem Malko</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=artem-malko" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://gerritalex.de"><img src="https://avatars1.githubusercontent.com/u/29307652?v=4?s=100" width="100px;" alt="Gerrit Alex"/><br /><sub><b>Gerrit Alex</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=ljosberinn" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/karthick3018"><img src="https://avatars1.githubusercontent.com/u/47154512?v=4?s=100" width="100px;" alt="Karthick Raja"/><br /><sub><b>Karthick Raja</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=karthick3018" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/theashraf"><img src="https://avatars1.githubusercontent.com/u/39750790?v=4?s=100" width="100px;" alt="Abdelrahman Ashraf"/><br /><sub><b>Abdelrahman Ashraf</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=theashraf" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/lidoravitan"><img src="https://avatars0.githubusercontent.com/u/35113398?v=4?s=100" width="100px;" alt="Lidor Avitan"/><br /><sub><b>Lidor Avitan</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=lidoravitan" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/ljharb"><img src="https://avatars1.githubusercontent.com/u/45469?v=4?s=100" width="100px;" alt="Jordan Harband"/><br /><sub><b>Jordan Harband</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/pulls?q=is%3Apr+reviewed-by%3Aljharb" title="Reviewed Pull Requests">👀</a> <a href="#ideas-ljharb" title="Ideas, Planning, & Feedback">🤔</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/marcosvega91"><img src="https://avatars2.githubusercontent.com/u/5365582?v=4?s=100" width="100px;" alt="Marco Moretti"/><br /><sub><b>Marco Moretti</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=marcosvega91" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/sanchit121"><img src="https://avatars2.githubusercontent.com/u/30828115?v=4?s=100" width="100px;" alt="sanchit121"/><br /><sub><b>sanchit121</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Asanchit121" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=sanchit121" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/solufa"><img src="https://avatars.githubusercontent.com/u/9402912?v=4?s=100" width="100px;" alt="Solufa"/><br /><sub><b>Solufa</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Asolufa" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=solufa" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://codepen.io/ariperkkio/"><img src="https://avatars.githubusercontent.com/u/14806298?v=4?s=100" width="100px;" alt="Ari Perkkiö"/><br /><sub><b>Ari Perkkiö</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=AriPerkkio" title="Tests">⚠️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/jhnns"><img src="https://avatars.githubusercontent.com/u/781746?v=4?s=100" width="100px;" alt="Johannes Ewald"/><br /><sub><b>Johannes Ewald</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=jhnns" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/anpaopao"><img src="https://avatars.githubusercontent.com/u/44686792?v=4?s=100" width="100px;" alt="Angus J. Pope"/><br /><sub><b>Angus J. Pope</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=anpaopao" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/leschdom"><img src="https://avatars.githubusercontent.com/u/62334278?v=4?s=100" width="100px;" alt="Dominik Lesch"/><br /><sub><b>Dominik Lesch</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=leschdom" title="Documentation">📖</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/ImADrafter"><img src="https://avatars.githubusercontent.com/u/44379989?v=4?s=100" width="100px;" alt="Marcos Gómez"/><br /><sub><b>Marcos Gómez</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=ImADrafter" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.akashshyam.online/"><img src="https://avatars.githubusercontent.com/u/56759828?v=4?s=100" width="100px;" alt="Akash Shyam"/><br /><sub><b>Akash Shyam</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Aakashshyamdev" title="Bug reports">🐛</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://hen.ne.ke"><img src="https://avatars.githubusercontent.com/u/4312191?v=4?s=100" width="100px;" alt="Fabian Meumertzheim"/><br /><sub><b>Fabian Meumertzheim</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=fmeum" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/issues?q=author%3Afmeum" title="Bug reports">🐛</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/Nokel81"><img src="https://avatars.githubusercontent.com/u/8225332?v=4?s=100" width="100px;" alt="Sebastian Malton"/><br /><sub><b>Sebastian Malton</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/issues?q=author%3ANokel81" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=Nokel81" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/mboettcher"><img src="https://avatars.githubusercontent.com/u/2325337?v=4?s=100" width="100px;" alt="Martin Böttcher"/><br /><sub><b>Martin Böttcher</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=mboettcher" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://tkdodo.eu"><img src="https://avatars.githubusercontent.com/u/1021430?v=4?s=100" width="100px;" alt="Dominik Dorfmeister"/><br /><sub><b>Dominik Dorfmeister</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=TkDodo" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://stephensauceda.com"><img src="https://avatars.githubusercontent.com/u/1017723?v=4?s=100" width="100px;" alt="Stephen Sauceda"/><br /><sub><b>Stephen Sauceda</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=stephensauceda" title="Documentation">📖</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="http://cmdcolin.github.io"><img src="https://avatars.githubusercontent.com/u/6511937?v=4?s=100" width="100px;" alt="Colin Diesh"/><br /><sub><b>Colin Diesh</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=cmdcolin" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://yinm.info"><img src="https://avatars.githubusercontent.com/u/13295106?v=4?s=100" width="100px;" alt="Yusuke Iinuma"/><br /><sub><b>Yusuke Iinuma</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=yinm" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/trappar"><img src="https://avatars.githubusercontent.com/u/525726?v=4?s=100" width="100px;" alt="Jeff Way"/><br /><sub><b>Jeff Way</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=trappar" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://belchior.me"><img src="https://avatars.githubusercontent.com/u/12778398?v=4?s=100" width="100px;" alt="Bernardo Belchior"/><br /><sub><b>Bernardo Belchior</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=bernardobelchior" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=bernardobelchior" title="Documentation">📖</a></td>
    </tr>
  </tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors][all-contributors] specification.
Contributions of any kind welcome!

## LICENSE

[MIT](LICENSE)

<!-- prettier-ignore-start -->

[npm]: https://www.npmjs.com/
[yarn]: https://classic.yarnpkg.com
[node]: https://nodejs.org
[build-badge]: https://img.shields.io/github/actions/workflow/status/testing-library/react-testing-library/validate.yml?branch=main&logo=github
[build]: https://github.com/testing-library/react-testing-library/actions?query=workflow%3Avalidate
[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/react-testing-library.svg?style=flat-square
[coverage]: https://codecov.io/github/testing-library/react-testing-library
[version-badge]: https://img.shields.io/npm/v/@testing-library/react.svg?style=flat-square
[package]: https://www.npmjs.com/package/@testing-library/react
[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/react.svg?style=flat-square
[npmtrends]: http://www.npmtrends.com/@testing-library/react
[license-badge]: https://img.shields.io/npm/l/@testing-library/react.svg?style=flat-square
[license]: https://github.com/testing-library/react-testing-library/blob/main/LICENSE
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[prs]: http://makeapullrequest.com
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
[coc]: https://github.com/testing-library/react-testing-library/blob/main/CODE_OF_CONDUCT.md
[github-watch-badge]: https://img.shields.io/github/watchers/testing-library/react-testing-library.svg?style=social
[github-watch]: https://github.com/testing-library/react-testing-library/watchers
[github-star-badge]: https://img.shields.io/github/stars/testing-library/react-testing-library.svg?style=social
[github-star]: https://github.com/testing-library/react-testing-library/stargazers
[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20react-testing-library%20by%20%40@TestingLib%20https%3A%2F%2Fgithub.com%2Ftesting-library%2Freact-testing-library%20%F0%9F%91%8D
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/testing-library/react-testing-library.svg?style=social
[emojis]: https://github.com/all-contributors/all-contributors#emoji-key
[all-contributors]: https://github.com/all-contributors/all-contributors
[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/react-testing-library?color=orange&style=flat-square
[guiding-principle]: https://twitter.com/kentcdodds/status/977018512689455106
[bugs]: https://github.com/testing-library/react-testing-library/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Acreated-desc
[requests]: https://github.com/testing-library/react-testing-library/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+label%3Aenhancement+is%3Aopen
[good-first-issue]: https://github.com/testing-library/react-testing-library/issues?utf8=✓&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3A"good+first+issue"+
[discord-badge]: https://img.shields.io/discord/723559267868737556.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square
[discord]: https://discord.gg/testing-library
[stackoverflow]: https://stackoverflow.com/questions/tagged/react-testing-library
[react-hooks-testing-library]: https://github.com/testing-library/react-hooks-testing-library

<!-- prettier-ignore-end -->


================================================
FILE: codecov.yml
================================================
coverage:
  status:
    project:
      default:
        # basic
        target: 100%
        threshold: 0%
        flags:
          - canary
          - experimental
          - latest
        branches:
          - main
          - 12.x
        if_ci_failed: success
        if_not_found: failure
        informational: false
        only_pulls: false
github_checks:
  annotations: true


================================================
FILE: dont-cleanup-after-each.js
================================================
process.env.RTL_SKIP_AUTO_CLEANUP = true


================================================
FILE: jest.config.js
================================================
const {jest: jestConfig} = require('kcd-scripts/config')

module.exports = Object.assign(jestConfig, {
  coverageThreshold: {
    ...jestConfig.coverageThreshold,
    // Full coverage across the build matrix (React 18, 19) but not in a single job
    // Full coverage is checked via codecov
    './src/act-compat': {
      branches: 90,
    },
    './src/pure': {
      // minimum coverage of jobs using React 18 and 19
      branches: 95,
      functions: 88,
      lines: 92,
      statements: 92,
    },
  },
})


================================================
FILE: other/MAINTAINING.md
================================================
# Maintaining

This is documentation for maintainers of this project.

## Code of Conduct

Please review, understand, and be an example of it. Violations of the code of
conduct are taken seriously, even (especially) for maintainers.

## Issues

We want to support and build the community. We do that best by helping people
learn to solve their own problems. We have an issue template and hopefully most
folks follow it. If it's not clear what the issue is, invite them to create a
minimal reproduction of what they're trying to accomplish or the bug they think
they've found.

Once it's determined that a code change is necessary, point people to
[makeapullrequest.com](http://makeapullrequest.com) and invite them to make a
pull request. If they're the one who needs the feature, they're the one who can
build it. If they need some hand holding and you have time to lend a hand,
please do so. It's an investment into another human being, and an investment
into a potential maintainer.

Remember that this is open source, so the code is not yours, it's ours. If
someone needs a change in the codebase, you don't have to make it happen
yourself. Commit as much time to the project as you want/need to. Nobody can ask
any more of you than that.

## Pull Requests

As a maintainer, you're fine to make your branches on the main repo or on your
own fork. Either way is fine.

When we receive a pull request, a github action is kicked off automatically (see
the `.github/workflows/validate.yml` for what runs in the action). We avoid
merging anything that breaks the validate action.

Please review PRs and focus on the code rather than the individual. You never
know when this is someone's first ever PR and we want their experience to be as
positive as possible, so be uplifting and constructive.

When you merge the pull request, 99% of the time you should use the
[Squash and merge](https://help.github.com/articles/merging-a-pull-request/)
feature. This keeps our git history clean, but more importantly, this allows us
to make any necessary changes to the commit message so we release what we want
to release. See the next section on Releases for more about that.

## Release

Our releases are automatic. They happen whenever code lands into `main`. A
github action gets kicked off and if it's successful, a tool called
[`semantic-release`](https://github.com/semantic-release/semantic-release) is
used to automatically publish a new release to npm as well as a changelog to
GitHub. It is only able to determine the version and whether a release is
necessary by the git commit messages. With this in mind, **please brush up on
[the commit message convention][commit] which drives our releases.**

> One important note about this: Please make sure that commit messages do NOT
> contain the words "BREAKING CHANGE" in them unless we want to push a major
> version. I've been burned by this more than once where someone will include
> "BREAKING CHANGE: None" and it will end up releasing a new major version. Not
> a huge deal honestly, but kind of annoying...

## Thanks!

Thank you so much for helping to maintain this project!

[commit]:
  https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md


================================================
FILE: other/USERS.md
================================================
# Users

If you or your company uses this project, add your name to this list! Eventually
we may have a website to showcase these (wanna build it!?)

> No users have been added yet!

<!--
This file should just be a bulleted list like this:

- [Company/Project/Person](https://example.com) uses it in [some app](https://example.com)
-->


================================================
FILE: other/design files/README.txt
================================================
# Cheat sheet design

The cheat sheet document has been created using the desktop publishing software called Affinity Publisher, the original source file can be found in this folder

## Fonts used

- Menlo
- Arial

## Standard distances

15pt between boxes
8pt margin from box edge to inner text

================================================
FILE: other/manual-releases.md
================================================
# manual-releases

This project has an automated release set up. So things are only released when
there are useful changes in the code that justify a release. But sometimes
things get messed up one way or another and we need to trigger the release
ourselves. When this happens, simply bump the number below and commit that with
the following commit message based on your needs:

**Major**

```
fix(release): manually release a major version

There was an issue with a major release, so this manual-releases.md
change is to release a new major version.

Reference: #<the number of a relevant pull request, issue, or commit>

BREAKING CHANGE: <mention any relevant breaking changes (this is what triggers the major version change so don't skip this!)>
```

**Minor**

```
feat(release): manually release a minor version

There was an issue with a minor release, so this manual-releases.md
change is to release a new minor version.

Reference: #<the number of a relevant pull request, issue, or commit>
```

**Patch**

```
fix(release): manually release a patch version

There was an issue with a patch release, so this manual-releases.md
change is to release a new patch version.

Reference: #<the number of a relevant pull request, issue, or commit>
```

The number of times we've had to do a manual release is: 5


================================================
FILE: package.json
================================================
{
  "name": "@testing-library/react",
  "version": "0.0.0-semantically-released",
  "description": "Simple and complete React DOM testing utilities that encourage good testing practices.",
  "main": "dist/index.js",
  "types": "types/index.d.ts",
  "module": "dist/@testing-library/react.esm.js",
  "engines": {
    "node": ">=18"
  },
  "scripts": {
    "prebuild": "rimraf dist",
    "build": "npm-run-all --parallel build:main build:bundle:main build:bundle:pure",
    "build:bundle:main": "dotenv -e .bundle.main.env kcd-scripts build -- --bundle --no-clean --no-ts-defs",
    "build:bundle:pure": "dotenv -e .bundle.main.env -e .bundle.pure.env kcd-scripts build -- --bundle --no-clean --no-ts-defs",
    "build:main": "kcd-scripts build --no-clean --no-ts-defs",
    "format": "kcd-scripts format",
    "install:csb": "npm install",
    "lint": "kcd-scripts lint",
    "setup": "npm install && npm run validate -s",
    "test": "kcd-scripts test",
    "test:update": "npm test -- --updateSnapshot --coverage",
    "typecheck": "tsc --project tsconfig.json",
    "validate": "kcd-scripts validate"
  },
  "files": [
    "dist",
    "dont-cleanup-after-each.js",
    "pure.js",
    "pure.d.ts",
    "types/*.d.ts"
  ],
  "keywords": [
    "testing",
    "react",
    "ui",
    "dom",
    "jsdom",
    "unit",
    "integration",
    "functional",
    "end-to-end",
    "e2e"
  ],
  "author": "Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)",
  "license": "MIT",
  "dependencies": {
    "@babel/runtime": "^7.12.5"
  },
  "devDependencies": {
    "@testing-library/dom": "^10.0.0",
    "@testing-library/jest-dom": "^5.11.6",
    "@types/react": "^19.0.0",
    "@types/react-dom": "^19.0.0",
    "chalk": "^4.1.2",
    "dotenv-cli": "^4.0.0",
    "jest-diff": "^29.7.0",
    "kcd-scripts": "^13.0.0",
    "npm-run-all2": "^6.2.6",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "rimraf": "^3.0.2",
    "typescript": "^5.9.3"
  },
  "peerDependencies": {
    "@testing-library/dom": "^10.0.0",
    "@types/react": "^18.0.0 || ^19.0.0",
    "@types/react-dom": "^18.0.0 || ^19.0.0",
    "react": "^18.0.0 || ^19.0.0",
    "react-dom": "^18.0.0 || ^19.0.0"
  },
  "peerDependenciesMeta": {
    "@types/react": {
      "optional": true
    },
    "@types/react-dom": {
      "optional": true
    }
  },
  "eslintConfig": {
    "extends": "./node_modules/kcd-scripts/eslint.js",
    "parserOptions": {
      "ecmaVersion": 2022
    },
    "globals": {
      "globalThis": "readonly"
    },
    "rules": {
      "react/prop-types": "off",
      "react/no-adjacent-inline-elements": "off",
      "import/no-unassigned-import": "off",
      "import/named": "off",
      "testing-library/no-container": "off",
      "testing-library/no-debugging-utils": "off",
      "testing-library/no-dom-import": "off",
      "testing-library/no-unnecessary-act": "off",
      "testing-library/prefer-explicit-assert": "off",
      "testing-library/prefer-find-by": "off",
      "testing-library/prefer-user-event": "off"
    }
  },
  "eslintIgnore": [
    "node_modules",
    "coverage",
    "dist",
    "*.d.ts"
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/testing-library/react-testing-library"
  },
  "bugs": {
    "url": "https://github.com/testing-library/react-testing-library/issues"
  },
  "homepage": "https://github.com/testing-library/react-testing-library#readme"
}


================================================
FILE: pure.d.ts
================================================
export * from './types/pure'


================================================
FILE: pure.js
================================================
// makes it so people can import from '@testing-library/react/pure'
module.exports = require('./dist/pure')


================================================
FILE: src/__mocks__/axios.js
================================================
module.exports = {
  get: jest.fn(() => Promise.resolve({data: {}})),
}

// Note:
// For now we don't need any other method (POST/PUT/PATCH), what we have already works fine.
// We will add more methods only if we need to.
// For reference please read: https://github.com/testing-library/react-testing-library/issues/2


================================================
FILE: src/__tests__/__snapshots__/render.js.snap
================================================
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`render API supports fragments 1`] = `
<DocumentFragment>
  <div>
    <code>
      DocumentFragment
    </code>
     is pretty cool!
  </div>
</DocumentFragment>
`;


================================================
FILE: src/__tests__/act.js
================================================
import * as React from 'react'
import {act, render, fireEvent, screen} from '../'

test('render calls useEffect immediately', () => {
  const effectCb = jest.fn()
  function MyUselessComponent() {
    React.useEffect(effectCb)
    return null
  }
  render(<MyUselessComponent />)
  expect(effectCb).toHaveBeenCalledTimes(1)
})

test('findByTestId returns the element', async () => {
  const ref = React.createRef()
  render(<div ref={ref} data-testid="foo" />)
  expect(await screen.findByTestId('foo')).toBe(ref.current)
})

test('fireEvent triggers useEffect calls', () => {
  const effectCb = jest.fn()
  function Counter() {
    React.useEffect(effectCb)
    const [count, setCount] = React.useState(0)
    return <button onClick={() => setCount(count + 1)}>{count}</button>
  }
  const {
    container: {firstChild: buttonNode},
  } = render(<Counter />)

  effectCb.mockClear()
  fireEvent.click(buttonNode)
  expect(buttonNode).toHaveTextContent('1')
  expect(effectCb).toHaveBeenCalledTimes(1)
})

test('calls to hydrate will run useEffects', () => {
  const effectCb = jest.fn()
  function MyUselessComponent() {
    React.useEffect(effectCb)
    return null
  }
  render(<MyUselessComponent />, {hydrate: true})
  expect(effectCb).toHaveBeenCalledTimes(1)
})

test('cleans up IS_REACT_ACT_ENVIRONMENT if its callback throws', () => {
  global.IS_REACT_ACT_ENVIRONMENT = false

  expect(() =>
    act(() => {
      throw new Error('threw')
    }),
  ).toThrow('threw')

  expect(global.IS_REACT_ACT_ENVIRONMENT).toEqual(false)
})

test('cleans up IS_REACT_ACT_ENVIRONMENT if its async callback throws', async () => {
  global.IS_REACT_ACT_ENVIRONMENT = false

  await expect(() =>
    act(async () => {
      throw new Error('thenable threw')
    }),
  ).rejects.toThrow('thenable threw')

  expect(global.IS_REACT_ACT_ENVIRONMENT).toEqual(false)
})


================================================
FILE: src/__tests__/auto-cleanup-skip.js
================================================
import * as React from 'react'

let render
beforeAll(() => {
  process.env.RTL_SKIP_AUTO_CLEANUP = 'true'
  const rtl = require('../')
  render = rtl.render
})

// This one verifies that if RTL_SKIP_AUTO_CLEANUP is set
// then we DON'T auto-wire up the afterEach for folks
test('first', () => {
  render(<div>hi</div>)
})

test('second', () => {
  expect(document.body.innerHTML).toEqual('<div><div>hi</div></div>')
})


================================================
FILE: src/__tests__/auto-cleanup.js
================================================
import * as React from 'react'
import {render} from '../'

// This just verifies that by importing RTL in an
// environment which supports afterEach (like jest)
// we'll get automatic cleanup between tests.
test('first', () => {
  render(<div>hi</div>)
})

test('second', () => {
  expect(document.body).toBeEmptyDOMElement()
})


================================================
FILE: src/__tests__/cleanup.js
================================================
import * as React from 'react'
import {render, cleanup} from '../'

test('cleans up the document', () => {
  const spy = jest.fn()
  const divId = 'my-div'

  class Test extends React.Component {
    componentWillUnmount() {
      expect(document.getElementById(divId)).toBeInTheDocument()
      spy()
    }

    render() {
      return <div id={divId} />
    }
  }

  render(<Test />)
  cleanup()
  expect(document.body).toBeEmptyDOMElement()
  expect(spy).toHaveBeenCalledTimes(1)
})

test('cleanup does not error when an element is not a child', () => {
  render(<div />, {container: document.createElement('div')})
  cleanup()
})

test('cleanup runs effect cleanup functions', () => {
  const spy = jest.fn()

  const Test = () => {
    React.useEffect(() => spy)

    return null
  }

  render(<Test />)
  cleanup()
  expect(spy).toHaveBeenCalledTimes(1)
})

describe('fake timers and missing act warnings', () => {
  beforeEach(() => {
    jest.resetAllMocks()
    jest.spyOn(console, 'error').mockImplementation(() => {
      // assert messages explicitly
    })
    jest.useFakeTimers()
  })

  afterEach(() => {
    jest.restoreAllMocks()
    jest.useRealTimers()
  })

  test('cleanup does not flush microtasks', () => {
    const microTaskSpy = jest.fn()
    function Test() {
      const counter = 1
      const [, setDeferredCounter] = React.useState(null)
      React.useEffect(() => {
        let cancelled = false
        Promise.resolve().then(() => {
          microTaskSpy()
          // eslint-disable-next-line jest/no-if, jest/no-conditional-in-test -- false positive
          if (!cancelled) {
            setDeferredCounter(counter)
          }
        })

        return () => {
          cancelled = true
        }
      }, [counter])

      return null
    }
    render(<Test />)

    cleanup()

    expect(microTaskSpy).toHaveBeenCalledTimes(0)
    // console.error is mocked
    // eslint-disable-next-line no-console
    expect(console.error).toHaveBeenCalledTimes(0)
  })

  test('cleanup does not swallow missing act warnings', () => {
    const deferredStateUpdateSpy = jest.fn()
    function Test() {
      const counter = 1
      const [, setDeferredCounter] = React.useState(null)
      React.useEffect(() => {
        let cancelled = false
        setTimeout(() => {
          deferredStateUpdateSpy()
          // eslint-disable-next-line jest/no-conditional-in-test -- false-positive
          if (!cancelled) {
            setDeferredCounter(counter)
          }
        }, 0)

        return () => {
          cancelled = true
        }
      }, [counter])

      return null
    }
    render(<Test />)

    jest.runAllTimers()
    cleanup()

    expect(deferredStateUpdateSpy).toHaveBeenCalledTimes(1)
    // console.error is mocked
    // eslint-disable-next-line no-console
    expect(console.error).toHaveBeenCalledTimes(1)
    // eslint-disable-next-line no-console
    expect(console.error.mock.calls[0][0]).toMatch(
      'a test was not wrapped in act(...)',
    )
  })
})


================================================
FILE: src/__tests__/config.js
================================================
import {configure, getConfig} from '../'

describe('configuration API', () => {
  let originalConfig
  beforeEach(() => {
    // Grab the existing configuration so we can restore
    // it at the end of the test
    configure(existingConfig => {
      originalConfig = existingConfig
      // Don't change the existing config
      return {}
    })
  })

  afterEach(() => {
    configure(originalConfig)
  })

  describe('DTL options', () => {
    test('configure can set by a plain JS object', () => {
      const testIdAttribute = 'not-data-testid'
      configure({testIdAttribute})

      expect(getConfig().testIdAttribute).toBe(testIdAttribute)
    })

    test('configure can set by a function', () => {
      // setup base option
      const baseTestIdAttribute = 'data-testid'
      configure({testIdAttribute: baseTestIdAttribute})

      const modifiedPrefix = 'modified-'
      configure(existingConfig => ({
        testIdAttribute: `${modifiedPrefix}${existingConfig.testIdAttribute}`,
      }))

      expect(getConfig().testIdAttribute).toBe(
        `${modifiedPrefix}${baseTestIdAttribute}`,
      )
    })
  })

  describe('RTL options', () => {
    test('configure can set by a plain JS object', () => {
      configure({reactStrictMode: true})

      expect(getConfig().reactStrictMode).toBe(true)
    })

    test('configure can set by a function', () => {
      configure(existingConfig => ({
        reactStrictMode: !existingConfig.reactStrictMode,
      }))

      expect(getConfig().reactStrictMode).toBe(true)
    })
  })

  test('configure can set DTL and RTL options at once', () => {
    const testIdAttribute = 'not-data-testid'
    configure({testIdAttribute, reactStrictMode: true})

    expect(getConfig().testIdAttribute).toBe(testIdAttribute)
    expect(getConfig().reactStrictMode).toBe(true)
  })
})


================================================
FILE: src/__tests__/debug.js
================================================
import * as React from 'react'
import {render, screen} from '../'

beforeEach(() => {
  jest.spyOn(console, 'log').mockImplementation(() => {})
})

afterEach(() => {
  console.log.mockRestore()
})

test('debug pretty prints the container', () => {
  const HelloWorld = () => <h1>Hello World</h1>
  const {debug} = render(<HelloWorld />)
  debug()
  expect(console.log).toHaveBeenCalledTimes(1)
  expect(console.log).toHaveBeenCalledWith(
    expect.stringContaining('Hello World'),
  )
})

test('debug pretty prints multiple containers', () => {
  const HelloWorld = () => (
    <>
      <h1 data-testid="testId">Hello World</h1>
      <h1 data-testid="testId">Hello World</h1>
    </>
  )
  const {debug} = render(<HelloWorld />)
  const multipleElements = screen.getAllByTestId('testId')
  debug(multipleElements)

  expect(console.log).toHaveBeenCalledTimes(2)
  expect(console.log).toHaveBeenCalledWith(
    expect.stringContaining('Hello World'),
  )
})

test('allows same arguments as prettyDOM', () => {
  const HelloWorld = () => <h1>Hello World</h1>
  const {debug, container} = render(<HelloWorld />)
  debug(container, 6, {highlight: false})
  expect(console.log).toHaveBeenCalledTimes(1)
  expect(console.log.mock.calls[0]).toMatchInlineSnapshot(`
    [
      <div>
    ...,
    ]
  `)
})

/*
eslint
  no-console: "off",
*/


================================================
FILE: src/__tests__/end-to-end.js
================================================
import * as React from 'react'
import {render, waitForElementToBeRemoved, screen, waitFor} from '../'

describe.each([
  ['real timers', () => jest.useRealTimers()],
  ['fake legacy timers', () => jest.useFakeTimers('legacy')],
  ['fake modern timers', () => jest.useFakeTimers('modern')],
])(
  'it waits for the data to be loaded in a macrotask using %s',
  (label, useTimers) => {
    beforeEach(() => {
      useTimers()
    })

    afterEach(() => {
      jest.useRealTimers()
    })

    const fetchAMessageInAMacrotask = () =>
      new Promise(resolve => {
        // we are using random timeout here to simulate a real-time example
        // of an async operation calling a callback at a non-deterministic time
        const randomTimeout = Math.floor(Math.random() * 100)
        setTimeout(() => {
          resolve({returnedMessage: 'Hello World'})
        }, randomTimeout)
      })

    function ComponentWithMacrotaskLoader() {
      const [state, setState] = React.useState({data: undefined, loading: true})
      React.useEffect(() => {
        let cancelled = false
        fetchAMessageInAMacrotask().then(data => {
          if (!cancelled) {
            setState({data, loading: false})
          }
        })

        return () => {
          cancelled = true
        }
      }, [])

      if (state.loading) {
        return <div>Loading...</div>
      }

      return (
        <div data-testid="message">
          Loaded this message: {state.data.returnedMessage}!
        </div>
      )
    }

    test('waitForElementToBeRemoved', async () => {
      render(<ComponentWithMacrotaskLoader />)
      const loading = () => screen.getByText('Loading...')
      await waitForElementToBeRemoved(loading)
      expect(screen.getByTestId('message')).toHaveTextContent(/Hello World/)
    })

    test('waitFor', async () => {
      render(<ComponentWithMacrotaskLoader />)
      await waitFor(() => screen.getByText(/Loading../))
      await waitFor(() => screen.getByText(/Loaded this message:/))
      expect(screen.getByTestId('message')).toHaveTextContent(/Hello World/)
    })

    test('findBy', async () => {
      render(<ComponentWithMacrotaskLoader />)
      await expect(screen.findByTestId('message')).resolves.toHaveTextContent(
        /Hello World/,
      )
    })
  },
)

describe.each([
  ['real timers', () => jest.useRealTimers()],
  ['fake legacy timers', () => jest.useFakeTimers('legacy')],
  ['fake modern timers', () => jest.useFakeTimers('modern')],
])(
  'it waits for the data to be loaded in many microtask using %s',
  (label, useTimers) => {
    beforeEach(() => {
      useTimers()
    })

    afterEach(() => {
      jest.useRealTimers()
    })

    const fetchAMessageInAMicrotask = () =>
      Promise.resolve({
        status: 200,
        json: () => Promise.resolve({title: 'Hello World'}),
      })

    function ComponentWithMicrotaskLoader() {
      const [fetchState, setFetchState] = React.useState({fetching: true})

      React.useEffect(() => {
        if (fetchState.fetching) {
          fetchAMessageInAMicrotask().then(res => {
            return (
              res
                .json()
                // By spec, the runtime can only yield back to the event loop once
                // the microtask queue is empty.
                // So we ensure that we actually wait for that as well before yielding back from `waitFor`.
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => data)
                .then(data => {
                  setFetchState({todo: data.title, fetching: false})
                })
            )
          })
        }
      }, [fetchState])

      if (fetchState.fetching) {
        return <p>Loading..</p>
      }

      return (
        <div data-testid="message">Loaded this message: {fetchState.todo}</div>
      )
    }

    test('waitForElementToBeRemoved', async () => {
      render(<ComponentWithMicrotaskLoader />)
      const loading = () => screen.getByText('Loading..')
      await waitForElementToBeRemoved(loading)
      expect(screen.getByTestId('message')).toHaveTextContent(/Hello World/)
    })

    test('waitFor', async () => {
      render(<ComponentWithMicrotaskLoader />)
      await waitFor(() => {
        screen.getByText('Loading..')
      })
      await waitFor(() => {
        screen.getByText(/Loaded this message:/)
      })
      expect(screen.getByTestId('message')).toHaveTextContent(/Hello World/)
    })

    test('findBy', async () => {
      render(<ComponentWithMicrotaskLoader />)
      await expect(screen.findByTestId('message')).resolves.toHaveTextContent(
        /Hello World/,
      )
    })
  },
)

describe.each([
  ['real timers', () => jest.useRealTimers()],
  ['fake legacy timers', () => jest.useFakeTimers('legacy')],
  ['fake modern timers', () => jest.useFakeTimers('modern')],
])(
  'it waits for the data to be loaded in a microtask using %s',
  (label, useTimers) => {
    beforeEach(() => {
      useTimers()
    })

    afterEach(() => {
      jest.useRealTimers()
    })

    const fetchAMessageInAMicrotask = () =>
      Promise.resolve({
        status: 200,
        json: () => Promise.resolve({title: 'Hello World'}),
      })

    function ComponentWithMicrotaskLoader() {
      const [fetchState, setFetchState] = React.useState({fetching: true})

      React.useEffect(() => {
        if (fetchState.fetching) {
          fetchAMessageInAMicrotask().then(res => {
            return res.json().then(data => {
              setFetchState({todo: data.title, fetching: false})
            })
          })
        }
      }, [fetchState])

      if (fetchState.fetching) {
        return <p>Loading..</p>
      }

      return (
        <div data-testid="message">Loaded this message: {fetchState.todo}</div>
      )
    }

    test('waitForElementToBeRemoved', async () => {
      render(<ComponentWithMicrotaskLoader />)
      const loading = () => screen.getByText('Loading..')
      await waitForElementToBeRemoved(loading)
      expect(screen.getByTestId('message')).toHaveTextContent(/Hello World/)
    })

    test('waitFor', async () => {
      render(<ComponentWithMicrotaskLoader />)
      await waitFor(() => {
        screen.getByText('Loading..')
      })
      await waitFor(() => {
        screen.getByText(/Loaded this message:/)
      })
      expect(screen.getByTestId('message')).toHaveTextContent(/Hello World/)
    })

    test('findBy', async () => {
      render(<ComponentWithMicrotaskLoader />)
      await expect(screen.findByTestId('message')).resolves.toHaveTextContent(
        /Hello World/,
      )
    })
  },
)


================================================
FILE: src/__tests__/error-handlers.js
================================================
/* eslint-disable jest/no-if */
/* eslint-disable jest/no-conditional-in-test */
/* eslint-disable jest/no-conditional-expect */
import * as React from 'react'
import {render, renderHook} from '../'

const isReact19 = React.version.startsWith('19.')

const testGateReact19 = isReact19 ? test : test.skip

test('render errors', () => {
  function Thrower() {
    throw new Error('Boom!')
  }

  if (isReact19) {
    expect(() => {
      render(<Thrower />)
    }).toThrow('Boom!')
  } else {
    expect(() => {
      expect(() => {
        render(<Thrower />)
      }).toThrow('Boom!')
    }).toErrorDev([
      'Error: Uncaught [Error: Boom!]',
      // React retries on error
      'Error: Uncaught [Error: Boom!]',
    ])
  }
})

test('onUncaughtError is not supported in render', () => {
  function Thrower() {
    throw new Error('Boom!')
  }
  const onUncaughtError = jest.fn(() => {})

  expect(() => {
    render(<Thrower />, {
      onUncaughtError(error, errorInfo) {
        console.log({error, errorInfo})
      },
    })
  }).toThrow(
    'onUncaughtError is not supported. The `render` call will already throw on uncaught errors.',
  )

  expect(onUncaughtError).toHaveBeenCalledTimes(0)
})

testGateReact19('onCaughtError is supported in render', () => {
  const thrownError = new Error('Boom!')
  const handleComponentDidCatch = jest.fn()
  const onCaughtError = jest.fn()
  class ErrorBoundary extends React.Component {
    state = {error: null}
    static getDerivedStateFromError(error) {
      return {error}
    }
    componentDidCatch(error, errorInfo) {
      handleComponentDidCatch(error, errorInfo)
    }
    render() {
      if (this.state.error) {
        return null
      }
      return this.props.children
    }
  }
  function Thrower() {
    throw thrownError
  }

  render(
    <ErrorBoundary>
      <Thrower />
    </ErrorBoundary>,
    {
      onCaughtError,
    },
  )

  expect(onCaughtError).toHaveBeenCalledWith(thrownError, {
    componentStack: expect.any(String),
    errorBoundary: expect.any(Object),
  })
})

test('onRecoverableError is supported in render', () => {
  const onRecoverableError = jest.fn()

  const container = document.createElement('div')
  container.innerHTML = '<div>server</div>'
  // We just hope we forwarded the callback correctly (which is guaranteed since we just pass it along)
  // Frankly, I'm too lazy to assert on React 18 hydration errors since they're a mess.
  // eslint-disable-next-line jest/no-conditional-in-test
  if (isReact19) {
    render(<div>client</div>, {
      container,
      hydrate: true,
      onRecoverableError,
    })
    expect(onRecoverableError).toHaveBeenCalledTimes(1)
  } else {
    expect(() => {
      render(<div>client</div>, {
        container,
        hydrate: true,
        onRecoverableError,
      })
    }).toErrorDev(['', ''], {withoutStack: 1})
    expect(onRecoverableError).toHaveBeenCalledTimes(2)
  }
})

test('onUncaughtError is not supported in renderHook', () => {
  function useThrower() {
    throw new Error('Boom!')
  }
  const onUncaughtError = jest.fn(() => {})

  expect(() => {
    renderHook(useThrower, {
      onUncaughtError(error, errorInfo) {
        console.log({error, errorInfo})
      },
    })
  }).toThrow(
    'onUncaughtError is not supported. The `render` call will already throw on uncaught errors.',
  )

  expect(onUncaughtError).toHaveBeenCalledTimes(0)
})

testGateReact19('onCaughtError is supported in renderHook', () => {
  const thrownError = new Error('Boom!')
  const handleComponentDidCatch = jest.fn()
  const onCaughtError = jest.fn()
  class ErrorBoundary extends React.Component {
    state = {error: null}
    static getDerivedStateFromError(error) {
      return {error}
    }
    componentDidCatch(error, errorInfo) {
      handleComponentDidCatch(error, errorInfo)
    }
    render() {
      if (this.state.error) {
        return null
      }
      return this.props.children
    }
  }
  function useThrower() {
    throw thrownError
  }

  renderHook(useThrower, {
    onCaughtError,
    wrapper: ErrorBoundary,
  })

  expect(onCaughtError).toHaveBeenCalledWith(thrownError, {
    componentStack: expect.any(String),
    errorBoundary: expect.any(Object),
  })
})

// Currently, there's no recoverable error without hydration.
// The option is still supported though.
test('onRecoverableError is supported in renderHook', () => {
  const onRecoverableError = jest.fn()

  renderHook(
    () => {
      // TODO: trigger recoverable error
    },
    {
      onRecoverableError,
    },
  )
})


================================================
FILE: src/__tests__/events.js
================================================
import * as React from 'react'
import {render, fireEvent} from '../'

const eventTypes = [
  {
    type: 'Clipboard',
    events: ['copy', 'paste'],
    elementType: 'input',
  },
  {
    type: 'Composition',
    events: ['compositionEnd', 'compositionStart', 'compositionUpdate'],
    elementType: 'input',
  },
  {
    type: 'Keyboard',
    events: ['keyDown', 'keyPress', 'keyUp'],
    elementType: 'input',
    init: {keyCode: 13},
  },
  {
    type: 'Focus',
    events: ['focus', 'blur'],
    elementType: 'input',
  },
  {
    type: 'Form',
    events: ['focus', 'blur'],
    elementType: 'input',
  },
  {
    type: 'Focus',
    events: ['input', 'invalid'],
    elementType: 'input',
  },
  {
    type: 'Focus',
    events: ['submit'],
    elementType: 'form',
  },
  {
    type: 'Mouse',
    events: [
      'click',
      'contextMenu',
      'doubleClick',
      'drag',
      'dragEnd',
      'dragEnter',
      'dragExit',
      'dragLeave',
      'dragOver',
      'dragStart',
      'drop',
      'mouseDown',
      'mouseEnter',
      'mouseLeave',
      'mouseMove',
      'mouseOut',
      'mouseOver',
      'mouseUp',
    ],
    elementType: 'button',
  },
  {
    type: 'Pointer',
    events: [
      'pointerOver',
      'pointerEnter',
      'pointerDown',
      'pointerMove',
      'pointerUp',
      'pointerCancel',
      'pointerOut',
      'pointerLeave',
      'gotPointerCapture',
      'lostPointerCapture',
    ],
    elementType: 'button',
  },
  {
    type: 'Selection',
    events: ['select'],
    elementType: 'input',
  },
  {
    type: 'Touch',
    events: ['touchCancel', 'touchEnd', 'touchMove', 'touchStart'],
    elementType: 'button',
  },
  {
    type: 'UI',
    events: ['scroll'],
    elementType: 'div',
  },
  {
    type: 'Wheel',
    events: ['wheel'],
    elementType: 'div',
  },
  {
    type: 'Media',
    events: [
      'abort',
      'canPlay',
      'canPlayThrough',
      'durationChange',
      'emptied',
      'encrypted',
      'ended',
      'error',
      'loadedData',
      'loadedMetadata',
      'loadStart',
      'pause',
      'play',
      'playing',
      'progress',
      'rateChange',
      'seeked',
      'seeking',
      'stalled',
      'suspend',
      'timeUpdate',
      'volumeChange',
      'waiting',
    ],
    elementType: 'video',
  },
  {
    type: 'Image',
    events: ['load', 'error'],
    elementType: 'img',
  },
  {
    type: 'Animation',
    events: ['animationStart', 'animationEnd', 'animationIteration'],
    elementType: 'div',
  },
  {
    type: 'Transition',
    events: ['transitionEnd'],
    elementType: 'div',
  },
]

eventTypes.forEach(({type, events, elementType, init}) => {
  describe(`${type} Events`, () => {
    events.forEach(eventName => {
      const propName = `on${eventName.charAt(0).toUpperCase()}${eventName.slice(
        1,
      )}`

      it(`triggers ${propName}`, () => {
        const ref = React.createRef()
        const spy = jest.fn()

        render(
          React.createElement(elementType, {
            [propName]: spy,
            ref,
          }),
        )

        fireEvent[eventName](ref.current, init)
        expect(spy).toHaveBeenCalledTimes(1)
      })
    })
  })
})

eventTypes.forEach(({type, events, elementType, init}) => {
  describe(`Native ${type} Events`, () => {
    events.forEach(eventName => {
      let nativeEventName = eventName.toLowerCase()

      // The doubleClick synthetic event maps to the dblclick native event
      if (nativeEventName === 'doubleclick') {
        nativeEventName = 'dblclick'
      }

      it(`triggers native ${nativeEventName}`, () => {
        const ref = React.createRef()
        const spy = jest.fn()
        const Element = elementType

        const NativeEventElement = () => {
          React.useEffect(() => {
            const element = ref.current
            element.addEventListener(nativeEventName, spy)
            return () => {
              element.removeEventListener(nativeEventName, spy)
            }
          })
          return <Element ref={ref} />
        }

        render(<NativeEventElement />)

        fireEvent[eventName](ref.current, init)
        expect(spy).toHaveBeenCalledTimes(1)
      })
    })
  })
})

test('onChange works', () => {
  const handleChange = jest.fn()
  const {
    container: {firstChild: input},
  } = render(<input onChange={handleChange} />)
  fireEvent.change(input, {target: {value: 'a'}})
  expect(handleChange).toHaveBeenCalledTimes(1)
})

test('calling `fireEvent` directly works too', () => {
  const handleEvent = jest.fn()
  const {
    container: {firstChild: button},
  } = render(<button onClick={handleEvent} />)
  fireEvent(
    button,
    new Event('MouseEvent', {
      bubbles: true,
      cancelable: true,
      button: 0,
    }),
  )
})

test('blur/focus bubbles in react', () => {
  const handleBlur = jest.fn()
  const handleBubbledBlur = jest.fn()
  const handleFocus = jest.fn()
  const handleBubbledFocus = jest.fn()
  const {container} = render(
    <div onBlur={handleBubbledBlur} onFocus={handleBubbledFocus}>
      <button onBlur={handleBlur} onFocus={handleFocus} />
    </div>,
  )
  const button = container.firstChild.firstChild

  fireEvent.focus(button)

  expect(handleBlur).toHaveBeenCalledTimes(0)
  expect(handleBubbledBlur).toHaveBeenCalledTimes(0)
  expect(handleFocus).toHaveBeenCalledTimes(1)
  expect(handleBubbledFocus).toHaveBeenCalledTimes(1)

  fireEvent.blur(button)

  expect(handleBlur).toHaveBeenCalledTimes(1)
  expect(handleBubbledBlur).toHaveBeenCalledTimes(1)
  expect(handleFocus).toHaveBeenCalledTimes(1)
  expect(handleBubbledFocus).toHaveBeenCalledTimes(1)
})


================================================
FILE: src/__tests__/multi-base.js
================================================
import * as React from 'react'
import {render} from '../'

// these are created once per test suite and reused for each case
let treeA, treeB
beforeAll(() => {
  treeA = document.createElement('div')
  treeB = document.createElement('div')
  document.body.appendChild(treeA)
  document.body.appendChild(treeB)
})

afterAll(() => {
  treeA.parentNode.removeChild(treeA)
  treeB.parentNode.removeChild(treeB)
})

test('baseElement isolates trees from one another', () => {
  const {getByText: getByTextInA} = render(<div>Jekyll</div>, {
    baseElement: treeA,
  })
  const {getByText: getByTextInB} = render(<div>Hyde</div>, {
    baseElement: treeB,
  })

  expect(() => getByTextInA('Jekyll')).not.toThrow(
    'Unable to find an element with the text: Jekyll.',
  )
  expect(() => getByTextInB('Jekyll')).toThrow(
    'Unable to find an element with the text: Jekyll.',
  )

  expect(() => getByTextInA('Hyde')).toThrow(
    'Unable to find an element with the text: Hyde.',
  )
  expect(() => getByTextInB('Hyde')).not.toThrow(
    'Unable to find an element with the text: Hyde.',
  )
})

// https://github.com/testing-library/eslint-plugin-testing-library/issues/188
/*
eslint
  testing-library/prefer-screen-queries: "off",
*/


================================================
FILE: src/__tests__/new-act.js
================================================
let asyncAct

jest.mock('react', () => {
  return {
    ...jest.requireActual('react'),
    act: cb => {
      return cb()
    },
  }
})

beforeEach(() => {
  jest.resetModules()
  asyncAct = require('../act-compat').default
  jest.spyOn(console, 'error').mockImplementation(() => {})
})

afterEach(() => {
  jest.restoreAllMocks()
})

test('async act works when it does not exist (older versions of react)', async () => {
  const callback = jest.fn()
  await asyncAct(async () => {
    await Promise.resolve()
    await callback()
  })
  expect(console.error).toHaveBeenCalledTimes(0)
  expect(callback).toHaveBeenCalledTimes(1)

  callback.mockClear()
  console.error.mockClear()

  await asyncAct(async () => {
    await Promise.resolve()
    await callback()
  })
  expect(console.error).toHaveBeenCalledTimes(0)
  expect(callback).toHaveBeenCalledTimes(1)
})

test('async act recovers from errors', async () => {
  try {
    await asyncAct(async () => {
      await null
      throw new Error('test error')
    })
  } catch (err) {
    console.error('call console.error')
  }
  expect(console.error).toHaveBeenCalledTimes(1)
  expect(console.error.mock.calls).toMatchInlineSnapshot(`
    [
      [
        call console.error,
      ],
    ]
  `)
})

test('async act recovers from sync errors', async () => {
  try {
    await asyncAct(() => {
      throw new Error('test error')
    })
  } catch (err) {
    console.error('call console.error')
  }
  expect(console.error).toHaveBeenCalledTimes(1)
  expect(console.error.mock.calls).toMatchInlineSnapshot(`
    [
      [
        call console.error,
      ],
    ]
  `)
})

/* eslint no-console:0 */


================================================
FILE: src/__tests__/render.js
================================================
import * as React from 'react'
import ReactDOM from 'react-dom'
import ReactDOMServer from 'react-dom/server'
import {fireEvent, render, screen, configure} from '../'

const isReact18 = React.version.startsWith('18.')
const isReact19 = React.version.startsWith('19.')

const testGateReact18 = isReact18 ? test : test.skip
const testGateReact19 = isReact19 ? test : test.skip

describe('render API', () => {
  let originalConfig
  beforeEach(() => {
    // Grab the existing configuration so we can restore
    // it at the end of the test
    configure(existingConfig => {
      originalConfig = existingConfig
      // Don't change the existing config
      return {}
    })
  })

  afterEach(() => {
    configure(originalConfig)
  })

  test('renders div into document', () => {
    const ref = React.createRef()
    const {container} = render(<div ref={ref} />)
    expect(container.firstChild).toBe(ref.current)
  })

  test('works great with react portals', () => {
    class MyPortal extends React.Component {
      constructor(...args) {
        super(...args)
        this.portalNode = document.createElement('div')
        this.portalNode.dataset.testid = 'my-portal'
      }
      componentDidMount() {
        document.body.appendChild(this.portalNode)
      }
      componentWillUnmount() {
        this.portalNode.parentNode.removeChild(this.portalNode)
      }
      render() {
        return ReactDOM.createPortal(
          <Greet greeting="Hello" subject="World" />,
          this.portalNode,
        )
      }
    }

    function Greet({greeting, subject}) {
      return (
        <div>
          <strong>
            {greeting} {subject}
          </strong>
        </div>
      )
    }

    const {unmount} = render(<MyPortal />)
    expect(screen.getByText('Hello World')).toBeInTheDocument()
    const portalNode = screen.getByTestId('my-portal')
    expect(portalNode).toBeInTheDocument()
    unmount()
    expect(portalNode).not.toBeInTheDocument()
  })

  test('returns baseElement which defaults to document.body', () => {
    const {baseElement} = render(<div />)
    expect(baseElement).toBe(document.body)
  })

  test('supports fragments', () => {
    class Test extends React.Component {
      render() {
        return (
          <div>
            <code>DocumentFragment</code> is pretty cool!
          </div>
        )
      }
    }

    const {asFragment} = render(<Test />)
    expect(asFragment()).toMatchSnapshot()
  })

  test('renders options.wrapper around node', () => {
    const WrapperComponent = ({children}) => (
      <div data-testid="wrapper">{children}</div>
    )

    const {container} = render(<div data-testid="inner" />, {
      wrapper: WrapperComponent,
    })

    expect(screen.getByTestId('wrapper')).toBeInTheDocument()
    expect(container.firstChild).toMatchInlineSnapshot(`
    <div
      data-testid=wrapper
    >
      <div
        data-testid=inner
      />
    </div>
  `)
  })

  test('renders options.wrapper around node when reactStrictMode is true', () => {
    configure({reactStrictMode: true})

    const WrapperComponent = ({children}) => (
      <div data-testid="wrapper">{children}</div>
    )
    const {container} = render(<div data-testid="inner" />, {
      wrapper: WrapperComponent,
    })

    expect(screen.getByTestId('wrapper')).toBeInTheDocument()
    expect(container.firstChild).toMatchInlineSnapshot(`
    <div
      data-testid=wrapper
    >
      <div
        data-testid=inner
      />
    </div>
  `)
  })

  test('renders twice when reactStrictMode is true', () => {
    configure({reactStrictMode: true})

    const spy = jest.fn()
    function Component() {
      spy()
      return null
    }

    render(<Component />)
    expect(spy).toHaveBeenCalledTimes(2)
  })

  test('flushes useEffect cleanup functions sync on unmount()', () => {
    const spy = jest.fn()
    function Component() {
      React.useEffect(() => spy, [])
      return null
    }
    const {unmount} = render(<Component />)
    expect(spy).toHaveBeenCalledTimes(0)

    unmount()

    expect(spy).toHaveBeenCalledTimes(1)
  })

  test('can be called multiple times on the same container', () => {
    const container = document.createElement('div')

    const {unmount} = render(<strong />, {container})

    expect(container).toContainHTML('<strong></strong>')

    render(<em />, {container})

    expect(container).toContainHTML('<em></em>')

    unmount()

    expect(container).toBeEmptyDOMElement()
  })

  test('hydrate will make the UI interactive', () => {
    function App() {
      const [clicked, handleClick] = React.useReducer(n => n + 1, 0)

      return (
        <button type="button" onClick={handleClick}>
          clicked:{clicked}
        </button>
      )
    }
    const ui = <App />
    const container = document.createElement('div')
    document.body.appendChild(container)
    container.innerHTML = ReactDOMServer.renderToString(ui)

    expect(container).toHaveTextContent('clicked:0')

    render(ui, {container, hydrate: true})

    fireEvent.click(container.querySelector('button'))

    expect(container).toHaveTextContent('clicked:1')
  })

  test('hydrate can have a wrapper', () => {
    const wrapperComponentMountEffect = jest.fn()
    function WrapperComponent({children}) {
      React.useEffect(() => {
        wrapperComponentMountEffect()
      })

      return children
    }
    const ui = <div />
    const container = document.createElement('div')
    document.body.appendChild(container)
    container.innerHTML = ReactDOMServer.renderToString(ui)

    render(ui, {container, hydrate: true, wrapper: WrapperComponent})

    expect(wrapperComponentMountEffect).toHaveBeenCalledTimes(1)
  })

  testGateReact18('legacyRoot uses legacy ReactDOM.render', () => {
    expect(() => {
      render(<div />, {legacyRoot: true})
    }).toErrorDev(
      [
        "Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot",
      ],
      {withoutStack: true},
    )
  })

  testGateReact19('legacyRoot throws', () => {
    expect(() => {
      render(<div />, {legacyRoot: true})
    }).toThrowErrorMatchingInlineSnapshot(
      `\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.`,
    )
  })

  testGateReact18('legacyRoot uses legacy ReactDOM.hydrate', () => {
    const ui = <div />
    const container = document.createElement('div')
    container.innerHTML = ReactDOMServer.renderToString(ui)
    expect(() => {
      render(ui, {container, hydrate: true, legacyRoot: true})
    }).toErrorDev(
      [
        "Warning: ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot",
      ],
      {withoutStack: true},
    )
  })

  testGateReact19('legacyRoot throws even with hydrate', () => {
    const ui = <div />
    const container = document.createElement('div')
    container.innerHTML = ReactDOMServer.renderToString(ui)
    expect(() => {
      render(ui, {container, hydrate: true, legacyRoot: true})
    }).toThrowErrorMatchingInlineSnapshot(
      `\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.`,
    )
  })

  test('reactStrictMode in renderOptions has precedence over config when rendering', () => {
    const wrapperComponentMountEffect = jest.fn()
    function WrapperComponent({children}) {
      React.useEffect(() => {
        wrapperComponentMountEffect()
      })

      return children
    }
    const ui = <div />
    configure({reactStrictMode: false})

    render(ui, {wrapper: WrapperComponent, reactStrictMode: true})

    expect(wrapperComponentMountEffect).toHaveBeenCalledTimes(2)
  })

  test('reactStrictMode in config is used when renderOptions does not specify reactStrictMode', () => {
    const wrapperComponentMountEffect = jest.fn()
    function WrapperComponent({children}) {
      React.useEffect(() => {
        wrapperComponentMountEffect()
      })

      return children
    }
    const ui = <div />
    configure({reactStrictMode: true})

    render(ui, {wrapper: WrapperComponent})

    expect(wrapperComponentMountEffect).toHaveBeenCalledTimes(2)
  })
})


================================================
FILE: src/__tests__/renderHook.js
================================================
import React, {useEffect} from 'react'
import {configure, renderHook} from '../pure'

const isReact18 = React.version.startsWith('18.')
const isReact19 = React.version.startsWith('19.')

const testGateReact18 = isReact18 ? test : test.skip
const testGateReact19 = isReact19 ? test : test.skip

test('gives committed result', () => {
  const {result} = renderHook(() => {
    const [state, setState] = React.useState(1)

    React.useEffect(() => {
      setState(2)
    }, [])

    return [state, setState]
  })

  expect(result.current).toEqual([2, expect.any(Function)])
})

test('allows rerendering', () => {
  const {result, rerender} = renderHook(
    ({branch}) => {
      const [left, setLeft] = React.useState('left')
      const [right, setRight] = React.useState('right')

      // eslint-disable-next-line jest/no-if, jest/no-conditional-in-test -- false-positive
      switch (branch) {
        case 'left':
          return [left, setLeft]
        case 'right':
          return [right, setRight]

        default:
          throw new Error(
            'No Props passed. This is a bug in the implementation',
          )
      }
    },
    {initialProps: {branch: 'left'}},
  )

  expect(result.current).toEqual(['left', expect.any(Function)])

  rerender({branch: 'right'})

  expect(result.current).toEqual(['right', expect.any(Function)])
})

test('allows wrapper components', async () => {
  const Context = React.createContext('default')
  function Wrapper({children}) {
    return <Context.Provider value="provided">{children}</Context.Provider>
  }
  const {result} = renderHook(
    () => {
      return React.useContext(Context)
    },
    {
      wrapper: Wrapper,
    },
  )

  expect(result.current).toEqual('provided')
})

testGateReact18('legacyRoot uses legacy ReactDOM.render', () => {
  const Context = React.createContext('default')
  function Wrapper({children}) {
    return <Context.Provider value="provided">{children}</Context.Provider>
  }
  let result
  expect(() => {
    result = renderHook(
      () => {
        return React.useContext(Context)
      },
      {
        wrapper: Wrapper,
        legacyRoot: true,
      },
    ).result
  }).toErrorDev(
    [
      "Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot",
    ],
    {withoutStack: true},
  )
  expect(result.current).toEqual('provided')
})

testGateReact19('legacyRoot throws', () => {
  const Context = React.createContext('default')
  function Wrapper({children}) {
    return <Context.Provider value="provided">{children}</Context.Provider>
  }
  expect(() => {
    renderHook(
      () => {
        return React.useContext(Context)
      },
      {
        wrapper: Wrapper,
        legacyRoot: true,
      },
    ).result
  }).toThrowErrorMatchingInlineSnapshot(
    `\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.`,
  )
})

describe('reactStrictMode', () => {
  let originalConfig
  beforeEach(() => {
    // Grab the existing configuration so we can restore
    // it at the end of the test
    configure(existingConfig => {
      originalConfig = existingConfig
      // Don't change the existing config
      return {}
    })
  })

  afterEach(() => {
    configure(originalConfig)
  })

  test('reactStrictMode in renderOptions has precedence over config when rendering', () => {
    const hookMountEffect = jest.fn()
    configure({reactStrictMode: false})

    renderHook(() => useEffect(() => hookMountEffect()), {
      reactStrictMode: true,
    })

    expect(hookMountEffect).toHaveBeenCalledTimes(2)
  })
})


================================================
FILE: src/__tests__/rerender.js
================================================
import * as React from 'react'
import {render, configure} from '../'

describe('rerender API', () => {
  let originalConfig
  beforeEach(() => {
    // Grab the existing configuration so we can restore
    // it at the end of the test
    configure(existingConfig => {
      originalConfig = existingConfig
      // Don't change the existing config
      return {}
    })
  })

  afterEach(() => {
    configure(originalConfig)
  })

  test('rerender will re-render the element', () => {
    const Greeting = props => <div>{props.message}</div>
    const {container, rerender} = render(<Greeting message="hi" />)
    expect(container.firstChild).toHaveTextContent('hi')
    rerender(<Greeting message="hey" />)
    expect(container.firstChild).toHaveTextContent('hey')
  })

  test('hydrate will not update props until next render', () => {
    const initialInputElement = document.createElement('input')
    const container = document.createElement('div')
    container.appendChild(initialInputElement)
    document.body.appendChild(container)

    const firstValue = 'hello'
    const {rerender} = render(
      <input value={firstValue} onChange={() => null} />,
      {
        container,
        hydrate: true,
      },
    )

    expect(initialInputElement).toHaveValue(firstValue)

    const secondValue = 'goodbye'
    rerender(<input value={secondValue} onChange={() => null} />)
    expect(initialInputElement).toHaveValue(secondValue)
  })

  test('re-renders options.wrapper around node when reactStrictMode is true', () => {
    configure({reactStrictMode: true})

    const WrapperComponent = ({children}) => (
      <div data-testid="wrapper">{children}</div>
    )
    const Greeting = props => <div>{props.message}</div>
    const {container, rerender} = render(<Greeting message="hi" />, {
      wrapper: WrapperComponent,
    })

    expect(container.firstChild).toMatchInlineSnapshot(`
    <div
      data-testid=wrapper
    >
      <div>
        hi
      </div>
    </div>
  `)

    rerender(<Greeting message="hey" />)
    expect(container.firstChild).toMatchInlineSnapshot(`
    <div
      data-testid=wrapper
    >
      <div>
        hey
      </div>
    </div>
  `)
  })

  test('re-renders twice when reactStrictMode is true', () => {
    configure({reactStrictMode: true})

    const spy = jest.fn()
    function Component() {
      spy()
      return null
    }

    const {rerender} = render(<Component />)
    expect(spy).toHaveBeenCalledTimes(2)

    spy.mockClear()
    rerender(<Component />)
    expect(spy).toHaveBeenCalledTimes(2)
  })
})


================================================
FILE: src/__tests__/stopwatch.js
================================================
import * as React from 'react'
import {render, fireEvent, screen} from '../'

class StopWatch extends React.Component {
  state = {lapse: 0, running: false}
  handleRunClick = () => {
    this.setState(state => {
      if (state.running) {
        clearInterval(this.timer)
      } else {
        const startTime = Date.now() - this.state.lapse
        this.timer = setInterval(() => {
          this.setState({lapse: Date.now() - startTime})
        })
      }
      return {running: !state.running}
    })
  }
  handleClearClick = () => {
    clearInterval(this.timer)
    this.setState({lapse: 0, running: false})
  }
  componentWillUnmount() {
    clearInterval(this.timer)
  }
  render() {
    const {lapse, running} = this.state
    return (
      <div>
 
Download .txt
gitextract_9zkgrm11/

├── .all-contributorsrc
├── .bundle.main.env
├── .bundle.pure.env
├── .codesandbox/
│   └── ci.json
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── Bug_Report.md
│   │   ├── Feature_Request.md
│   │   └── Question.md
│   ├── ISSUE_TEMPLATE.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       ├── release.yml
│       └── validate.yml
├── .gitignore
├── .huskyrc.js
├── .npmrc
├── .prettierignore
├── .prettierrc.js
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── codecov.yml
├── dont-cleanup-after-each.js
├── jest.config.js
├── other/
│   ├── MAINTAINING.md
│   ├── USERS.md
│   ├── design files/
│   │   ├── README.txt
│   │   └── cheat-sheet.afpub
│   └── manual-releases.md
├── package.json
├── pure.d.ts
├── pure.js
├── src/
│   ├── __mocks__/
│   │   └── axios.js
│   ├── __tests__/
│   │   ├── __snapshots__/
│   │   │   └── render.js.snap
│   │   ├── act.js
│   │   ├── auto-cleanup-skip.js
│   │   ├── auto-cleanup.js
│   │   ├── cleanup.js
│   │   ├── config.js
│   │   ├── debug.js
│   │   ├── end-to-end.js
│   │   ├── error-handlers.js
│   │   ├── events.js
│   │   ├── multi-base.js
│   │   ├── new-act.js
│   │   ├── render.js
│   │   ├── renderHook.js
│   │   ├── rerender.js
│   │   └── stopwatch.js
│   ├── act-compat.js
│   ├── config.js
│   ├── fire-event.js
│   ├── index.js
│   └── pure.js
├── tests/
│   ├── failOnUnexpectedConsoleCalls.js
│   ├── setup-env.js
│   ├── shouldIgnoreConsoleError.js
│   └── toWarnDev.js
├── tsconfig.json
└── types/
    ├── index.d.ts
    ├── pure.d.ts
    ├── test.tsx
    └── tsconfig.json
Download .txt
SYMBOL INDEX (99 symbols across 14 files)

FILE: src/__tests__/act.js
  function MyUselessComponent (line 6) | function MyUselessComponent() {
  function Counter (line 22) | function Counter() {
  function MyUselessComponent (line 39) | function MyUselessComponent() {

FILE: src/__tests__/cleanup.js
  class Test (line 8) | class Test extends React.Component {
    method componentWillUnmount (line 9) | componentWillUnmount() {
    method render (line 14) | render() {
  function Test (line 60) | function Test() {
    method componentWillUnmount (line 9) | componentWillUnmount() {
    method render (line 14) | render() {
  function Test (line 92) | function Test() {
    method componentWillUnmount (line 9) | componentWillUnmount() {
    method render (line 14) | render() {

FILE: src/__tests__/end-to-end.js
  function ComponentWithMacrotaskLoader (line 29) | function ComponentWithMacrotaskLoader() {
  function ComponentWithMicrotaskLoader (line 99) | function ComponentWithMicrotaskLoader() {
  function ComponentWithMicrotaskLoader (line 187) | function ComponentWithMicrotaskLoader() {

FILE: src/__tests__/error-handlers.js
  function Thrower (line 12) | function Thrower() {
  function Thrower (line 34) | function Thrower() {
  method onUncaughtError (line 41) | onUncaughtError(error, errorInfo) {
  class ErrorBoundary (line 56) | class ErrorBoundary extends React.Component {
    method getDerivedStateFromError (line 58) | static getDerivedStateFromError(error) {
    method componentDidCatch (line 61) | componentDidCatch(error, errorInfo) {
    method render (line 64) | render() {
    method getDerivedStateFromError (line 142) | static getDerivedStateFromError(error) {
    method componentDidCatch (line 145) | componentDidCatch(error, errorInfo) {
    method render (line 148) | render() {
  function Thrower (line 71) | function Thrower() {
  function useThrower (line 118) | function useThrower() {
  method onUncaughtError (line 125) | onUncaughtError(error, errorInfo) {
  class ErrorBoundary (line 140) | class ErrorBoundary extends React.Component {
    method getDerivedStateFromError (line 58) | static getDerivedStateFromError(error) {
    method componentDidCatch (line 61) | componentDidCatch(error, errorInfo) {
    method render (line 64) | render() {
    method getDerivedStateFromError (line 142) | static getDerivedStateFromError(error) {
    method componentDidCatch (line 145) | componentDidCatch(error, errorInfo) {
    method render (line 148) | render() {
  function useThrower (line 155) | function useThrower() {

FILE: src/__tests__/render.js
  class MyPortal (line 35) | class MyPortal extends React.Component {
    method constructor (line 36) | constructor(...args) {
    method componentDidMount (line 41) | componentDidMount() {
    method componentWillUnmount (line 44) | componentWillUnmount() {
    method render (line 47) | render() {
  function Greet (line 55) | function Greet({greeting, subject}) {
  class Test (line 79) | class Test extends React.Component {
    method render (line 80) | render() {
  function Component (line 140) | function Component() {
  function Component (line 151) | function Component() {
  function App (line 180) | function App() {
  function WrapperComponent (line 205) | function WrapperComponent({children}) {
  function WrapperComponent (line 268) | function WrapperComponent({children}) {
  function WrapperComponent (line 285) | function WrapperComponent({children}) {

FILE: src/__tests__/renderHook.js
  function Wrapper (line 55) | function Wrapper({children}) {
  function Wrapper (line 72) | function Wrapper({children}) {
  function Wrapper (line 97) | function Wrapper({children}) {

FILE: src/__tests__/rerender.js
  function Component (line 87) | function Component() {

FILE: src/__tests__/stopwatch.js
  class StopWatch (line 4) | class StopWatch extends React.Component {
    method componentWillUnmount (line 23) | componentWillUnmount() {
    method render (line 26) | render() {

FILE: src/act-compat.js
  function getGlobalThis (line 7) | function getGlobalThis() {
  function setIsReactActEnvironment (line 28) | function setIsReactActEnvironment(isReactActEnvironment) {
  function getIsReactActEnvironment (line 32) | function getIsReactActEnvironment() {
  function withGlobalActEnvironment (line 36) | function withGlobalActEnvironment(actImplementation) {

FILE: src/config.js
  function getConfig (line 10) | function getConfig() {
  function configure (line 17) | function configure(newConfig) {

FILE: src/pure.js
  function jestFakeTimersAreEnabled (line 16) | function jestFakeTimersAreEnabled() {
  function strictModeIfNeeded (line 80) | function strictModeIfNeeded(innerElement, reactStrictMode) {
  function wrapUiIfNeeded (line 86) | function wrapUiIfNeeded(innerElement, wrapperComponent) {
  function createConcurrentRoot (line 92) | function createConcurrentRoot(
  function createLegacyRoot (line 141) | function createLegacyRoot(container) {
  function renderRoot (line 155) | function renderRoot(
  function render (line 228) | function render(
  function cleanup (line 307) | function cleanup() {
  function renderHook (line 320) | function renderHook(renderCallback, options = {}) {

FILE: tests/toWarnDev.js
  function normalizeCodeLocInfo (line 35) | function normalizeCodeLocInfo(str) {

FILE: types/index.d.ts
  type Config (line 16) | interface Config extends ConfigDTL {
  type ConfigFn (line 20) | interface ConfigFn {
  type RenderResult (line 28) | type RenderResult<
  type BaseRenderOptions (line 50) | type BaseRenderOptions<
  type RendererableContainer (line 56) | type RendererableContainer = ReactDOMClient.Container
  type HydrateableContainer (line 57) | type HydrateableContainer = Parameters<typeof ReactDOMClient['hydrateRoo...
  type ClientRenderOptions (line 59) | interface ClientRenderOptions<
  type HydrateOptions (line 73) | interface HydrateOptions<
  type RenderOptions (line 87) | interface RenderOptions<
  type Omit (line 166) | type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
  type RenderHookResult (line 184) | interface RenderHookResult<Result, Props> {
  type BaseRenderHookOptions (line 207) | type BaseRenderHookOptions<
  type ClientRenderHookOptions (line 215) | interface ClientRenderHookOptions<
  type HydrateHookOptions (line 231) | interface HydrateHookOptions<
  type RenderHookOptions (line 246) | interface RenderHookOptions<

FILE: types/test.tsx
  function testRender (line 5) | async function testRender() {
  function testPureRender (line 24) | async function testPureRender() {
  function testRenderOptions (line 43) | function testRenderOptions() {
  function testSVGRenderOptions (line 52) | function testSVGRenderOptions() {
  function testFireEvent (line 62) | function testFireEvent() {
  function testConfigure (line 67) | function testConfigure() {
  function testGetConfig (line 81) | function testGetConfig() {
  function testDebug (line 89) | function testDebug() {
  function testScreen (line 99) | async function testScreen() {
  function testWaitFor (line 105) | async function testWaitFor() {
  function testQueries (line 111) | function testQueries() {
  function wrappedRender (line 127) | function wrappedRender(
  function wrappedRenderB (line 147) | function wrappedRenderB(
  function wrappedRenderC (line 160) | function wrappedRenderC(
  function wrappedRenderHook (line 178) | function wrappedRenderHook<Props>(
  function testBaseElement (line 196) | function testBaseElement() {
  function testRenderHook (line 215) | function testRenderHook() {
  function testRenderHookProps (line 227) | function testRenderHookProps() {
  function testContainer (line 240) | function testContainer() {
  function testErrorHandlers (line 266) | function testErrorHandlers() {
  type IfEquals (line 307) | type IfEquals<T, U, Yes = unknown, No = never> = (<G>() => G extends T
Condensed preview — 64 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (268K chars).
[
  {
    "path": ".all-contributorsrc",
    "chars": 36767,
    "preview": "{\n  \"projectName\": \"react-testing-library\",\n  \"projectOwner\": \"testing-library\",\n  \"repoType\": \"github\",\n  \"files\": [\n  "
  },
  {
    "path": ".bundle.main.env",
    "chars": 96,
    "preview": "BUILD_GLOBALS={\"react-dom/test-utils\":\"ReactTestUtils\",\"react\":\"React\",\"react-dom\":\"ReactDOM\"}\n\n"
  },
  {
    "path": ".bundle.pure.env",
    "chars": 53,
    "preview": "BUILD_FILENAME_SUFFIX=.pure\nBUILD_INPUT=src/pure.js\n\n"
  },
  {
    "path": ".codesandbox/ci.json",
    "chars": 130,
    "preview": "{\n  \"installCommand\": \"install:csb\",\n  \"sandboxes\": [\"new\", \"github/kentcdodds/react-testing-library-examples\"],\n  \"node"
  },
  {
    "path": ".gitattributes",
    "chars": 19,
    "preview": "* text=auto eol=lf\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Bug_Report.md",
    "chars": 2266,
    "preview": "---\nname: 🐛 Bug Report\nabout: Bugs, missing documentation, or unexpected behavior 🤔.\n---\n\n<!--\n\n* Please fill out this t"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Feature_Request.md",
    "chars": 1477,
    "preview": "---\nname: 💡 Feature Request\nabout: I have a suggestion (and might want to implement myself 🙂)!\n---\n\n<!--\n\nVote on featur"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Question.md",
    "chars": 808,
    "preview": "---\nname: ❓ Support Question\nabout: 🛑 If you have a question 💬, please check out our support channels!\n---\n\n------------"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "chars": 3060,
    "preview": "<!--\n\nHI! PLEASE STOP TO READ THIS!! IF YOU DO NOT FOLLOW THE INSTRUCTIONS, YOUR ISSUE\nWILL LIKELY BE CLOSED.\n\nThanks fo"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 1343,
    "preview": "<!--\nThanks for your interest in the project. Bugs filed and PRs submitted are appreciated!\n\nPlease make sure that you a"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 3473,
    "preview": "name: release\non:\n  push:\n    branches:\n      # Match SemVer major release branches\n      # e.g. \"12.x\" or \"8.x\"\n      -"
  },
  {
    "path": ".github/workflows/validate.yml",
    "chars": 1892,
    "preview": "name: validate\non:\n  pull_request:\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress:"
  },
  {
    "path": ".gitignore",
    "chars": 133,
    "preview": "node_modules\ncoverage\ndist\n.DS_Store\n\n# these cause more harm than good\n# when working with contributors\npackage-lock.js"
  },
  {
    "path": ".huskyrc.js",
    "chars": 46,
    "preview": "module.exports = require('kcd-scripts/husky')\n"
  },
  {
    "path": ".npmrc",
    "chars": 56,
    "preview": "registry=https://registry.npmjs.org/\npackage-lock=false\n"
  },
  {
    "path": ".prettierignore",
    "chars": 27,
    "preview": "node_modules\ncoverage\ndist\n"
  },
  {
    "path": ".prettierrc.js",
    "chars": 49,
    "preview": "module.exports = require('kcd-scripts/prettier')\n"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 187,
    "preview": "# CHANGELOG\n\nThe changelog is automatically updated using\n[semantic-release](https://github.com/semantic-release/semanti"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 5222,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2210,
    "preview": "# Contributing\n\nThanks for being willing to contribute!\n\n**Working on your first Pull Request?** You can learn how from "
  },
  {
    "path": "LICENSE",
    "chars": 1087,
    "preview": "The MIT License (MIT)\nCopyright (c) 2017-Present Kent C. Dodds\n\nPermission is hereby granted, free of charge, to any per"
  },
  {
    "path": "README.md",
    "chars": 78156,
    "preview": "<div align=\"center\">\n<h1>React Testing Library</h1>\n\n<a href=\"https://www.emojione.com/emoji/1f410\">\n  <img\n    height=\""
  },
  {
    "path": "codecov.yml",
    "chars": 387,
    "preview": "coverage:\n  status:\n    project:\n      default:\n        # basic\n        target: 100%\n        threshold: 0%\n        flags"
  },
  {
    "path": "dont-cleanup-after-each.js",
    "chars": 41,
    "preview": "process.env.RTL_SKIP_AUTO_CLEANUP = true\n"
  },
  {
    "path": "jest.config.js",
    "chars": 515,
    "preview": "const {jest: jestConfig} = require('kcd-scripts/config')\n\nmodule.exports = Object.assign(jestConfig, {\n  coverageThresho"
  },
  {
    "path": "other/MAINTAINING.md",
    "chars": 3289,
    "preview": "# Maintaining\n\nThis is documentation for maintainers of this project.\n\n## Code of Conduct\n\nPlease review, understand, an"
  },
  {
    "path": "other/USERS.md",
    "chars": 336,
    "preview": "# Users\n\nIf you or your company uses this project, add your name to this list! Eventually\nwe may have a website to showc"
  },
  {
    "path": "other/design files/README.txt",
    "chars": 295,
    "preview": "# Cheat sheet design\n\nThe cheat sheet document has been created using the desktop publishing software called Affinity Pu"
  },
  {
    "path": "other/manual-releases.md",
    "chars": 1313,
    "preview": "# manual-releases\n\nThis project has an automated release set up. So things are only released when\nthere are useful chang"
  },
  {
    "path": "package.json",
    "chars": 3408,
    "preview": "{\n  \"name\": \"@testing-library/react\",\n  \"version\": \"0.0.0-semantically-released\",\n  \"description\": \"Simple and complete "
  },
  {
    "path": "pure.d.ts",
    "chars": 29,
    "preview": "export * from './types/pure'\n"
  },
  {
    "path": "pure.js",
    "chars": 108,
    "preview": "// makes it so people can import from '@testing-library/react/pure'\nmodule.exports = require('./dist/pure')\n"
  },
  {
    "path": "src/__mocks__/axios.js",
    "chars": 319,
    "preview": "module.exports = {\n  get: jest.fn(() => Promise.resolve({data: {}})),\n}\n\n// Note:\n// For now we don't need any other met"
  },
  {
    "path": "src/__tests__/__snapshots__/render.js.snap",
    "chars": 217,
    "preview": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`render API supports fragments 1`] = `\n<DocumentFragment>\n  <div>\n  "
  },
  {
    "path": "src/__tests__/act.js",
    "chars": 1859,
    "preview": "import * as React from 'react'\nimport {act, render, fireEvent, screen} from '../'\n\ntest('render calls useEffect immediat"
  },
  {
    "path": "src/__tests__/auto-cleanup-skip.js",
    "chars": 419,
    "preview": "import * as React from 'react'\n\nlet render\nbeforeAll(() => {\n  process.env.RTL_SKIP_AUTO_CLEANUP = 'true'\n  const rtl = "
  },
  {
    "path": "src/__tests__/auto-cleanup.js",
    "chars": 329,
    "preview": "import * as React from 'react'\nimport {render} from '../'\n\n// This just verifies that by importing RTL in an\n// environm"
  },
  {
    "path": "src/__tests__/cleanup.js",
    "chars": 3023,
    "preview": "import * as React from 'react'\nimport {render, cleanup} from '../'\n\ntest('cleans up the document', () => {\n  const spy ="
  },
  {
    "path": "src/__tests__/config.js",
    "chars": 1840,
    "preview": "import {configure, getConfig} from '../'\n\ndescribe('configuration API', () => {\n  let originalConfig\n  beforeEach(() => "
  },
  {
    "path": "src/__tests__/debug.js",
    "chars": 1336,
    "preview": "import * as React from 'react'\nimport {render, screen} from '../'\n\nbeforeEach(() => {\n  jest.spyOn(console, 'log').mockI"
  },
  {
    "path": "src/__tests__/end-to-end.js",
    "chars": 6944,
    "preview": "import * as React from 'react'\nimport {render, waitForElementToBeRemoved, screen, waitFor} from '../'\n\ndescribe.each([\n "
  },
  {
    "path": "src/__tests__/error-handlers.js",
    "chars": 4561,
    "preview": "/* eslint-disable jest/no-if */\n/* eslint-disable jest/no-conditional-in-test */\n/* eslint-disable jest/no-conditional-e"
  },
  {
    "path": "src/__tests__/events.js",
    "chars": 5678,
    "preview": "import * as React from 'react'\nimport {render, fireEvent} from '../'\n\nconst eventTypes = [\n  {\n    type: 'Clipboard',\n  "
  },
  {
    "path": "src/__tests__/multi-base.js",
    "chars": 1233,
    "preview": "import * as React from 'react'\nimport {render} from '../'\n\n// these are created once per test suite and reused for each "
  },
  {
    "path": "src/__tests__/new-act.js",
    "chars": 1653,
    "preview": "let asyncAct\n\njest.mock('react', () => {\n  return {\n    ...jest.requireActual('react'),\n    act: cb => {\n      return cb"
  },
  {
    "path": "src/__tests__/render.js",
    "chars": 8772,
    "preview": "import * as React from 'react'\nimport ReactDOM from 'react-dom'\nimport ReactDOMServer from 'react-dom/server'\nimport {fi"
  },
  {
    "path": "src/__tests__/renderHook.js",
    "chars": 3917,
    "preview": "import React, {useEffect} from 'react'\nimport {configure, renderHook} from '../pure'\n\nconst isReact18 = React.version.st"
  },
  {
    "path": "src/__tests__/rerender.js",
    "chars": 2576,
    "preview": "import * as React from 'react'\nimport {render, configure} from '../'\n\ndescribe('rerender API', () => {\n  let originalCon"
  },
  {
    "path": "src/__tests__/stopwatch.js",
    "chars": 1637,
    "preview": "import * as React from 'react'\nimport {render, fireEvent, screen} from '../'\n\nclass StopWatch extends React.Component {\n"
  },
  {
    "path": "src/act-compat.js",
    "chars": 2527,
    "preview": "import * as React from 'react'\nimport * as DeprecatedReactTestUtils from 'react-dom/test-utils'\n\nconst reactAct =\n  type"
  },
  {
    "path": "src/config.js",
    "chars": 631,
    "preview": "import {\n  getConfig as getConfigDTL,\n  configure as configureDTL,\n} from '@testing-library/dom'\n\nlet configForRTL = {\n "
  },
  {
    "path": "src/fire-event.js",
    "chars": 2217,
    "preview": "import {fireEvent as dtlFireEvent} from '@testing-library/dom'\n\n// react-testing-library's version of fireEvent will cal"
  },
  {
    "path": "src/index.js",
    "chars": 1434,
    "preview": "import {getIsReactActEnvironment, setReactActEnvironment} from './act-compat'\nimport {cleanup} from './pure'\n\n// if we'r"
  },
  {
    "path": "src/pure.js",
    "chars": 9958,
    "preview": "import * as React from 'react'\nimport ReactDOM from 'react-dom'\nimport * as ReactDOMClient from 'react-dom/client'\nimpor"
  },
  {
    "path": "tests/failOnUnexpectedConsoleCalls.js",
    "chars": 4261,
    "preview": "// Fork of https://github.com/facebook/react/blob/513417d6951fa3ff5729302b7990b84604b11afa/scripts/jest/setupTests.js#L7"
  },
  {
    "path": "tests/setup-env.js",
    "chars": 357,
    "preview": "import '@testing-library/jest-dom/extend-expect'\nimport './failOnUnexpectedConsoleCalls'\nimport {TextEncoder} from 'util"
  },
  {
    "path": "tests/shouldIgnoreConsoleError.js",
    "chars": 2154,
    "preview": "// Fork of https://github.com/facebook/react/blob/513417d6951fa3ff5729302b7990b84604b11afa/scripts/jest/shouldIgnoreCons"
  },
  {
    "path": "tests/toWarnDev.js",
    "chars": 11839,
    "preview": "// Fork of https://github.com/facebook/react/blob/513417d6951fa3ff5729302b7990b84604b11afa/scripts/jest/matchers/toWarnD"
  },
  {
    "path": "tsconfig.json",
    "chars": 1085,
    "preview": "{\n  // Visit https://aka.ms/tsconfig to read more about this file\n  \"compilerOptions\": {\n    // File Layout\n    // \"root"
  },
  {
    "path": "types/index.d.ts",
    "chars": 10408,
    "preview": "// TypeScript Version: 3.8\nimport * as ReactDOMClient from 'react-dom/client'\nimport {\n  queries,\n  Queries,\n  BoundFunc"
  },
  {
    "path": "types/pure.d.ts",
    "chars": 19,
    "preview": "export * from './'\n"
  },
  {
    "path": "types/test.tsx",
    "chars": 9679,
    "preview": "import * as React from 'react'\nimport {render, fireEvent, screen, waitFor, renderHook} from '.'\nimport * as pure from '."
  },
  {
    "path": "types/tsconfig.json",
    "chars": 182,
    "preview": "{\n  \"extends\": \"../node_modules/kcd-scripts/shared-tsconfig.json\",\n  \"compilerOptions\": {\n    \"exactOptionalPropertyType"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the testing-library/react-testing-library GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 64 files (245.5 KB), approximately 67.9k tokens, and a symbol index with 99 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!