filmov
tv
JS Unit Testing | Part 6 | Running Our Tests Inside Vim

Показать описание
Now that we are in a rhythm writing tests it can become annoying having to swap back and forth between our editor and shell. To remedy this we are going to map a keystroke inside Vim to save all the open buffers and run our test command for us.
:noremap ,a :w\|!npm test
With this mapping we can hit ,a when in normal mode and Vim will run :wa to save all the open buffers. Then Vim will run npm test in our shell.
:noremap ,a :w\|!npm test
With this mapping we can hit ,a when in normal mode and Vim will run :wa to save all the open buffers. Then Vim will run npm test in our shell.