Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Testing doc #5332

Draft
wants to merge 2 commits into
base: vnext
Choose a base branch
from
Draft

Add Testing doc #5332

wants to merge 2 commits into from

Conversation

isidorn
Copy link
Contributor

@isidorn isidorn commented May 11, 2022

This PR adds a skeleton for the Testing doc, so we have a location to make progress on this.

@connor4312 @gregvanl where do you think should this document live? Currently I put it under Typescript, but all of this also holds true for Javascript. We do not have a big Javascript section, only nodejs? So alternatively it could be under nodejs, and the Typescript one would only link to that. What do you think?

@MarcusFelling said he can help with the Playwright content

@connor4312 I added sections for the popular testing frameworks, if you think something else should also be covered let me know.

fyi @DanielRosenwasser

@connor4312
Copy link
Member

connor4312 commented May 11, 2022

It'd be nice if we could link this doc under both sections, TypeScript as well as Node.js/JavaScript.

Testing frameworks looks good 🙂

@gregvanl
Copy link

The Node.js/JavaScript topics get about 3x the page views of the TypeScript TOC topics so for discovery it might be better to put the page there. We can have an entry in the TypeScript TOC which jumps to the topic under Node.js/JavaScript.
Also feels right if it is a more general JS testing topic, no matter what someone uses as the initial source code.

@smcenlly
Copy link
Contributor

@isidorn - our Wallaby.js extension was one of the first VS Code extensions in the marketplace. While we provide a commercial product, we also provide free licenses for open source projects and think it could be really beneficial to mention us for JavaScript/TypeScript testing. Thinking a little more about it, would be good to list a number of popular extensions directly on the page to help developers get started.

If you agree on adding test runner content, we'd be happy to write a section about Wallaby for you.

@isidorn
Copy link
Contributor Author

isidorn commented May 13, 2022

@gregvanl I love that idea. Moving the doc there then. How do I add it to the typescript TOC, I did not find a toc.json like the API section has?

@smcenlly thanks for reaching out. I like your idea that we should list all the test extensions. Maybe we can have a section at the end that lists all the others.
As for the Wallaby.js extension I really like your extension and I know you were one of the first extensions we had :) For this doc I would prefer to promote extensions that use our new Testing API. And as far as I understand Wallaby.js is not using this, right? Are there plans to adopt to the new Testing API?

@smcenlly
Copy link
Contributor

@isidorn - we started using the testing API very shortly after it was released and were an early adopter. I also made some contributions to the Testing API shortly after it was released (microsoft/vscode#132097, microsoft/vscode#132099).

@isidorn
Copy link
Contributor Author

isidorn commented May 13, 2022

@smcenlly I was not aware of this, thanks for clarifying!
Then a section in the doc would make sense. I would like the section to have 1 image, to be concise, have a neutral tone, and for more details can point to your docs.
I would do a final review and update to the docs.

If that works for you then a contribution would be very welcome :)

@gregvanl
Copy link

@isidorn For a TOC redirect item, you can add a placeholder topic that specifies the TOC placement (Order:) and title (TOCTitle:)
You can review https://github.com/microsoft/vscode-docs/blob/main/docs/python/data-science.md as an example.
Once the primary and placeholder topics are merged, I can add a redirect in the website infrastructure repo.

@gregvanl gregvanl modified the milestone: backlog Jul 28, 2022
@gregvanl gregvanl modified the milestones: backlog, Backlog Aug 25, 2022
@smcenlly
Copy link
Contributor

I couldn't work out how to make an edit to this pull request but have proposed an adjustment to docs/nodejs/nodejs-testing.md below so that this page can be merged to docs in a completed state.


Testing Node.js

Visual Studio Code supports testing Node.js and TypeScript through it's testing framework. You will need to have the right testing extension based on the testing framework that your project uses.

Mocha

The Mocha Test Explorer allows you to run your Mocha tests in the Sidebar of Visual Studio Code using the Test Explorer UI.

Mocha Screenshot

Playwright

Playwright Test for VSCode allows you to run Playwright tests in Visual Studio Code.

Playwright Screenshot

Jest

The Jest VS Code Extension allows you to run your Jest tests in Visual Studio Code.

Jest Screenshot

Vitest

The Vitest VS Code Extension allows you to run your Vitest tests in Visual Studio Code.

Vitest Screenshot

Other extensions

There are other extensions that support testing in Visual Studio Code. You can find them in the Visual Studio Code Marketplace. Some popular ones are listed below.

Wallaby.js

Wallaby.js works with most JavaScript testing frameworks and runs your tests immediately as you type, highlighting results right next to your code. It is a paid product for commercial use, but is free for open source projects.

Wallaby.js Screenshot

@isidorn isidorn modified the milestones: Backlog, October 2022 Sep 13, 2022
@isidorn
Copy link
Contributor Author

isidorn commented Sep 13, 2022

@smcenlly thanks a lot! Assigning to October so we wrap this up then.

@gregvanl gregvanl modified the milestones: October 2022, Backlog Oct 26, 2022
@microsoft microsoft deleted a comment from marketicentery Nov 23, 2022
the1leo

This comment was marked as duplicate.

Dtavietnam

This comment was marked as spam.

@Dtavietnam
Copy link

#6955

Copy link

@maanu1234 maanu1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet