Assigned to: Groups 1 & 2
Estimated time: 15-20 minutes
Difficulty: ⭐ Easy
The filterByType function works perfectly, but it only has ONE test. Add more tests to make sure it handles all cases.
- ✅ Read the existing test for fire type
- ➕ Add test: "should return only water type Pokemon"
- ➕ Add test: "should return empty array when type doesn't exist"
- ➕ Add test: "should return multiple Pokemon of same type"
// Use the testPokemon array that's already in the file
// Or create your own mini test array if neededtest('should return only water type Pokemon', () => {
const result = filterByType(testPokemon, 'water');
expect(result.length).toBe(1);
expect(result[0].name).toBe('Squirtle');
});# Create branch
git checkout -b ticket-1-filter-tests
# After each test you write
git add src/__tests__/pokemon-utils.test.js
git commit -m "test: add water type filter test"
# Continue for each test...
git commit -m "test: add edge case for non-existent type"
git commit -m "test: add multiple Pokemon same type test"
# Push and create PR
git push origin ticket-1-filter-tests- At least 3 new tests added
- All tests pass (
npm test) - Meaningful commit messages
- Can explain what each test checks