{"id":15026774,"url":"https://github.com/erickwendel/semana-javascript-expert06","last_synced_at":"2025-05-16T12:09:04.760Z","repository":{"id":43098639,"uuid":"466572543","full_name":"ErickWendel/semana-javascript-expert06","owner":"ErickWendel","description":"JS Expert Week 6.0 Classes - Spotify Radio","archived":false,"fork":false,"pushed_at":"2022-05-24T13:59:28.000Z","size":2703,"stargazers_count":1279,"open_issues_count":0,"forks_count":202,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-10-29T22:31:54.371Z","etag":null,"topics":["audio","e2e","javascript","jest","nodejs","sox","spotify","streams","tests","unit"],"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/ErickWendel.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-03-05T21:33:09.000Z","updated_at":"2024-10-23T13:34:20.000Z","dependencies_parsed_at":"2022-09-07T19:51:38.027Z","dependency_job_id":null,"html_url":"https://github.com/ErickWendel/semana-javascript-expert06","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Fsemana-javascript-expert06","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Fsemana-javascript-expert06/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Fsemana-javascript-expert06/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Fsemana-javascript-expert06/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErickWendel","download_url":"https://codeload.github.com/ErickWendel/semana-javascript-expert06/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254527087,"owners_count":22085918,"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":["audio","e2e","javascript","jest","nodejs","sox","spotify","streams","tests","unit"],"created_at":"2024-09-24T20:05:04.502Z","updated_at":"2025-05-16T12:09:04.716Z","avatar_url":"https://github.com/ErickWendel.png","language":"JavaScript","readme":"# Spotify Radio - JS Expert Week 6.0\n\nWelcome to the sixth Javascript Expert Week. This is the starting code to start our journey.\n\nTag this project with a star 🌟\n\n## Preview\n\n\u003cimg src=\"./prints/demo.png\" /\u003e\n\n## Checklist Features\n\n- Web API\n    - [ ] Must achieve 100% code coverage in tests\n    - [ ] Must have end to end tests validating all API routes\n    - [ ] Must deliver static files as Node.js Streams\n    - [ ] Must deliver music files as a Node.js Stream\n    - [ ] Given a disconnected user it should not break the API\n    - [ ] Even if multiple commands are fired at the same time, it should not break the API\n    - [ ] If an unexpected error occurs, the API should keep working\n    - [ ] The project needs to run on Linux, Mac and Windows environments\n\n- Web App\n    - Client\n        - [ ] Must play the broadcast\n        - [ ] Shouldn't pause if any effects are added\n    - Controller\n        - [ ] Must achieve 100% code coverage in tests\n        - [ ] Must be able to start or stop a broadcast\n        - [ ] Must send commands to add audio effects to a stream\n\n## Tasks per class\n\n- Lesson 01: Cover service and route layers with unit tests and achieve 100% code coverage\n- Lesson 02: Maintain 100% code coverage and implement e2e tests for the entire API\n- Lesson 03: implement unit tests for the frontend and maintain 100% code coverage\n- **PLUS**:\n    - [ ] provide a new effect\n        - [ ] add a new button on the controller\n        - [ ] add a new effect sound to the `audios/fx/` folder\n        - [ ] repost on heroku\n## Source code for classes and solving challenges\n- [Class01](./classes/class01/)\n    - [desafio-resolvido](./aulas/aula01-desafio-resolvido) and [page with 100% code coverage](https://erickwendel.github.io/semana-javascript-expert06/aulas/aula01-desafio-resolvido/coverage/lcov-report/index.html)\n- [Class02](./classes/class02/)\n    - [desafio-resolvido](./aulas/aula02-desafio-resolvido) and [page with 100% code coverage](https://erickwendel.github.io/semana-javascript-expert06/aulas/aula02-desafio-resolvido/coverage/lcov-report/index.html)\n- [Class03](./classes/class03/)\n    - [desafio-resolvido](./aulas/aula03-desafio-resolvido) and [page with 100% code coverage](https://erickwendel.github.io/semana-javascript-expert06/aulas/aula03-desafio-resolvido/coverage/lcov-report/index.html)\n\n### Credits to the sources I've used on the demos\n\n#### Streaming\n- [English Conversation](https://youtu.be/ytmMipczEI8)\n\n#### Effects\n- [Applause](https://youtu.be/mMn_aYpzpG0)\n- [Applause Audience](https://youtu.be/3IC76o_lhFw)\n- [Boo](https://youtu.be/rYAQN11a2Dc)\n- [Fart](https://youtu.be/4PnUfYhbDDM)\n- [Laugh](https://youtu.be/TZ90IUrMNCo)\n## FAQ\n- `NODE_OPTIONS` is not a system recognized command, what to do?\n    - If you are on Windows, the way to create environment variables is different. You must use the word `set` before the command.\n    - Ex: ` \"test\": \"set NODE_OPTIONS=--experimental-vm-modules \u0026\u0026 npx jest --runInBand\",`\n\n- I ran `npm test` but nothing happens, what to do?\n    - Check your Node.js version. We are using version 17. Go to [node.js website](https://nodejs.org) and download the latest version.\n\n- `jest.spyOn` - when we try to use `function.name` (something like `stream.pipe.name`), it says the instance is undefined\n    - In this case, use the value as a string: `jest.spyOn(stream, \"pipe\").mockReturnValue`\n- Challenge 01 impossible to complete 100% code coverage because [testUtil.js](./aulas/aula01/tests/unit/_util/testUtil.js) is not being fully used\n    - Add the following code snippet to the first line of the [testUtil.js](./aulas/aula01/tests/unit/_util/testUtil.js) file: `/* istanbul ignore file */` . This will make jest ignore this file and complete 100%.\n    - Important: this change will only serve to complete this first and/or second challenge, in the last class, we will not need to ignore this file since we will use all the functions\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferickwendel%2Fsemana-javascript-expert06","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferickwendel%2Fsemana-javascript-expert06","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferickwendel%2Fsemana-javascript-expert06/lists"}