{"id":19760153,"url":"https://github.com/videsk/backend-jr-hiring","last_synced_at":"2026-06-09T06:31:49.535Z","repository":{"id":117346432,"uuid":"434024878","full_name":"videsk/backend-jr-hiring","owner":"videsk","description":"Backend developer hiring tests","archived":false,"fork":false,"pushed_at":"2021-12-03T14:45:45.000Z","size":107,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T09:48:16.436Z","etag":null,"topics":["backend","hiring"],"latest_commit_sha":null,"homepage":"https://videsk.io","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/videsk.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":"2021-12-02T00:01:37.000Z","updated_at":"2022-01-17T02:06:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e5c54a0-aa33-4a96-818e-6414291bdf57","html_url":"https://github.com/videsk/backend-jr-hiring","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/videsk/backend-jr-hiring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videsk%2Fbackend-jr-hiring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videsk%2Fbackend-jr-hiring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videsk%2Fbackend-jr-hiring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videsk%2Fbackend-jr-hiring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/videsk","download_url":"https://codeload.github.com/videsk/backend-jr-hiring/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videsk%2Fbackend-jr-hiring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34095243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["backend","hiring"],"created_at":"2024-11-12T03:35:44.768Z","updated_at":"2026-06-09T06:31:49.518Z","avatar_url":"https://github.com/videsk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backend Developer Exam\n\nHi dev! This is a test for devs want to apply to the backend developer position on Videsk.\n\n**With this test expects you will learn about Test-Driven Development, how transform synchronous operations to asynchronous, catch errors, setup environments and check how works automated test and deployment as DevOps.**\n\n```\nFollow the deadlines and rules where you got this link.\n```\n\nIf you're a recruiter you're welcome to fork this repository and use it in your recruitment process, but with author reference.\n\nIn case you're a curious developer, use it as a homework to practice Javascript for backend, best practices between stages, and deployment workflows.\n\n# Rules ☝\n\n1. **Not fork!** Clone this repository. 🚨\n2. **Never** push directly to the `main` branch. 🚨\n3. Work over files `test1.js`,`test2.js` and `test3.js`. 🚨\n3. **Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)** 🚨\n3. Don\\'t modify nothing in `test/`, `utils/` and `.github/` folders.\n4. All exported functions on test files are required, don't modify this. You will need to work inside the functions.\n\n# Deadlines\n\nSend in a maximum of 5 days, if you exceed this deadline, you will not be selected, but you may receive a feedback of your code. Be responsible.\n\n# How to send\n\nThe way to send the test to Videsk for review is really easy, but pay attention.\n\nThis repository contains a GitHub Action on `.github/workflows/main.yml`, where will be trigger automatically on every pull request and push on main, staging and develop.\n\nThe way to send us your test completed is creating a new pull request from `develop` -\u003e `staging` -\u003e `main`. Only in `main` will send to us the notification test is complete, but remember this is like send to production, so check your code before merge to `main`.\n\n# Steps\n\nRead the following steps to send a correct test.\n\n## Setup\n\n```\nThis test needs latest Node LTS installed on your machine.\n```\n\n1. Add secrets `VIDESK_HIRING_API` and `VIDESK_DEV_TOKEN` we sent you to this repository exactly as we write you.\n2. Create branches `main`, `staging` and `develop`.\n3. Add protection to the `main` branch with `Require status checks to pass before merging` in repository settings. In case of `status checks` set the action `test`.\n\nNeed looks like this:\n\n![image info](./screenshot-branch-protection.png)\n\nThis will ensure you that the test will pass before send to `main`.\n\n---\n\n## Tests\n\nYou can test locally with `mocha`. To run test can write in terminal:\n\n- Test 1: `npm run test:1`\n- Test 2: `npm run test:2`\n- Test 3: `npm run test:3`\n- Test only mandatory: `npm run test:mandatory`\n- Test all: `npm run test:all` (including bonus)\n\nYou can choose the test you want to send us adding to repository secrets `VIDESK_HIRING_TEST` as `mandatory` or `all`. **By default, is `mandatory`.**\n\n**We suggest you use debug of your IDE or code editor.**\n\n## Test 1\n\nIn this test `./test1.js` we have a function that receive the argument `server`, which have an events' listener:\n\n```js\nserver.on(eventName, callback);\n```\n\nThis test is failing because the `Test1` is not returning the argument value of the callback. So, you will need to find a way to return the callback argument value, understanding the event `name` could be invoked after a few seconds.\n\nIn short, you will need to deal with:\n\n- [ ] `server.on(...)` method does not return value so you can't `const name = server.on(...)`\n- [ ] `server.on('name', callback)` could be invoked after a `N` seconds.\n\n---\n\n## Test 2\n\nHere is a context of classic querying to database in MongoDB, where can return different results and sometimes errors.\n\nYour job is:\n\n- [ ] When the result of querying to database is empty array throw an `NotFound` error.\n- [ ] When the result of querying to database is an unexpected error throw an `ServerError` error.\n\nBe sure the errors were not crash the app, does mean **if you don't catch the error correctly the server will be stopped**. We catch correctly in the test, but **in the real world, that's equal to server down!**\n\n---\n\n## Test 3 (Optional Bonus)\n\nThis is a complete optional test! It's more complex than the previous tests because is focused on create a server as a class, with method could allow to us querying on database.\n\nYou will learn about how works in the most simple way querying of MongoDB, handle exceptions, returns the correct errors and create a class.\n\n1. Create a constructor to store the db\n2. Create methods\n    - [ ] `find`\n    - [ ] `findOne`\n    - [ ] `updateOne`\n    \nHere you will need to use `sift` to receive the query to filter on db. [Check more info of sift](https://github.com/crcn/sift.js).\n\nThe `db` is a object with keys which are \"collections\", every collection contains an Array with objects are equals to documents in MongoDB.\n\nYou can base on the file `./test/utils/server.js`, specifically on the method `query()`.\n\nThe \"models\" are in the file `./test/utils/db.js`.\n\n```js\n// find method\nconst query = { createdAt: 1638397184005 };\nserver.find(collectionName, query); // Expected output [{...}, {...}, ...]\n\n// findOne method\nserver.findOne(collectionName, documentId); // Expected output {...}\n\n// updateOne method\nserver.updateOne(collectionName, documentId, dataToUpdate); // Expected output {...}\n```\n\n3. Based on the previous test `Test2` apply the same logic of `NotFound` error when the array is empty or element to update not exist.\n\n# Built with?\n\n- NodeJS\n- Faker.js\n- Sift.js\n- Mocha\n- Chai\n\n---\n\n# Bugs\n\nIf you detect a bug, please create a new issue in the original repository, we resolve it at the fastest possible.\n\n# License\nMIT, developed by Videsk with ❤️.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvidesk%2Fbackend-jr-hiring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvidesk%2Fbackend-jr-hiring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvidesk%2Fbackend-jr-hiring/lists"}