{"id":26070300,"url":"https://github.com/fresult/tdd-book-store","last_synced_at":"2026-04-22T13:33:26.250Z","repository":{"id":230555421,"uuid":"779532720","full_name":"fResult/tdd-book-store","owner":"fResult","description":"Practice to TDD mindset","archived":false,"fork":false,"pushed_at":"2024-04-08T12:21:11.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T23:15:01.727Z","etag":null,"topics":["tdd","type","vitest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/fResult.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}},"created_at":"2024-03-30T04:27:46.000Z","updated_at":"2024-03-30T11:21:32.000Z","dependencies_parsed_at":"2024-04-07T09:27:44.936Z","dependency_job_id":"c66aefb3-c3b5-480c-bc12-e22b2c82c1ba","html_url":"https://github.com/fResult/tdd-book-store","commit_stats":null,"previous_names":["fresult/tdd-book-store"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fResult/tdd-book-store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2Ftdd-book-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2Ftdd-book-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2Ftdd-book-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2Ftdd-book-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fResult","download_url":"https://codeload.github.com/fResult/tdd-book-store/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2Ftdd-book-store/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32139414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T13:27:12.868Z","status":"ssl_error","status_checked_at":"2026-04-22T13:26:44.791Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["tdd","type","vitest"],"created_at":"2025-03-08T23:15:52.400Z","updated_at":"2026-04-22T13:33:26.235Z","avatar_url":"https://github.com/fResult.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TDD Book Store\n\nPractice to TDD mindset\n\n## Requirements\n\nThink like Minimum Viable Function\n\n### Use `success` as boolean and `reason` as string approach\n\n- [x] 1) It should return **remaining books** if the book to borrow is existed in the store\n- [x] 2) It should return the `success` as false and **original book collection** when borrow the book which isn't existed in the book store\n- [x] 3) In addition to the behavior described in requirement 1, it should also return a `success` as true\n- [x] 4) In addition to the behavior described in requirement 2, it should also return the `reason` as \"There is no book [«book_name»] in this store\"\n- [x] 5) In addition to the behavior described in requirement 3, it should also return `amount` as **original amount** - 1\n- [x] 6) In addition to the behavior described in requirement 2, it should also return `amount` as **original amount** and a `reason` as \"The book [«book_name»] is out of stock\" when that book's `amount` is `0`\n\n### Use throwing an error and a `reason` as an **error message** approach\n\n- [x] 1) It should return **remaining books** if the book to borrow is existed in the store\n- [x] 2) It should throw an **error** when borrow the book which isn't existed in the book store\n- [x] 3) In addition to the behavior described in requirement 2, it should also attach an **error message** as \"There is no book [«book_name»] in this store\"\n- [x] 4) In addition to the behavior described in requirement 3, it should change the **error type** from a normal `Error` to be a `BookNotFoundError`\n- [x] 5) In addition to the behavior described in requirement 1, it should also return an `amount` as **original amount** - 1\n- [x] 6) It should throw a `BookOutOfStockError`, with the **error message** as \"The book [«book_name»] is out of stock\" when that book's `amount` is `0`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffresult%2Ftdd-book-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffresult%2Ftdd-book-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffresult%2Ftdd-book-store/lists"}