Run and Debug TypeScript Unit Tests in Neovim

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024

Комментарии • 79

  • @ElijahManor
    @ElijahManor  Год назад +3

    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 Год назад +8

    Great video! It makes a huge difference to see those test outputs in your editor instead of a separate terminal window.

  • @IainSimmons
    @IainSimmons Год назад +5

    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  Год назад +2

      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

  • @MrRollhax
    @MrRollhax Год назад +2

    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  Год назад +1

      YAY, glad my videos have helped some. Glad you are tinkering, I sure love being technical and making things. Thanks for sharing

  • @ErmandDurro
    @ErmandDurro Год назад +2

    Great content as always. Love it that you included the debugging part as well 😀

    • @ElijahManor
      @ElijahManor  Год назад +1

      Yay, glad you liked it! And thanks as always for stopping by!

  • @macmanuelodumeru3708
    @macmanuelodumeru3708 Год назад +1

    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 8 месяцев назад

    Great tool to debugging, usually I used vimspector until now, I will replaced by this haha, thank you for sharing 👍🏻

  • @theherk
    @theherk Год назад +1

    These videos are superb. Very helpful. Instant sub.

  •  2 месяца назад

    man, your videos are so good!!
    i have no words

  • @gustavofsantos
    @gustavofsantos Год назад +1

    Thank you for this fantastic content!

  • @gugahoi
    @gugahoi Год назад +2

    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  Год назад +2

      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

  • @kiyov09
    @kiyov09 Год назад +1

    Very good, as always! 🔥

    • @ElijahManor
      @ElijahManor  Год назад +1

      Thanks for coming back 🔥

    • @kiyov09
      @kiyov09 Год назад

      @@ElijahManor always man, your videos are gold.

  • @filipebraganca2558
    @filipebraganca2558 Год назад

    Nice way to debug!!! Thanks for sharing

    • @ElijahManor
      @ElijahManor  Год назад

      You bet! Thanks for watching and supporting with repeat visits :)

  • @celsopatiri2846
    @celsopatiri2846 Год назад +1

    Awesome content

    • @ElijahManor
      @ElijahManor  Год назад

      Thank you so much! Glad you found value in it

  • @OrenGriffin-y1x
    @OrenGriffin-y1x Год назад +3

    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 10 месяцев назад

      same problem here

  • @sockthedev4904
    @sockthedev4904 Год назад

    Love your work 💜

    • @ElijahManor
      @ElijahManor  Год назад

      Thank you and for being a repeat viewer! 😊

  • @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

  • @develanton2955
    @develanton2955 2 месяца назад

    Cool vid, hey what is the font you are using on your terminal? cool icons.

  • @inteliconn995
    @inteliconn995 Год назад +1

    Thanks!

  • @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.

  • @raulvargasmunoz1314
    @raulvargasmunoz1314 7 месяцев назад

    Is it possible to only use the lazyvim.plugins.extras.test.core without install everything else?
    Great video btw.

  • @prashanthshetty8337
    @prashanthshetty8337 Год назад

    Thank you! great video, what font is that you are using?

  • @andrewc8125
    @andrewc8125 Год назад

    Wow very nice!!

  • @nikolica9999
    @nikolica9999 Год назад +1

    🎉

  • @trancongminh2628
    @trancongminh2628 7 месяцев назад

    I'm really appreciate if there is any a kind of vim typescript nodejs debug config video?

  • @Light-f5g
    @Light-f5g Месяц назад +1

    Can you make video for python,c,rust ?

  • @bibblebabl
    @bibblebabl Год назад +1

    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 Год назад +1

      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  Год назад +2

      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 ruclips.net/video/QMVIJhC9Veg/видео.html

    • @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 :)

  • @oloja__
    @oloja__ Год назад

    nice tips right here. how’d you get the nodejs icon though

  • @VovaY
    @VovaY Год назад

    Elijah, 🚀💪

    • @ElijahManor
      @ElijahManor  Год назад

      Thanks man! Good to see you again :)

  • @Petar-...-Nikov
    @Petar-...-Nikov Год назад

    Great content could you show similar for Rust setup and testing

  • @Heyy_manuel
    @Heyy_manuel 12 дней назад

    anyone has an issue where the tests in the test explorer are not matching the test results

  • @maguilecutty
    @maguilecutty 3 месяца назад

    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!

  • @joaomarcos7545
    @joaomarcos7545 7 месяцев назад

    What is those all? 0:25 I don't have this and can't find anything about it

  • @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

  • @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 },
    ```

  • @anjanshomodder6463
    @anjanshomodder6463 Год назад +1

    what plugin are you using for running nvim commands? 1:16

    • @ElijahManor
      @ElijahManor  Год назад

      That is the noice plugin github.com/folke/noice.nvim

  • @muzzamilraza3793
    @muzzamilraza3793 Год назад

    Make a video specifically for javascript debugging using node2 debugger

  • @muhammadaneeqasif572
    @muhammadaneeqasif572 Год назад +1

    sir which font are you using

    • @ElijahManor
      @ElijahManor  Год назад +1

      I'm a big fan of the JetBrains Mono font!

  • @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: '))" })

  • @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" ...

  • @jtucker87
    @jtucker87 Год назад +1

    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.

  • @brianfiszman3179
    @brianfiszman3179 7 месяцев назад

    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 8 месяцев назад

    Great video
    it worked with me in .spec.ts files but didn't work for .spec.tsx files .. any advice ?

  • @Hackme-sf9lp
    @Hackme-sf9lp Год назад

    Plz make a video on lazyvim copilot

    • @ElijahManor
      @ElijahManor  Год назад

      LazyVim now provides a extra import that sets up Copilot. In your `lua/config/lazy.lua` file, you can include the following import...
      require("lazy").setup({
      spec = {
      { "LazyVim/LazyVim", import = "lazyvim.plugins" },
      { import = "lazyvim.plugins.extras.coding.copilot" },
      { import = "plugins" },
      },
      })

  • @underlog
    @underlog Год назад

    Thanks!

  • @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 ruclips.net/video/mQdB_kHyZn8/видео.html