codex-lv3-may-2025

Project Requirements: Refactoring with Pure Functions

Overview

Revisit your capstone project and refactor it by extracting logic into pure functions. This project will help you practice writing testable, reusable code using Vitest.

Goals

Requirements

1. Setup

2. Identify Refactoring Opportunities

3. Plan Your Functions

For each function you plan to create:

4. Create and Test Functions

5. Integrate Functions into Project

6. Additional Testing

Challenges (Optional)

Challenge 1: Component Testing

Challenge 2: Component Refactoring

Deliverables

  1. Refactored code with at least 3 pure functions
  2. Test files with comprehensive test coverage
  3. Module file (e.g., helpers.js) containing your functions
  4. Updated project that uses the new functions
  5. Documentation of function inputs/outputs (can be in code comments or README)

Success Criteria

Resources

Notes