A junior developer has just accomplished a task suspicously fast...and went for lunch. There are now unit tests breaking on the build server and only you have the skills to fix it.
You should
- Fix the broken unit test
- Make sure there is adequate test coverage.
- Make sure all code is clean and follows best practices
- src\app\app.component.html - how could we organize the html better?
- src\app\app.component.scss - how can we make this more re-usable?
- src\app\app.component.ts - what would happen if hasGraduated ran more then once? Is there a way to centralize this method?
- src\app\app.component.ts - there is a code smell here, could we improve the readability of hasGraduated? Which SOLID principle could we apply here? Give it a try and implement
- src\app\app.component.spec.ts -
it('should have creditsunit test should have at least 1 graduate, can you fix the code to make the test pass?
All joking aside, there is no need to finish this in the span of a lunch hour.
The test is so you can show us what clean code looks like. Clean it up as best you can!
You will be joining a team that believes in SOLID Design principles. We favour declarative over imperative programming.
Submissions that follow these principles will be favored since you will fit right in with the current team. If there is a part of the test that blocks you from completing it, then put some comments explaining why it was blocking, and what you would have done if the obstacle was removed.
Good Luck!
- Node v18