{"id":19305923,"url":"https://github.com/dracudev/s3-testing-js","last_synced_at":"2025-02-24T02:26:57.944Z","repository":{"id":261234856,"uuid":"883695266","full_name":"dracudev/S3-Testing-JS","owner":"dracudev","description":"Analyzing a movie dataset with JS methods, plus unit tests for reliability.","archived":false,"fork":false,"pushed_at":"2024-11-29T23:00:09.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T00:42:34.139Z","etag":null,"topics":["array-methods","dataset","es6","it-academy","javascript","jest","unit-testing"],"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/dracudev.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":"2024-11-05T12:17:50.000Z","updated_at":"2024-11-29T23:00:12.000Z","dependencies_parsed_at":"2024-11-07T12:20:35.781Z","dependency_job_id":null,"html_url":"https://github.com/dracudev/S3-Testing-JS","commit_stats":null,"previous_names":["dracudev/s3-js-testing","dracudev/s3-testing-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracudev%2FS3-Testing-JS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracudev%2FS3-Testing-JS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracudev%2FS3-Testing-JS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dracudev%2FS3-Testing-JS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dracudev","download_url":"https://codeload.github.com/dracudev/S3-Testing-JS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232659179,"owners_count":18557021,"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":["array-methods","dataset","es6","it-academy","javascript","jest","unit-testing"],"created_at":"2024-11-10T00:03:05.637Z","updated_at":"2025-01-06T00:42:36.851Z","avatar_url":"https://github.com/dracudev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S3 Movie Data Processing\n\n## 📄 Description\n\nThis sprint focuses on developing functions to manage and analyze a dataset of movies, including tasks like extracting director data, calculating average ratings, and sorting movies. The project emphasizes the practice of essential JavaScript methods such as `map`, `reduce`, and `filter`, as well as creating unit tests to verify functionality.\n\n### Objectives\n\n- Practice using array methods like `map`, `reduce`, and `filter`.\n- Learn to create unit tests.\n- Manipulate a dataset for targeted information extraction.\n\n\u003cbr\u003e\n\n## 📐 Project Structure\n\n### ⭐ Level 1\n\n- **Exercise 1**: Implement the `getAllDirectors()` function, which returns an array containing only the directors of the movies. Use `.map()` to extract the director field from each movie object. This function should not render the result; it should return the array.\n\n- **Exercise 2**: Create the `getMoviesFromDirector()` function, which receives a director's name as a parameter and returns an array of movies they directed. Use `.filter()` to isolate movies by the specified director.\n\n- **Exercise 3**: Implement the `moviesAverageOfDirector()` function, which calculates the average rating of a director's movies. This function should accept an array of movies and return the average rating with two decimal precision. Use `.reduce()` to compute the average.\n\n- **Exercise 4**: Develop a function to sort movies alphabetically by title and return only the first 20 titles. Review the tests in `films.spec.js` to verify whether you need to return full movie objects or only titles.\n\n- **Exercise 5**: Create a function to sort movies by release year. If multiple movies share the same year, they should be further sorted alphabetically by title.\n\n- **Exercise 6**: Implement functionality for users to view the average rating of movies within a specified genre. Begin by writing a unit test for this feature in `tests/films.spec.js`. Then, create a function that accepts a genre as input and calculates the average rating for that genre.\n\n### ⭐⭐ Level 2\n\n- **Exercise 7**: Convert movie durations from the \"hours and minutes\" format to a single integer in minutes. For example, a movie duration of \"2h 34min\" should be converted to `154`.\n\n### ⭐⭐⭐ Level 3\n\n- **Exercise 8**: Implement a function to identify the highest-rated movie of each year. This function should accept a year as input and return the top-rated movie for that year.\n\n\u003cbr\u003e\n\n## 💻 Technologies Used\n\n- JavaScript (ES6)\n- Jest.js (for testing)\n\n\u003cbr\u003e\n\n## 📋 Requirements\n\n- **JavaScript ES6** or higher\n- **Jest.js** for running unit tests\n\n\u003cbr\u003e\n\n## 🛠️ Installation\n\n1. Clone this repository: \n  ```bash\n  git clone https://github.com/dracudev/S3-Testing-JS.git\n  ```\n2. Navigate to the project directory: \n  ```bash\n  cd S3-Testing-JS\n  ```\n3. Open the project in your text editor and start coding.\n  ```bash\n  code .\n  ```\n\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n## ▶️ Execution\n\n1. Run the tests to validate functionality. This will automatically generate a test-results.html file showing test outcomes.\n  ```bash\n  npm install\n  npm run test:watch\n  ```\n\n2. Open test-results.html in a browser (recommended to use the Live Server plugin in Visual Studio Code for auto-refresh).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdracudev%2Fs3-testing-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdracudev%2Fs3-testing-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdracudev%2Fs3-testing-js/lists"}