-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 basic coverage code lens support [issue-136] #275
Conversation
src/runHandler.ts
Outdated
@@ -76,6 +76,8 @@ export async function runHandler( | |||
|
|||
run.end() | |||
log.info('Tests run end') | |||
|
|||
await vscode.commands.executeCommand('editor.action.refreshCodeLens'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will refresh all the code lens here after the test so ensure they have up to date coverage information
@@ -0,0 +1,92 @@ | |||
import * as vscode from 'vscode'; | |||
import * as fs from 'fs' | |||
import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are now executed by https://github.com/microsoft/vscode-test-cli with mocha, so I didn't think this would work. Did you run pnpm test
?
The extension was rewritten from the ground up in #253. Feel free to reimplement this feature in a separate PR. It should be a bit easier because we have direct access to the coverage, and we don't need to read it from the reporter file. |
Adds a code lens similar to jest as documented here: #136 (comment)
Current assumptions:
json
as their reporter.Improvements and gutter support to follow, but this is a good first step I think. Feedback welcome :)