{"id":15552243,"url":"https://github.com/bahmutov/cypress-catch-async-tests","last_synced_at":"2025-09-28T23:31:29.132Z","repository":{"id":59047792,"uuid":"534607838","full_name":"bahmutov/cypress-catch-async-tests","owner":"bahmutov","description":"Prevents accidentally passing an async function as the test callback in Cypress","archived":false,"fork":false,"pushed_at":"2022-09-09T11:51:50.000Z","size":174,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T20:13:37.396Z","etag":null,"topics":["cypress-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bahmutov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-09T11:04:51.000Z","updated_at":"2022-09-09T11:24:09.000Z","dependencies_parsed_at":"2022-09-11T06:51:59.721Z","dependency_job_id":null,"html_url":"https://github.com/bahmutov/cypress-catch-async-tests","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-catch-async-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-catch-async-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-catch-async-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-catch-async-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmutov","download_url":"https://codeload.github.com/bahmutov/cypress-catch-async-tests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234570384,"owners_count":18854156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress-plugin"],"created_at":"2024-10-02T14:13:23.962Z","updated_at":"2025-09-28T23:31:28.717Z","avatar_url":"https://github.com/bahmutov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cypress-catch-async-tests ![cypress version](https://img.shields.io/badge/cypress-10.7.0-brightgreen) [![ci](https://github.com/bahmutov/cypress-catch-async-tests/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/cypress-catch-async-tests/actions/workflows/ci.yml)\n\n\u003e Prevents accidentally passing an async function as the test callback in Cypress\n\n- 📺 [Catch Accidental Async Callbacks In Cypress Tests](https://youtu.be/3RyqCv_TlE8)\n\n## Install\n\nAdd this plugin as a dev dependency\n\n```shell\n$ npm i -D cypress-catch-async-tests\n# or if using Yarn\n$ yarn add -D cypress-catch-async-tests\n```\n\n## Use\n\nImport this plugin from your support file or spec file before any tests\n\n```js\nimport 'cypress-catch-async-tests'\n\nit('works', () =\u003e { ... })\n\n// this test will generate an error right away\nit('async callback', async () =\u003e { ... })\n```\n\n![Async callback error](./images/error.png)\n\n## See also\n\n- example repo [cypress-catch-async-tests-example](https://github.com/bahmutov/cypress-catch-async-tests-example)\n- Cypress issue [#4742](https://github.com/cypress-io/cypress/issues/4742)\n- [Visualize Cypress Command Queue](https://glebbahmutov.com/blog/visualize-cypress-command-queue/) blog post\n\n## Small print\n\nAuthor: Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt; \u0026copy; 2022\n\n- [@bahmutov](https://twitter.com/bahmutov)\n- [glebbahmutov.com](https://glebbahmutov.com)\n- [blog](https://glebbahmutov.com/blog)\n- [videos](https://www.youtube.com/glebbahmutov)\n- [presentations](https://slides.com/bahmutov)\n- [cypress.tips](https://cypress.tips)\n- [Cypress Tips \u0026 Tricks Newsletter](https://cypresstips.substack.com/)\n- [my Cypress courses](https://cypress.tips/courses)\n\nLicense: MIT - do anything with the code, but don't blame me if it does not work.\n\nSupport: if you find any problems with this module, email / tweet /\n[open issue](https://github.com/bahmutov/cypress-catch-async-tests/issues) on Github\n\n## MIT License\n\nCopyright (c) 2022 Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt;\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-catch-async-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmutov%2Fcypress-catch-async-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-catch-async-tests/lists"}