{"id":15552196,"url":"https://github.com/bahmutov/was-tdd","last_synced_at":"2025-09-29T01:30:37.993Z","repository":{"id":34047784,"uuid":"167286027","full_name":"bahmutov/was-tdd","owner":"bahmutov","description":"Checks a branch that claims to fix a bug using TDD principle","archived":false,"fork":false,"pushed_at":"2024-09-17T23:28:05.000Z","size":106,"stargazers_count":3,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-02T14:12:02.670Z","etag":null,"topics":["cli","tdd","test","testing"],"latest_commit_sha":null,"homepage":null,"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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-24T02:06:40.000Z","updated_at":"2022-03-04T04:08:15.000Z","dependencies_parsed_at":"2024-01-13T22:14:02.935Z","dependency_job_id":"917cc892-6f21-46ea-9168-21e71f024b09","html_url":"https://github.com/bahmutov/was-tdd","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fwas-tdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fwas-tdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fwas-tdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fwas-tdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmutov","download_url":"https://codeload.github.com/bahmutov/was-tdd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234577136,"owners_count":18855267,"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":["cli","tdd","test","testing"],"created_at":"2024-10-02T14:11:50.347Z","updated_at":"2025-09-29T01:30:32.730Z","avatar_url":"https://github.com/bahmutov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# was-tdd\n\u003e Checks a branch that claims to fix a bug using TDD principle\n\n[![NPM][npm-icon] ][npm-url]\n\n[![Build status][ci-image] ][ci-url]\n[![semantic-release][semantic-image] ][semantic-url]\n[![renovate-app badge][renovate-badge]][renovate-app]\n\n## Use\n\nImagine someone claims that branch `fix-add` fixes a bug in branch `master` and was written in TDD style:\n\n- first the developer wrote a failing test that shows the problem\n- then the developer updated the code and the test is now passing\n\nIs it true? Or is the developer just saying this?\n\nNow you can easily check if the fix was really TDD.\n\n```\nnpx was-tdd --branch fix-add --against master\n```\n\n## How it works\n\nThis little CLI utility does a few steps\n\n- finds all files that changed in the branch `fix-add` against the branch `master`\n- creates a new temp branch from `master`\n- checks out changed **spec** files from branch `fix-add` (using regular expression)\n- runs the tests using `npm test` command\n  * the tests should FAIL\n- checks out all files from `fix-add` branch\n- runs the tests again\n  * now the tests should PASS\n\nIf these steps complete - then the fix was written using TDD practice.\n\n## Warning\n\nThe tests could break for other reasons of course - like the code and the tests were refactored. You still need a human to understand what the change was. But this tool at least gives you some initial sense.\n\n### Small print\n\nAuthor: Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt; \u0026copy; 2019\n\n* [@bahmutov](https://twitter.com/bahmutov)\n* [glebbahmutov.com](https://glebbahmutov.com)\n* [blog](https://glebbahmutov.com/blog)\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/was-tdd/issues) on Github\n\n## MIT License\n\nCopyright (c) 2019 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\n[npm-icon]: https://nodei.co/npm/was-tdd.svg?downloads=true\n[npm-url]: https://npmjs.org/package/was-tdd\n[ci-image]: https://travis-ci.org/bahmutov/was-tdd.svg?branch=master\n[ci-url]: https://travis-ci.org/bahmutov/was-tdd\n[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n[semantic-url]: https://github.com/semantic-release/semantic-release\n[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg\n[renovate-app]: https://renovateapp.com/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fwas-tdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmutov%2Fwas-tdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fwas-tdd/lists"}