{"_id":"@ehyland/cypress-testing-library","_rev":"1-4d3c3ae6a04702aa38799dd25673ce58","name":"@ehyland/cypress-testing-library","dist-tags":{"latest":"0.0.0-fix-types"},"versions":{"0.0.0-fix-types":{"name":"@ehyland/cypress-testing-library","version":"0.0.0-fix-types","description":"Simple and complete custom Cypress commands and utilities that encourage good testing practices.","main":"dist/index.js","typings":"typings","types":"typings","engines":{"node":"> 6"},"scripts":{"add-contributor":"kcd-scripts contributors add","build":"kcd-scripts build","lint":"kcd-scripts lint","test":"npm-run-all --parallel test:unit test:cypress","test:unit":"kcd-scripts test --no-watch","test:unit:watch":"kcd-scripts test","test:cypress:serve":"serve --listen 13370 ./cypress/fixtures/test-app","test:cypress:run":"wait-port --timeout 10000 localhost:13370 && cypress run","test:cypress:open":"cypress open","test:cypress":"npm-run-all --silent --parallel --race test:cypress:serve test:cypress:run","test:cypress:dev":"npm-run-all --silent --parallel --race test:cypress:serve test:cypress:open","validate":"kcd-scripts validate build,lint,test","setup":"npm install && npm run validate -s","precommit":"kcd-scripts precommit","dtslint":"dtslint typings"},"keywords":["testing","cypress","ui","dom","integration","functional","end-to-end","e2e"],"author":{"name":"Kent C. Dodds","email":"kent@doddsfamily.us","url":"http://kentcdodds.com/"},"license":"MIT","dependencies":{"dom-testing-library":"^3.8.0"},"devDependencies":{"cypress":"^3.0.1","dtslint":"^0.3.0","kcd-scripts":"^0.37.0","npm-run-all":"^4.1.2","serve":"^10.0.0","wait-port":"^0.2.2"},"peerDependencies":{"cypress":"^2.1.0 || ^3.0.0"},"eslintConfig":{"extends":"./node_modules/kcd-scripts/eslint.js","rules":{"import/prefer-default-export":"off","import/no-unassigned-import":"off"}},"eslintIgnore":["node_modules","coverage","dist"],"repository":{"type":"git","url":"git+https://github.com/kentcdodds/cypress-testing-library.git"},"bugs":{"url":"https://github.com/kentcdodds/cypress-testing-library/issues"},"homepage":"https://github.com/kentcdodds/cypress-testing-library#readme","gitHead":"d530690a2780bf49f2ae3827cb8c04222817e686","_id":"@ehyland/cypress-testing-library@0.0.0-fix-types","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"ehyland","email":"ehyland90@gmail.com"},"dist":{"integrity":"sha512-65QyKT6UXPUXanNonQdjvjlkna8f5vL0qqjciwicWbR6FLBFRfn1fhA8R7049iwWQ0x1lpHxgZfZjiWrJ05q0Q==","shasum":"ce78301cbdbf988577afb8b4c62155cecde7b8e9","tarball":"https://registry.npmjs.org/@ehyland/cypress-testing-library/-/cypress-testing-library-0.0.0-fix-types.tgz","fileCount":11,"unpackedSize":16019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb1p0eCRA9TVsSAnZWagAAz0oQAJCtRPZ1SmXeZJJYpUzJ\nh51g/0yQGN+iLxS0eNuO0NSrmD+2TgHJqr/nqpTwLoTl3yqnvjalyT1CA4VT\nKcUzderSGfMh1Wl3seRASW1+yHxVGA/m4ga4+lppMg1P7M6os44NdzJq7xm1\nUQ7TnbBPS4fRy+EiavMPQASMXKf/Qk6DVzcEZiI08ksGy69UVHvRPA8h3FMV\nH/x1uZW3CJBwaaYvYtvZ5DPhW7sFIOQrpFVJ5jhZWEL7FAzEX8fsUAdbrDws\nnJulu/KoqD41SrXEdKMNBVrWMiMwc7+KK8mTqpZObwQ5tz+5JaogPvX0VxRl\n8KcrBzoxMhjVGZJEPZeg+J+z/qSq4AVNt9pVt9JqYjT2BzOgTOZjwq4ogRsK\nlFiaEwS+IL51HrbOkn9zaT5yCHm6Qwqkbh/bXG/YzfmdpvUsQkC73fEY2QKE\nwZ0mEal7t+kUdNQu8tJQg5fhJsH8XawvsDXdRENNXC+n/uSRJ9Zux046EbEO\n6nr2GdbbkWLSCrC3PEmWumiRMCfdaXDmyUP/jm6GWogDITxXCMsaoLwXGVgR\nu1v/8qWMwsR4DbAezth9C00dYJNrS0a+fjugbv/Z8b4Aj7xXY/+df4+sTg0N\n2yCPNHlYJtKVyr8zo4BAfwQAeON+MLldrI3s5oYGCnvtlcutEtR5bRvvH4O7\n0CFg\r\n=XJzY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICsJzygDxbYMwqfnrDrAzLKNavGwVvLayA8WcpoFMvlFAiBL2KGNJQ1+4OauxlDGmtyiFia1kvLY57lusZhqkTTTLw=="}]},"maintainers":[{"name":"ehyland","email":"ehyland90@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cypress-testing-library_0.0.0-fix-types_1540791582144_0.18500678729503428"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-29T05:39:41.969Z","0.0.0-fix-types":"2018-10-29T05:39:42.272Z","modified":"2022-04-05T06:58:44.847Z"},"maintainers":[{"name":"ehyland","email":"ehyland90@gmail.com"}],"description":"Simple and complete custom Cypress commands and utilities that encourage good testing practices.","homepage":"https://github.com/kentcdodds/cypress-testing-library#readme","keywords":["testing","cypress","ui","dom","integration","functional","end-to-end","e2e"],"repository":{"type":"git","url":"git+https://github.com/kentcdodds/cypress-testing-library.git"},"author":{"name":"Kent C. Dodds","email":"kent@doddsfamily.us","url":"http://kentcdodds.com/"},"bugs":{"url":"https://github.com/kentcdodds/cypress-testing-library/issues"},"license":"MIT","readme":"<div align=\"center\">\n<h1>cypress-testing-library</h1>\n\n<a href=\"https://www.emojione.com/emoji/1f405\">\n<img height=\"80\" width=\"80\" alt=\"tiger\" src=\"https://raw.githubusercontent.com/kentcdodds/cypress-testing-library/master/other/tiger.png\" />\n</a>\n\n<p>Simple and complete custom Cypress commands and utilities that encourage good testing practices.</p>\n</div>\n\n<hr />\n\n[![Build Status][build-badge]][build]\n[![Code Coverage][coverage-badge]][coverage]\n[![version][version-badge]][package]\n[![downloads][downloads-badge]][npmtrends]\n[![MIT License][license-badge]][license]\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)\n[![PRs Welcome][prs-badge]][prs]\n[![Code of Conduct][coc-badge]][coc]\n\n[![Watch on GitHub][github-watch-badge]][github-watch]\n[![Star on GitHub][github-star-badge]][github-star]\n[![Tweet][twitter-badge]][twitter]\n\n<div align=\"center\">\n<a href=\"https://testingjavascript.com\">\n<img width=\"500\" alt=\"TestingJavaScript.com Learn the smart, efficient way to test any JavaScript application.\" src=\"https://raw.githubusercontent.com/kentcdodds/cypress-testing-library/master/other/testingjavascript.jpg\" />\n</a>\n</div>\n\n## The problem\n\nYou want to use [`dom-testing-library`][dom-testing-library] methods in your [Cypress][cypress] tests.\n\n## This solution\n\nThis allows you to use all the useful [`dom-testing-library`][dom-testing-library] methods in your tests.\n\n## Table of Contents\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Other Solutions](#other-solutions)\n- [Contributors](#contributors)\n- [LICENSE](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\nThis module is distributed via [npm][npm] which is bundled with [node][node] and\nshould be installed as one of your project's `devDependencies`:\n\n```\nnpm install --save-dev cypress-testing-library\n```\n\n## Usage\n\n`cypress-testing-library` extends Cypress' `cy` command.\n\nAdd this line to your project's `cypress/support/commands.js`:\n\n```\nimport 'cypress-testing-library/add-commands';\n```\n\nYou can now use all of `dom-testing-library`'s `getBy`, `getAllBy`, `queryBy` and `queryAllBy` commands. [See `dom-testing-library` repo for reference](https://github.com/kentcdodds/dom-testing-library#usage)\n\nTo show some simple examples (from [cypress/integration/commands.spec.js](cypress/integration/commands.spec.js)):\n\n```javascript\ncy.getAllByText('Jackie Chan').click()\ncy.queryByText('Button Text').should('exist')\ncy.queryByText('Non-existing Button Text').should('not.exist')\ncy.queryByLabelText('Label text', {timeout: 7000}).should('exist')\ncy.get('form').within(() => {\n  cy.getByText('Button Text').should('exist')\n})\ncy.get('form').then(subject => {\n  cy.getByText('Button Text', {container: subject}).should('exist')\n})\n```\n\n`cypress-testing-library` supports both jQuery elements and DOM nodes. This is necessary because Cypress uses jQuery elements, while `dom-testing-library` expects DOM nodes. When you pass a jQuery element as `container`, it will get the first DOM node from the collection and use that as the `container` parameter for the `dom-testing-library` functions.\n\n## Other Solutions\n\nI'm not aware of any, if you are please [make a pull request][prs] and add it\nhere!\n\n## Contributors\n\nThanks goes to these people ([emoji key][emojis]):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore -->\n| [<img src=\"https://avatars.githubusercontent.com/u/1500684?v=3\" width=\"100px;\"/><br /><sub><b>Kent C. Dodds</b></sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds \"Code\") [📖](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds \"Documentation\") [🚇](#infra-kentcdodds \"Infrastructure (Hosting, Build-Tools, etc)\") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds \"Tests\") | [<img src=\"https://avatars2.githubusercontent.com/u/498274?v=4\" width=\"100px;\"/><br /><sub><b>Ivan Babak</b></sub>](https://sompylasar.github.io)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=sompylasar \"Code\") [🤔](#ideas-sompylasar \"Ideas, Planning, & Feedback\") | [<img src=\"https://avatars1.githubusercontent.com/u/4002543?v=4\" width=\"100px;\"/><br /><sub><b>Łukasz Gandecki</b></sub>](http://team.thebrain.pro)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=lgandecki \"Code\") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=lgandecki \"Tests\") | [<img src=\"https://avatars1.githubusercontent.com/u/25429764?v=4\" width=\"100px;\"/><br /><sub><b>Peter Kamps</b></sub>](https://github.com/npeterkamps)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps \"Code\") [📖](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps \"Documentation\") [🤔](#ideas-npeterkamps \"Ideas, Planning, & Feedback\") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps \"Tests\") |\n| :---: | :---: | :---: | :---: |\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors][all-contributors] specification.\nContributions of any kind welcome!\n\n## LICENSE\n\nMIT\n\n[npm]: https://www.npmjs.com/\n[node]: https://nodejs.org\n[build-badge]: https://img.shields.io/travis/kentcdodds/cypress-testing-library.svg?style=flat-square\n[build]: https://travis-ci.org/kentcdodds/cypress-testing-library\n[coverage-badge]: https://img.shields.io/codecov/c/github/kentcdodds/cypress-testing-library.svg?style=flat-square\n[coverage]: https://codecov.io/github/kentcdodds/cypress-testing-library\n[version-badge]: https://img.shields.io/npm/v/cypress-testing-library.svg?style=flat-square\n[package]: https://www.npmjs.com/package/cypress-testing-library\n[downloads-badge]: https://img.shields.io/npm/dm/cypress-testing-library.svg?style=flat-square\n[npmtrends]: http://www.npmtrends.com/cypress-testing-library\n[license-badge]: https://img.shields.io/npm/l/cypress-testing-library.svg?style=flat-square\n[license]: https://github.com/kentcdodds/cypress-testing-library/blob/master/LICENSE\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n[donate-badge]: https://img.shields.io/badge/$-support-green.svg?style=flat-square\n[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square\n[coc]: https://github.com/kentcdodds/cypress-testing-library/blob/master/other/CODE_OF_CONDUCT.md\n[github-watch-badge]: https://img.shields.io/github/watchers/kentcdodds/cypress-testing-library.svg?style=social\n[github-watch]: https://github.com/kentcdodds/cypress-testing-library/watchers\n[github-star-badge]: https://img.shields.io/github/stars/kentcdodds/cypress-testing-library.svg?style=social\n[github-star]: https://github.com/kentcdodds/cypress-testing-library/stargazers\n[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20cypress-testing-library%20by%20%40kentcdodds%20https%3A%2F%2Fgithub.com%2Fkentcdodds%2Fcypress-testing-library%20%F0%9F%91%8D\n[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/kentcdodds/cypress-testing-library.svg?style=social\n[emojis]: https://github.com/kentcdodds/all-contributors#emoji-key\n[all-contributors]: https://github.com/kentcdodds/all-contributors\n[dom-testing-library]: https://github.com/kentcdodds/dom-testing-library\n[cypress]: https://www.cypress.io/\n","readmeFilename":"README.md"}