|
34 | 34 | "contributes": {
|
35 | 35 | "commands": [
|
36 | 36 | {
|
37 |
| - "command": "createTests.create", |
| 37 | + "command": "testRunner.create", |
38 | 38 | "title": "Create test file"
|
39 | 39 | },
|
40 | 40 | {
|
41 | 41 | "command": "createStory.create",
|
42 | 42 | "title": "Create story file"
|
| 43 | + }, |
| 44 | + { |
| 45 | + "command": "testRunner.test", |
| 46 | + "title": "Test this file" |
43 | 47 | }
|
44 | 48 | ],
|
45 | 49 | "menus": {
|
46 | 50 | "explorer/context": [
|
47 | 51 | {
|
48 | 52 | "when": "resourceLangId == typescript",
|
49 |
| - "command": "createTests.create", |
| 53 | + "command": "testRunner.create", |
50 | 54 | "group": "2_workspace"
|
51 | 55 | },
|
52 | 56 | {
|
53 | 57 | "when": "resourceLangId == javascript",
|
54 |
| - "command": "createTests.create", |
| 58 | + "command": "testRunner.create", |
55 | 59 | "group": "2_workspace"
|
56 | 60 | },
|
57 | 61 | {
|
58 | 62 | "when": "resourceLangId == typescriptreact",
|
59 |
| - "command": "createTests.create", |
| 63 | + "command": "testRunner.create", |
60 | 64 | "group": "2_workspace"
|
61 | 65 | },
|
62 | 66 | {
|
63 | 67 | "when": "resourceLangId == javascriptreact",
|
64 |
| - "command": "createTests.create", |
| 68 | + "command": "testRunner.create", |
| 69 | + "group": "2_workspace" |
| 70 | + }, |
| 71 | + { |
| 72 | + "when": "resourceLangId == typescript", |
| 73 | + "command": "testRunner.test", |
| 74 | + "group": "2_workspace" |
| 75 | + }, |
| 76 | + { |
| 77 | + "when": "resourceLangId == javascript", |
| 78 | + "command": "testRunner.test", |
| 79 | + "group": "2_workspace" |
| 80 | + }, |
| 81 | + { |
| 82 | + "when": "resourceLangId == typescriptreact", |
| 83 | + "command": "testRunner.test", |
| 84 | + "group": "2_workspace" |
| 85 | + }, |
| 86 | + { |
| 87 | + "when": "resourceLangId == javascriptreact", |
| 88 | + "command": "testRunner.test", |
65 | 89 | "group": "2_workspace"
|
66 | 90 | },
|
67 | 91 | {
|
|
88 | 112 | "editor/title/context": [
|
89 | 113 | {
|
90 | 114 | "when": "resourceLangId == typescript",
|
91 |
| - "command": "createTests.create", |
| 115 | + "command": "testRunner.create", |
92 | 116 | "group": "2_workspace"
|
93 | 117 | },
|
94 | 118 | {
|
95 | 119 | "when": "resourceLangId == javascript",
|
96 |
| - "command": "createTests.create", |
| 120 | + "command": "testRunner.create", |
97 | 121 | "group": "2_workspace"
|
98 | 122 | },
|
99 | 123 | {
|
100 | 124 | "when": "resourceLangId == typescriptreact",
|
101 |
| - "command": "createTests.create", |
| 125 | + "command": "testRunner.create", |
102 | 126 | "group": "2_workspace"
|
103 | 127 | },
|
104 | 128 | {
|
105 | 129 | "when": "resourceLangId == javascriptreact",
|
106 |
| - "command": "createTests.create", |
| 130 | + "command": "testRunner.create", |
| 131 | + "group": "2_workspace" |
| 132 | + }, |
| 133 | + { |
| 134 | + "when": "resourceLangId == typescript", |
| 135 | + "command": "testRunner.test", |
| 136 | + "group": "2_workspace" |
| 137 | + }, |
| 138 | + { |
| 139 | + "when": "resourceLangId == javascript", |
| 140 | + "command": "testRunner.test", |
| 141 | + "group": "2_workspace" |
| 142 | + }, |
| 143 | + { |
| 144 | + "when": "resourceLangId == typescriptreact", |
| 145 | + "command": "testRunner.test", |
| 146 | + "group": "2_workspace" |
| 147 | + }, |
| 148 | + { |
| 149 | + "when": "resourceLangId == javascriptreact", |
| 150 | + "command": "testRunner.test", |
107 | 151 | "group": "2_workspace"
|
108 | 152 | },
|
109 | 153 | {
|
|
130 | 174 | "editor/context": [
|
131 | 175 | {
|
132 | 176 | "when": "resourceLangId == typescript",
|
133 |
| - "command": "createTests.create", |
| 177 | + "command": "testRunner.create", |
| 178 | + "group": "2_workspace" |
| 179 | + }, |
| 180 | + { |
| 181 | + "when": "resourceLangId == javascript", |
| 182 | + "command": "testRunner.create", |
| 183 | + "group": "2_workspace" |
| 184 | + }, |
| 185 | + { |
| 186 | + "when": "resourceLangId == typescriptreact", |
| 187 | + "command": "testRunner.create", |
| 188 | + "group": "2_workspace" |
| 189 | + }, |
| 190 | + { |
| 191 | + "when": "resourceLangId == javascriptreact", |
| 192 | + "command": "testRunner.create", |
| 193 | + "group": "2_workspace" |
| 194 | + }, |
| 195 | + { |
| 196 | + "when": "resourceLangId == typescript", |
| 197 | + "command": "testRunner.test", |
134 | 198 | "group": "2_workspace"
|
135 | 199 | },
|
136 | 200 | {
|
137 | 201 | "when": "resourceLangId == javascript",
|
138 |
| - "command": "createTests.create", |
| 202 | + "command": "testRunner.test", |
139 | 203 | "group": "2_workspace"
|
140 | 204 | },
|
141 | 205 | {
|
142 | 206 | "when": "resourceLangId == typescriptreact",
|
143 |
| - "command": "createTests.create", |
| 207 | + "command": "testRunner.test", |
144 | 208 | "group": "2_workspace"
|
145 | 209 | },
|
146 | 210 | {
|
147 | 211 | "when": "resourceLangId == javascriptreact",
|
148 |
| - "command": "createTests.create", |
| 212 | + "command": "testRunner.test", |
149 | 213 | "group": "2_workspace"
|
150 | 214 | },
|
151 | 215 | {
|
|
173 | 237 | "configuration": {
|
174 | 238 | "title": "Where to keep the test files?",
|
175 | 239 | "properties": {
|
176 |
| - "createTests.defaultLocationForFiles": { |
| 240 | + "testRunner.defaultLocationForFiles": { |
177 | 241 | "type": "string",
|
178 | 242 | "default": "same location as source file",
|
179 | 243 | "enum": [
|
|
182 | 246 | ],
|
183 | 247 | "description": "Where to keep the created test files?"
|
184 | 248 | },
|
185 |
| - "createTests.sourceDir": { |
| 249 | + "testRunner.sourceDir": { |
186 | 250 | "type": "string",
|
187 | 251 | "default": "src",
|
188 | 252 | "description": "Name of directory which contains all source files. This directory is not created when generating the directory structure for the test file."
|
189 | 253 | },
|
190 |
| - "createTests.directoryName": { |
| 254 | + "testRunner.directoryName": { |
191 | 255 | "type": "string",
|
192 | 256 | "default": "__tests__",
|
193 | 257 | "description": "Name of the test directory."
|
194 | 258 | },
|
195 |
| - "createTests.customLocationForFiles": { |
| 259 | + "testRunner.customLocationForFiles": { |
196 | 260 | "type": "string",
|
197 | 261 | "description": "Set this property in case you want to specify the custom location for test files."
|
198 | 262 | },
|
199 |
| - "createTests.filesSuffix": { |
| 263 | + "testRunner.filesSuffix": { |
200 | 264 | "type": "string",
|
201 | 265 | "default": "test",
|
202 | 266 | "description": "Suffix to use for the test files."
|
203 | 267 | },
|
204 |
| - "createTests.shouldSwitchToFile": { |
| 268 | + "testRunner.shouldSwitchToFile": { |
205 | 269 | "type": "boolean",
|
206 | 270 | "default": true,
|
207 | 271 | "description": "Whether to switch to the test file or not after creating it."
|
208 | 272 | },
|
209 |
| - "createTests.template.*": { |
| 273 | + "testRunner.template.*": { |
210 | 274 | "type": [
|
211 | 275 | "array",
|
212 | 276 | "object"
|
213 | 277 | ],
|
214 | 278 | "description": "Language specific templates that you want to use."
|
215 | 279 | },
|
216 |
| - "createTests.template.default": { |
| 280 | + "testRunner.template.default": { |
217 | 281 | "type": [
|
218 | 282 | "array",
|
219 | 283 | "object"
|
220 | 284 | ],
|
221 | 285 | "default": [
|
222 |
| - "import {${moduleName}} from '${modulePath}';" |
| 286 | + "" |
223 | 287 | ],
|
224 | 288 | "description": "Default template to use for all test file"
|
225 | 289 | },
|
| 290 | + "testRunner.framework": { |
| 291 | + "type": "string", |
| 292 | + "default": "jest", |
| 293 | + "description": "Test framework" |
| 294 | + }, |
| 295 | + "testRunner.useForwardSlash": { |
| 296 | + "type": "boolean", |
| 297 | + "default": "jest", |
| 298 | + "description": "If set to true will make backslash to forward slash, useful for windows and jest." |
| 299 | + }, |
| 300 | + "testRunner.supportedExtension": { |
| 301 | + "type": "array", |
| 302 | + "items": { |
| 303 | + "type": "string" |
| 304 | + }, |
| 305 | + "default": [ |
| 306 | + "ts", |
| 307 | + "tsx", |
| 308 | + "js", |
| 309 | + "jsx", |
| 310 | + "cs" |
| 311 | + ], |
| 312 | + "description": "Test supported Extension" |
| 313 | + }, |
| 314 | + "testRunner.watchCommands": { |
| 315 | + "type": "array", |
| 316 | + "items": { |
| 317 | + "type": "string" |
| 318 | + }, |
| 319 | + "default": [ |
| 320 | + "--watch", |
| 321 | + "dotnet watch" |
| 322 | + ], |
| 323 | + "description": "If file created for the firs time test will not run,unless a watch command detected." |
| 324 | + }, |
| 325 | + "testRunner.tasks": { |
| 326 | + "type": "array", |
| 327 | + "items": { |
| 328 | + "type": "object", |
| 329 | + "title": "task", |
| 330 | + "properties": { |
| 331 | + "label": { |
| 332 | + "type": "string", |
| 333 | + "description": "Name of task" |
| 334 | + }, |
| 335 | + "args": { |
| 336 | + "type": "array", |
| 337 | + "items": { |
| 338 | + "type": "string", |
| 339 | + "title": "task" |
| 340 | + }, |
| 341 | + "description": "Arguments to pass to test" |
| 342 | + }, |
| 343 | + "useForwardSlash": { |
| 344 | + "type": "boolean", |
| 345 | + "default": true, |
| 346 | + "description": "Will convert back slash to forward slash, Required for jest when running in windows" |
| 347 | + }, |
| 348 | + "usePathFromBaseDirectory": { |
| 349 | + "type": "boolean", |
| 350 | + "default": true, |
| 351 | + "description": "When set to true the workspace root path will be removed, Required for jest" |
| 352 | + }, |
| 353 | + "shouldSwitchToFile": { |
| 354 | + "type": "boolean", |
| 355 | + "default": true, |
| 356 | + "description": "Whether to switch to the test file or not." |
| 357 | + }, |
| 358 | + "openInNewTerminal": { |
| 359 | + "type": "boolean", |
| 360 | + "default": true, |
| 361 | + "description": "Will open new terminal for each run." |
| 362 | + }, |
| 363 | + "command": { |
| 364 | + "type": "string", |
| 365 | + "default": "jest" |
| 366 | + }, |
| 367 | + "default": { |
| 368 | + "type": "boolean", |
| 369 | + "description": "When unable to detect task, will run task with default set to true" |
| 370 | + } |
| 371 | + }, |
| 372 | + "required": [ |
| 373 | + "label", |
| 374 | + "command" |
| 375 | + ] |
| 376 | + }, |
| 377 | + "description": "Whether to switch to the story file or not after creating it." |
| 378 | + }, |
226 | 379 | "createStory.defaultLocationForFiles": {
|
227 | 380 | "type": "string",
|
228 | 381 | "default": "same location as source file",
|
|
292 | 445 | "@types/mocha": "^2.2.42",
|
293 | 446 | "@types/node": "^7.0.43",
|
294 | 447 | "tslint": "^5.10.0",
|
295 |
| - "typescript": "^2.6.1", |
| 448 | + "typescript": "^3.8.3", |
296 | 449 | "vscode": "^1.1.35"
|
297 | 450 | },
|
298 | 451 | "dependencies": {
|
|
0 commit comments