Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankush/frappe_test.vim
Running Frappe unit tests at speed of thought.
https://github.com/ankush/frappe_test.vim
erpnext frappe neovim vim vim-plugin vim-test
Last synced: about 1 month ago
JSON representation
Running Frappe unit tests at speed of thought.
- Host: GitHub
- URL: https://github.com/ankush/frappe_test.vim
- Owner: ankush
- Created: 2021-04-29T15:52:21.000Z (about 3 years ago)
- Default Branch: develop
- Last Pushed: 2022-10-26T10:27:37.000Z (over 1 year ago)
- Last Synced: 2024-02-07T11:16:13.629Z (4 months ago)
- Topics: erpnext, frappe, neovim, vim, vim-plugin, vim-test
- Language: Vim Script
- Homepage:
- Size: 9.77 KB
- Stars: 12
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-frappe - frappe_test.vim - Running Frappe unit tests at speed of thought. (Uncategorized / Uncategorized)
README
# frappe_test.vim - A custom runner for vim-test plugin
## Current features:
![testing in action](https://user-images.githubusercontent.com/9079960/186141063-3aebe183-cf3b-458f-9ef0-88d554e2befd.gif)
1. Run current test file
2. Run single unit test "near" cursor (through vim-test API)## Setup / requirements
### Required plugins:
* [vim-test](https://github.com/vim-test/vim-test) to actually run the tests
* [vim-rooter](https://github.com/airblade/vim-rooter) to switch to correct root directory.### Installation
Add this to your vimrc and do `:PlugInstall`. Other package managers _should_ work too.
```vim
Plug 'airblade/vim-rooter'
Plug 'vim-test/vim-test'
Plug 'ankush/frappe_test.vim'
```### Config:
Following is minimal recommended config. You may configure it to your preference, refer vim-test documentation for more.
```vim
let g:rooter_patterns = ['.git', 'package.json']let test#custom_runners = {'python': ['Frappe']}
let test#enabled_runners = ["python#frappe"]let g:test#python#frappe#testsite = "sitename" " important to specify your test site name here
let g:test#python#frappe#arguments = "--skip-before-tests" " arguments to run-test function
```### Running
* This is totally up to you, you can use `:TestNearest` or `:TestFile` command or bind them to a keychord.
* I prefer binding `t{n|f}` for near and file.### VS Code user?
Try VS Code plugin: https://marketplace.visualstudio.com/items?itemName=AnkushMenat.frappe-test-runner
---
License: same as Vim `:h license`