Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vlazic/codewars-runner
Enhance your CodeWars experience by scraping tests and running them in your own editor.
https://github.com/vlazic/codewars-runner
codewars codewars-javascript codewars-kata jest kata katas nodejs playwright
Last synced: about 2 months ago
JSON representation
Enhance your CodeWars experience by scraping tests and running them in your own editor.
- Host: GitHub
- URL: https://github.com/vlazic/codewars-runner
- Owner: vlazic
- Created: 2023-09-01T21:20:08.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-20T21:37:22.000Z (over 1 year ago)
- Last Synced: 2024-12-12T23:46:25.974Z (about 2 months ago)
- Topics: codewars, codewars-javascript, codewars-kata, jest, kata, katas, nodejs, playwright
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
git clone https://github.com/vlazic/codewars-runner.git
```2. Install the required packages:
```bash
npm install
```## Usage
1. Generate the test files by providing a CodeWars kata URL or ID as an argument:
```bash
npm run test
```Example:
```bash
npm run test https://www.codewars.com/kata/5b1b27c8f60e99a467000041
# or
npm run test 5b1b27c8f60e99a467000041
```2. Open the `work.js` file in your preferred code editor and start implementing your solution.
3. 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ć (https://vlazic.com/)
## License
This project is licensed under the MIT License.