Skip to content

A small JavaScript project to practice Cursor’s AI features

Notifications You must be signed in to change notification settings

theam/cursor-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cursor Practice Logo

Cursor Practice

A small JavaScript project to practice Cursor’s AI features.

You’ll fix broken tests using:

  1. Inline Edit (⌘ + K)
  2. Chat With Codebase (⌘ + L)
  3. Composer (⌘ + I)

1. Prerequisites

  • Node.js and npm:

    macOS

    1. Using Homebrew (recommended):

      brew install node
    2. Or download the macOS installer (.pkg) from nodejs.org

    3. Verify installation in Terminal:

      node --version
      npm --version
  • A code editor with Cursor installed (the AI-integrated IDE).

2. Project Setup

  1. Clone this repository into a folder on your machine.
  2. Open the folder with Cursor.
  3. Run npm install to install dependencies.

3. Running Tests

npm test

4. Activities

1. Inline Edit (Shipping Calculator)

Scenario: The code returns 10 for any input, but the test expects dynamic calculation.

2. Chat With Codebase (Messy Function)

Scenario: The function works but is messy. Using the Chat, ask cursor to explain the code and then refactor it.

3. Composer (Rename a Function in Multiple Files)

Scenario: The test imports a function named multiply, but the code still calls it multiplyComposerNumbers.

5. Final Tips

  • Use Inline Edit + Chat together: Combine AI features for better results
  • Add context by including multiple files in your prompts
  • When stuck, include the entire codebase in your prompt for better AI understanding
  • Run npm test frequently to catch any unintended side effects
  • Review AI suggestions carefully before applying them
  • Don’t forget to commit your changes to track progress.

Happy coding with Cursor!

About

A small JavaScript project to practice Cursor’s AI features

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published