Run and Debug TypeScript Unit Tests in Neovim

  Рет қаралды 22,892

Elijah Manor

Elijah Manor

Күн бұрын

Пікірлер: 79
@ElijahManor
@ElijahManor Жыл бұрын
You can find the config that I added in the following gist gist.github.com/elijahmanor/bac05af95e1536d88a43cbfcb66c1c1d If you liked this video, please like and subscribe for further content. You can also join as a member of this channel for special perks youtube.com/@elijahmanor/join If you'd like to connect on social media, you can find me on Twitter twitter.com/elijahmanor and Mastodon hachyderm.io/@elijahmanor and Bluesky bsky.app/profile/elijahmanor.com
@alextz4307
@alextz4307 11 ай бұрын
The gist seems not to be working. Every time I try to run `tr` inside a jest test I get the following error: E5108: Error executing lua: attempt to index field 'run' (a nil value)
@ascourter
@ascourter Жыл бұрын
Great video! It makes a huge difference to see those test outputs in your editor instead of a separate terminal window.
@ElijahManor
@ElijahManor Жыл бұрын
Yes it does! Thanks man
@MrRollhax
@MrRollhax Жыл бұрын
Man, I was struggling to wrap my head around neovim config. Your videos have helped a ton. Thank you for all of these - I'm enjoying coding and tinkering again like I haven't since I was 14.
@ElijahManor
@ElijahManor Жыл бұрын
YAY, glad my videos have helped some. Glad you are tinkering, I sure love being technical and making things. Thanks for sharing
@IainSimmons
@IainSimmons Жыл бұрын
This is awesome, been waiting for it for a while. It was certainly worth the wait! Some part of me wished for a happy ending where you fixed the test and everything passed though! 😅
@ElijahManor
@ElijahManor Жыл бұрын
You and me both! I didn't notice that until way after I recorded things and was well into the editing process. Oh well ;) Leaves some to the imagination I guess ha ha
@ErmandDurro
@ErmandDurro Жыл бұрын
Great content as always. Love it that you included the debugging part as well 😀
@ElijahManor
@ElijahManor Жыл бұрын
Yay, glad you liked it! And thanks as always for stopping by!
@macmanuelodumeru3708
@macmanuelodumeru3708 Жыл бұрын
Finally, Awesome as usual 🔥🔥🔥 I wonder what's up next
@ElijahManor
@ElijahManor Жыл бұрын
As you might have noticed. I might switch things up a bit and try something a bit different, but still in the terminal world. Stay tuned :)
@crowvampire
@crowvampire 9 ай бұрын
Great tool to debugging, usually I used vimspector until now, I will replaced by this haha, thank you for sharing 👍🏻
3 ай бұрын
man, your videos are so good!! i have no words
@theherk
@theherk Жыл бұрын
These videos are superb. Very helpful. Instant sub.
@OrenGriffin-y1x
@OrenGriffin-y1x Жыл бұрын
Thanks for this video ! i followed the steps one by one and when i debug (nearest) i get a DAP error. "Couldn't connect to localhost:{port} ECONNREFUESD" what am i missing?
@AngelDuranReynoso
@AngelDuranReynoso Жыл бұрын
same problem, any solution?
@AngelDuranReynoso
@AngelDuranReynoso Жыл бұрын
I tried exactly the same nvim configuration in a diff computer, and different project, and now it worked perfectly, tomorrow I will review environment packages versions and project configuration and see what is exactly the issue, stay tuned
@DimasCyriaco
@DimasCyriaco 11 ай бұрын
same problem here
@gugahoi
@gugahoi Жыл бұрын
Thanks for sharing this video, neotest and the jest adapter are great. I was really hoping you'd cover the "watch" mode that neotest has. I have been unable to get that setup with the jest adapter unfortunately but I just feel like it's a superior workflow when you get instant test feedback that runs on save. Theoretically, neotest uses treesitter to work out impacted files and should run tests related to them but alas I have not been able to get it to work myself. Maybe you can give that a shot and if you're successful, a video would be incredibly useful!
@ElijahManor
@ElijahManor Жыл бұрын
I did have it set up to do watch mode, but as you described it didn't seem to work as I expected it should. It would seem to know when a test was changed, but it would get confused as to which item needed the update. So, I decided to cut that from this video since it wasn't consistent, but yes, it would be nice to figure that out. I haven't yet
@gustavofsantos
@gustavofsantos Жыл бұрын
Thank you for this fantastic content!
@ElijahManor
@ElijahManor Жыл бұрын
Glad you enjoy it!
@kiyov09
@kiyov09 Жыл бұрын
Very good, as always! 🔥
@ElijahManor
@ElijahManor Жыл бұрын
Thanks for coming back 🔥
@kiyov09
@kiyov09 Жыл бұрын
@@ElijahManor always man, your videos are gold.
@develanton2955
@develanton2955 2 ай бұрын
Cool vid, hey what is the font you are using on your terminal? cool icons.
@filipebraganca2558
@filipebraganca2558 Жыл бұрын
Nice way to debug!!! Thanks for sharing
@ElijahManor
@ElijahManor Жыл бұрын
You bet! Thanks for watching and supporting with repeat visits :)
@brittager
@brittager Жыл бұрын
Wonderful. Would it possible to also provide the link to the Github repo of the project you're using for the demos? If the project is not confidential. Because when you say "let's go to our ... (tailwind, typescript) project, people might not have a project fitting that requirement, thus making it harder to follow along. Just a suggestion for something to add to the description below the videos. Keep up the magnificent work
@jtucker87
@jtucker87 Жыл бұрын
Can you do this but for neotest-dotnet? I got it to kind of work for full files but not for running locally. No idea what I'm missing, the docs don't seems to mention anything else I need to add.
@djbessel
@djbessel 9 ай бұрын
This really helped me set up debugging in LazyVim, including tests and other node applications I can attach to. I'm still puzzled how to launch Chrome and debug frontend stuff, though. I can't get LazyVim to work with nvim-dap-vscode-js, and I'm wondering why it seems to set up adapters on its own instead of leveraging that plugin.
@prashanthshetty8337
@prashanthshetty8337 Жыл бұрын
Thank you! great video, what font is that you are using?
@sockthedev4904
@sockthedev4904 Жыл бұрын
Love your work 💜
@ElijahManor
@ElijahManor Жыл бұрын
Thank you and for being a repeat viewer! 😊
@celsopatiri2846
@celsopatiri2846 Жыл бұрын
Awesome content
@ElijahManor
@ElijahManor Жыл бұрын
Thank you so much! Glad you found value in it
@anjanshomodder6463
@anjanshomodder6463 Жыл бұрын
what plugin are you using for running nvim commands? 1:16
@ElijahManor
@ElijahManor Жыл бұрын
That is the noice plugin github.com/folke/noice.nvim
@raulvargasmunoz1314
@raulvargasmunoz1314 7 ай бұрын
Is it possible to only use the lazyvim.plugins.extras.test.core without install everything else? Great video btw.
@oloja__
@oloja__ Жыл бұрын
nice tips right here. how’d you get the nodejs icon though
@Light-f5g
@Light-f5g 2 ай бұрын
Can you make video for python,c,rust ?
@brittager
@brittager Жыл бұрын
There are some things I do no understand from the video. What do the following neotest-jest options do? ``` jestCommand = "npm test --", // why do we need the double dash ? jestConfigFile = "custom.jest.config.ts", // where do I find this file? What is it? What if I don't have it? env = { CI = true }, ```
@Heyy_manuel
@Heyy_manuel 27 күн бұрын
anyone has an issue where the tests in the test explorer are not matching the test results
@joaomarcos7545
@joaomarcos7545 7 ай бұрын
What is those all? 0:25 I don't have this and can't find anything about it
@bibblebabl
@bibblebabl Жыл бұрын
Hey! Thanks for the video! Could you please remind what is the best reason to migrate to Neovim? What are the advantages of using it in comparison with VSCode e.g?
@rodrigomeireles5966
@rodrigomeireles5966 Жыл бұрын
Major point is it is highly customizable and offers first class support to modal editing. But at the end of the day VSCode has a lot of convenience built around and even an vim motions extension so it comes down to preference.
@npradeeptha
@npradeeptha Жыл бұрын
Besides modal editing and based keybindings on the home row, one of the major reasons I switched was speed. Neovim is silly fast. It opens up instantly. If it gets into a bad state all it takes is like 2 seconds to close and re-open and ql to open up your last session. VS code on the other hand takes time based on all the plugins you have installed or configured and can get very sluggish if your machine is light on resources.
@ElijahManor
@ElijahManor Жыл бұрын
Great question. I like the thoughts that TJ put together about developing your own PDE (Personal Development Environment). He has a video describing why one might want to use Neovim when there are plenty of other options around kzbin.info/www/bejne/h365en2eeJ6Jm8k
@npradeeptha
@npradeeptha Жыл бұрын
@@ElijahManor This is a great reference video I haven't seen before. I am going to bookmark it and share when someone asks this question :)
@inteliconn995
@inteliconn995 Жыл бұрын
Thanks!
@ElijahManor
@ElijahManor Жыл бұрын
No problem!
@trancongminh2628
@trancongminh2628 7 ай бұрын
I'm really appreciate if there is any a kind of vim typescript nodejs debug config video?
@andrewc8125
@andrewc8125 Жыл бұрын
Wow very nice!!
@ElijahManor
@ElijahManor Жыл бұрын
Thank you! 😊
@germancho-dev
@germancho-dev Жыл бұрын
hi! could you make a video for setting up lazyvim to use java along with nvim dap? im having a lot of troubles setting it up
@muhammadaneeqasif572
@muhammadaneeqasif572 Жыл бұрын
sir which font are you using
@ElijahManor
@ElijahManor Жыл бұрын
I'm a big fan of the JetBrains Mono font!
@maguilecutty
@maguilecutty 4 ай бұрын
This is a GREAT vidoe thanks - anyone know how to set it up for 'side by side' testing where the test file lives next to the component file? would be greatly appreciated thanks!
@LinuxForLife
@LinuxForLife Жыл бұрын
Already use it with Rust, Go and Astro-nvim but can't make it work with jest/typescript ... 😞😞😞
@LinkEX
@LinkEX Жыл бұрын
You mean NeoVim, or the LazyVim setup in particular?
@LinuxForLife
@LinuxForLife Жыл бұрын
@@LinkEX I work with Astro-Nvim and it already uses Lazy package. The setup seems OK ( no error reported) but nothing happen whe I use it or it shows "No test found" ...
@nikolica9999
@nikolica9999 Жыл бұрын
🎉
@ElijahManor
@ElijahManor Жыл бұрын
Yay, thanks!
@VovaY
@VovaY Жыл бұрын
Elijah, 🚀💪
@ElijahManor
@ElijahManor Жыл бұрын
Thanks man! Good to see you again :)
@emko333
@emko333 Жыл бұрын
is it possible to do a conditional break point?
@ElijahManor
@ElijahManor Жыл бұрын
The set_breakpoint method supports an optional condition that you can use... github.com/mfussenegger/nvim-dap/blob/master/doc/dap.txt#L684 You might do something like this... map({ "n", "dbc", ":lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))" })
@Petar-...-Nikov
@Petar-...-Nikov Жыл бұрын
Great content could you show similar for Rust setup and testing
@muzzamilraza3793
@muzzamilraza3793 Жыл бұрын
Make a video specifically for javascript debugging using node2 debugger
@brianfiszman3179
@brianfiszman3179 8 ай бұрын
i wish it was that straight forward but the neotest plugin SUCKS. I spent days trying different configurations and I go from one issue to the next. My biggest gripe right now are the false positives. It shows you that the test failed while the logs shows different. I fucking hated it with passion, I understand that its vim and that in a POSIX environment you are supposed to fix it yourself but why cant I just get to enjoy it instead of having to go back to VSCode to get my job done???
@AbdurrahmanHafez
@AbdurrahmanHafez 9 ай бұрын
Great video it worked with me in .spec.ts files but didn't work for .spec.tsx files .. any advice ?
@underlog
@underlog Жыл бұрын
Thanks!
@ElijahManor
@ElijahManor Жыл бұрын
Oh wow, thank you so much!
@muhammadaneeqasif572
@muhammadaneeqasif572 Жыл бұрын
sir what font are you using
@ElijahManor
@ElijahManor Жыл бұрын
Big JetBrains Mono fan! github.com/elijahmanor/dotfiles/blob/master/wezterm/.wezterm.lua#L14 github.com/elijahmanor/dotfiles/blob/master/kitty/.config/kitty/kitty.conf#L1 github.com/elijahmanor/dotfiles/blob/master/alacritty/.config/alacritty/alacritty.yml#L118 I have a video about Nerd Fonts if you are curious kzbin.info/www/bejne/o4LHc5Khfd6NpJo
New Native Neovim LSP Inlay Hints (Nightly Build)
7:51
Elijah Manor
Рет қаралды 23 М.
Effective Neovim setup for web development towards 2024
1:00:28
devaslife
Рет қаралды 820 М.
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 89 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 21 МЛН
My Neovim Dev Workflow
41:37
Lazar Nikolov
Рет қаралды 41 М.
When To Unit, E2E, And Integration Test
14:58
ThePrimeTime
Рет қаралды 99 М.
I tried Neovim Distributions so you don't have to
9:12
typecraft
Рет қаралды 171 М.
The Perfect Neovim Note Takers Setup
11:24
DevOps Toolbox
Рет қаралды 25 М.
DEBUG in Neovim. Like a BOSS.
9:44
DevOps Toolbox
Рет қаралды 55 М.
Zero to IDE with LazyVim
16:59
Elijah Manor
Рет қаралды 357 М.
The Most Important Skill You Never Learned
34:56
Web Dev Simplified
Рет қаралды 211 М.
The Ultimate Database Control. Right WITHIN NEOVIM
9:35
DevOps Toolbox
Рет қаралды 58 М.
simple neovim debugging setup (in 10 minutes)
9:36
TJ DeVries
Рет қаралды 47 М.