Uh oh!
There was an error while loading. Please reload this page.
Fix issue 323 prototypes tests - #325
Conversation
test(the-typeinator): add index.test.js for syntactic-sugar step
- Use jest.fn() instead of manual array for cleaner assertions - Add missing machine objects to fix test failures - Support TEST_SOLUTIONS environment variable
- Add comprehensive test suite for Robot and Humanoid classes - Implement conditional test skipping for educational workflow - Tests skip when index.js is empty (learner mode) - Tests run with TEST_SOLUTIONS=true (validation mode) - Cover class construction, inheritance, and method functionality - Include console.log mocking for announce/charge/move methods - Validate power management and error handling logic
JoshuaKGoldberg
commented
Sep 9, 2025
By the way @Felsilva15, have you been writing these PR descriptions -or the PRs themselves?- largely with AI? They're very verbose. There's no need to explicitly call out every single detail in them, or end with this kind of high-level overview. 🙂 |
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
Looks like this also has the step 1 change from #321? See: #321 (comment)
felipe-hadrian
commented
Sep 9, 2025
@JoshuaKGoldberg - yes, I am using AI for the description since it has a template, and I thought it had to follow a specific format every single time. I’ll keep this in mind for the next PRs; I really appreciate the feedback! |
PR Checklist
Overview
Add comprehensive test suite for the prototypes-to-classes exercise in the-typeinator project.
This PR adds the missing
index.test.jsfile that was requested in issue #323. The test file includes:index.jsis empty (learner mode), allowing students to start with clean filesTEST_SOLUTIONS=trueis set (validation mode)The implementation follows the same pattern established in other test files in the repository, ensuring consistency with the educational workflow.