Skip to content

Commit edd442e

Browse files
committed
fix: only show the copy button if current file is a test
Fixes #774
1 parent 3b6768a commit edd442e

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,25 +159,22 @@
159159
}
160160
],
161161
"menus": {
162-
"testing/item/result": [
163-
{
164-
"command": "vitest.copyTestItemErrors"
165-
}
166-
],
167162
"testing/message/content": [
168163
{
169-
"command": "vitest.copyErrorOutput"
164+
"command": "vitest.copyErrorOutput",
165+
"when": "resourcePath in vitest.testFiles"
170166
}
171167
],
172168
"testing/message/context": [
173169
{
174-
"command": "vitest.copyErrorOutput"
170+
"command": "vitest.copyErrorOutput",
171+
"when": "resourcePath in vitest.testFiles"
175172
}
176173
],
177174
"editor/title/context": [
178175
{
179176
"command": "vitest.revealInTestExplorer",
180-
"when": "vitest.testFiles && resourcePath in vitest.testFiles",
177+
"when": "resourcePath in vitest.testFiles",
181178
"group": "vitest"
182179
},
183180
{

0 commit comments

Comments
 (0)