Write Tests using GitHub Copilot Chat #github #githubcopilot

preview_player
Показать описание


-- 1-- Open the file you want to write tests for in Visual Studio Code.

-- 2-- Enable GitHub Copilot Chat by clicking the Copilot icon in the status bar.

-- 3-- In the editor, type the command: "Write a unit test for this file". Copilot will then generate a unit test for the entire file.

-- 4-- You can highlight a specific code section and then type the command: "Write a unit test for this code". Copilot will then generate a unit test for the highlighted code.

Stay up-to-date on all things GitHub by connecting with us

About GitHub:
Рекомендации по теме
Комментарии
Автор

This might cause some confusion:

You say "and type 'backslash test'" but it's actually a forward slash that's seen used for a fraction of a second. Blink and you miss it, and if you follow the spoken instructions you're probably not going to be successful.

Alkanen
Автор

It's a good tool if you know exactly what you are writing to help you type faster, but do not let it invent code for you that you do not understand.

hikolanikola
Автор

Please bring Unit test functionality for C# better

mohamedfazrin
Автор

I like this presenter, I hope you use her more

konradhylton
Автор

Any plans on adding Vitest support? Jest is cool and all, but it's far from the only testing framework...

WitYu
Автор

made me scared. it is gonna make us dumb

lasindunuwanga