{"id":21307434,"url":"https://github.com/jdegand/testing-input-output","last_synced_at":"2026-05-08T11:33:10.634Z","repository":{"id":233468763,"uuid":"689502810","full_name":"jdegand/testing-input-output","owner":"jdegand","description":"Angular Challenges #19 Input / Output Testing","archived":false,"fork":false,"pushed_at":"2023-09-10T02:32:06.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T19:49:11.377Z","etag":null,"topics":["angular","angular-challenges","cypress","jest","testing-library"],"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/jdegand.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":"2023-09-10T02:30:25.000Z","updated_at":"2023-09-13T00:34:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"41259569-94be-4a69-b2ad-9cdc998109d8","html_url":"https://github.com/jdegand/testing-input-output","commit_stats":null,"previous_names":["jdegand/testing-input-output"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jdegand/testing-input-output","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdegand%2Ftesting-input-output","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdegand%2Ftesting-input-output/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdegand%2Ftesting-input-output/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdegand%2Ftesting-input-output/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdegand","download_url":"https://codeload.github.com/jdegand/testing-input-output/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdegand%2Ftesting-input-output/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32778551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["angular","angular-challenges","cypress","jest","testing-library"],"created_at":"2024-11-21T16:32:00.687Z","updated_at":"2026-05-08T11:33:10.598Z","avatar_url":"https://github.com/jdegand.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Testing Input Output\n\n[Angular Challenges](https://github.com/tomalaforge/angular-challenges) #19 Input / Output Testing\n\n## Built With\n\n- [Angular](https://angular.io)\n- [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.\n- [Testing Library Angular](https://testing-library.com/docs/angular-testing-library/intro)\n- [Jest](https://jestjs.io)\n- [Cypress](https://www.cypress.io)\n\n## Directions\n\nWe have a small counter application that increment or decrement a number.\n\nThe goal is to test CounterComponent with Testing library and Cypress.\n\n## Thoughts\n\n- I tried to use componentProperties for the output test but I don't think it is possible.\n- You get errors `Property 'toHaveTextContent' does not exist on type 'Assertion'` etc after you write cypress tests.  \n- Both tests still work -\u003e seems like vscode gets confused ? \n\n## How to Use\n\n```bash \n\ngit clone https://github.com/jdegand/testing-input-output.git\n\n# cd into the directory\nnpm install\n\n# Jest \n\nnpm test\n\n# Jest with Coverage\n\nnpm run test:coverage\n\n# Cypress\n\nnpm run cypress:open\n```\n\n## Useful Resources\n\n- [Angular Testing Library](https://testing-library.com/docs/angular-testing-library/examples) - angular testing library counter example\n- [YouTube](https://www.youtube.com/watch?v=c57llB8QA2E) - I bet you can write an Angular UNIT TEST after this video\n- [Stack Overflow](https://stackoverflow.com/questions/58976251/checking-text-appears-inside-an-element-using-react-testing-library) - checking text appears inside an element using react testing library\n- [Stack Overflow](https://stackoverflow.com/questions/49096093/how-do-i-test-a-jest-console-log) - how do i test a jest console.log\n- [Stack Overflow](https://stackoverflow.com/questions/46817783/angular-unit-test-that-a-components-output-is-not-emitted) - angular unit test that a component's output is not emitted\n- [Stack Overflow](https://stackoverflow.com/questions/53775176/how-to-unit-test-an-angular-output) - how to unit test an angular output\n- [Stack Overflow](https://stackoverflow.com/questions/42302114/testing-that-a-component-method-calls-another-method) - testing that a component method calls another method\n- [Github](https://github.com/testing-library/angular-testing-library/blob/main/apps/example-app/src/app/examples/02-input-output.spec.ts) - input output spec example from angular testing library\n- [Blog](https://chrisboakes.com/mocking-javascript-class-inner-functions-with-jest/) - mocking javascript class inner functions with jest\n- [Cypress Docs](https://docs.cypress.io/guides/component-testing/angular/api) - angular api\n- [Cypress Docs](https://docs.cypress.io/guides/component-testing/angular/examples) - angular examples","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdegand%2Ftesting-input-output","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdegand%2Ftesting-input-output","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdegand%2Ftesting-input-output/lists"}