Open SkySingh04 opened 2 months ago
I would love to work on this can this be assigned to me.
@akshat99812 Go for it!
I have successfully implemented tests for rendering HTML elements. However, I need some guidance in testing button clicks within the Svelte files. Could you provide assistance in writing and running tests for interactions with Svelte components? @Akash-Singh04
👀 Is there an existing feature request for this?
🔖 Enhancement description
We can implement tests for our Vs Code extensions using the VS Code/test-cli and VS Code/test-electron module that enables tests to be run in VS Code Desktop. Inside our extension.test.ts file we can define a test suite for registering a Test-Sidebar with our existing Sidebar Provider.
We can then test the content being rendered in our Test-Sidebar to match the content we expect it to display to test if our sidebar is rendering properly or not. In this example, we test if the rendered Html contains a certain css link tag which asserts if the webview content is being rendered properly or not. This functionality can be expanded to further test if other buttons/webviews are being rendered and are functioning as expected or not.
We can run the tests using
npm run test
which triggers the script to run VS Code-test , which searches for test files as per our defined configuration in the .VS Code-test.mjs file.Deliverables:
🎤 Why should this be worked on?
Promotes testing standards
💻 Repository
vscode-extension