Skip to content

Enhance your CodeWars experience by scraping tests and running them in your own editor.

Notifications You must be signed in to change notification settings

vlazic/codewars-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codewars Runner

codewars-runner is a utility designed to streamline the development and testing process for CodeWars katas. Instead of writing and testing your code directly on the CodeWars website, this tool automatically scrapes example test cases from the specified kata and generates corresponding local files, allowing you to implement and test your solution in your preferred code editor.

Features

  1. Automatic Test Case Generation: Provide a CodeWars kata URL or ID, and the script will generate a tests.spec.js file with example test cases and a work.js file with the kata function template.

  2. Local Development: Implement your kata solution locally in the work.js file using your favorite code editor.

  3. Continuous Testing: Run Jest in watch mode to continuously monitor your code changes and update the test results in real-time.

Installation

  1. Clone the repository:
git clone https://github.com/vlazic/codewars-runner.git
  1. Install the required packages:
npm install

Usage

  1. Generate the test files by providing a CodeWars kata URL or ID as an argument:
npm run test <KATA_URL>

Example:

npm run test https://www.codewars.com/kata/5b1b27c8f60e99a467000041
# or
npm run test 5b1b27c8f60e99a467000041
  1. Open the work.js file in your preferred code editor and start implementing your solution.

  2. Monitor the test results in the terminal and refine your solution until all tests pass.

Dependencies

  • Playwright
  • Jest
  • Axios
  • @codewars/test-compat

Author

Vladimir Lazić [email protected] (https://vlazic.com/)

License

This project is licensed under the MIT License.

About

Enhance your CodeWars experience by scraping tests and running them in your own editor.

Topics

Resources

Stars

Watchers

Forks