forked from jest-community/vscode-jest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
712 lines (712 loc) · 25.1 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
{
"name": "vscode-jest",
"displayName": "Jest",
"description": "Use Facebook's Jest With Pleasure.",
"version": "6.4.0",
"publisher": "Orta",
"engines": {
"vscode": "^1.88.1"
},
"author": {
"name": "Orta Therox, ConnectDotz & Sean Poulter",
"url": "https://github.com/jest-community/vscode-jest"
},
"repository": {
"type": "git",
"url": "https://github.com/jest-community/vscode-jest"
},
"galleryBanner": {
"theme": "dark",
"color": "#384357"
},
"categories": [
"Other",
"Testing"
],
"keywords": [
"jest",
"debug",
"snippet",
"react",
"multi-root ready"
],
"activationEvents": [
"workspaceContains:**/jest.config.{js,ts,mjs,cjs,json}",
"workspaceContains:**/jest.json",
"workspaceContains:node_modules/.bin/jest",
"workspaceContains:node_modules/react-scripts/node_modules/.bin/jest",
"workspaceContains:node_modules/react-native-scripts",
"workspaceContains:**/.vscode-jest"
],
"main": "./out/extension",
"icon": "images/vscode-jest.png",
"extensionKind": [
"workspace"
],
"contributes": {
"languages": [
{
"id": "jest-snapshot",
"extensions": [
".js.snap",
".jsx.snap",
".ts.snap",
".tsx.snap"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "jest-snapshot",
"scopeName": "source.jest.snap",
"path": "./syntaxes/jest-snapshot.tmLanguage"
}
],
"configuration": {
"type": "object",
"title": "Jest",
"properties": {
"jest.enable": {
"markdownDescription": "enable/disable jest extension for the workspace folder. Default is true",
"type": "boolean",
"scope": "resource",
"default": true
},
"jest.jestCommandLine": {
"description": "The command line to start jest tests. It should be the same command line users run jest tests from a terminal/shell, with ability to append extra arguments (by the extension at runtime)",
"type": "string",
"scope": "resource"
},
"jest.autoClearTerminal": {
"description": "Clear the terminal output at the start of any new test run.",
"type": "boolean",
"scope": "resource",
"markdownDeprecationMessage": "**Deprecated**: Please use [outputConfig](https://github.com/jest-community/vscode-jest#outputconfig) instead.",
"deprecationMessage": "Deprecated: Please use jest.outputConfig instead."
},
"jest.rootPath": {
"description": "The path to your frontend src folder",
"type": "string",
"default": "",
"scope": "resource"
},
"jest.nodeEnv": {
"markdownDescription": "The env passed to runner process in addition to `process.env`",
"type": "object",
"default": null,
"scope": "resource"
},
"jest.shell": {
"markdownDescription": "The shell path or a login-shell to override jest runner process default shell (see Node [child_process.spawn()](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)) for more detail)",
"type": [
"string",
"object"
],
"default": null,
"scope": "resource"
},
"jest.showCoverageOnLoad": {
"description": "Show code coverage when extension starts (if collected)",
"type": "boolean",
"default": false,
"scope": "resource",
"markdownDeprecationMessage": "**Deprecated**: Please use [runMode](https://github.com/jest-community/vscode-jest/blob/master/README.md#runmode) instead.",
"deprecationMessage": "Deprecated: Please use jest.runMode instead."
},
"jest.coverageFormatter": {
"description": "Coverage formatter to use",
"type": "string",
"enum": [
"DefaultFormatter",
"GutterFormatter"
],
"default": "DefaultFormatter",
"scope": "resource"
},
"jest.coverageColors": {
"markdownDescription": "Coverage indicator color override. See [Coverage Colors](https://github.com/jest-community/vscode-jest/blob/master/README.md#coverageColors) for details and examples",
"type": "object",
"default": null,
"scope": "resource"
},
"jest.debugMode": {
"description": "Enable debug mode to diagnose plugin issues. (see developer console)",
"type": "boolean",
"default": false,
"scope": "resource"
},
"jest.disabledWorkspaceFolders": {
"description": "Disabled workspace folders names in multiroot environment",
"type": "array",
"items": "string",
"default": [],
"scope": "window"
},
"jest.autoRun": {
"markdownDescription": "Control when jest should run (changed) tests. It supports multiple models, such as fully automated, onSave, and on-demand... See [AutoRun](https://github.com/jest-community/vscode-jest/blob/master/README.md#how-to-trigger-the-test-run) for details and examples",
"type": [
"object",
"string"
],
"default": null,
"scope": "resource",
"markdownDeprecationMessage": "**Deprecated**: Please use [runMode](https://github.com/jest-community/vscode-jest/blob/master/README.md#runmode) instead.",
"deprecationMessage": "Deprecated: Please use jest.runMode instead."
},
"jest.testExplorer": {
"markdownDescription": "Configure jest TestExplorer. See valid [formats](https://github.com/jest-community/vscode-jest/blob/master/README.md#testexplorer) or [how to use test explorer](https://github.com/jest-community/vscode-jest/blob/master/README.md#how-to-use-the-test-explorer) for more details",
"type": "object",
"default": null,
"scope": "resource",
"markdownDeprecationMessage": "**Deprecated**: Please use [runMode](https://github.com/jest-community/vscode-jest/blob/master/README.md#runmode) instead.",
"deprecationMessage": "Deprecated: Please use jest.runMode instead."
},
"jest.monitorLongRun": {
"markdownDescription": "Enable monitoring for long running test process. See valid [monitorLongRun](https://github.com/jest-community/vscode-jest/blob/master/README.md#monitorLongRun) for details",
"type": [
"string",
"integer"
],
"default": 60000,
"scope": "resource"
},
"jest.autoRevealOutput": {
"description": "Review jest output terminal",
"type": "string",
"default": "on-run",
"enum": [
"on-run",
"on-exec-error",
"off"
],
"enumDescriptions": [
"auto show output when test run starts",
"auto show test output when execution error occurred",
"disable auto show test output"
],
"scope": "resource",
"markdownDeprecationMessage": "**Deprecated**: Please use [outputConfig](https://github.com/jest-community/vscode-jest#outputconfig) instead.",
"deprecationMessage": "Deprecated: Please use jest.outputConfig instead."
},
"jest.parserPluginOptions": {
"markdownDescription": "Configure babel parser plugins. See valid [format](https://github.com/jest-community/vscode-jest#parserpluginoptions)",
"type": "object",
"default": null,
"scope": "resource"
},
"jest.useDashedArgs": {
"markdownDescription": "Use dashed args for jest command line.",
"type": "boolean",
"default": false,
"scope": "resource"
},
"jest.virtualFolders": {
"markdownDescription": "Allows multiple jest run config for a given (physical) folder. See valid [format](https://github.com/jest-community/vscode-jest#virtualfolders)",
"type": [
"array",
"null"
],
"default": null,
"items": {
"type": "object"
}
},
"jest.outputConfig": {
"scope": "window",
"type": [
"string",
"object"
],
"markdownDescription": "Control jest output preference. See details in [outputConfig](https://github.com/jest-community/vscode-jest#outputconfig).",
"default": null,
"oneOf": [
{
"type": "string",
"enum": [
"neutral",
"terminal-based",
"test-results-based"
],
"enumDescriptions": [
"A passive and neutral config, will not automatically change active panel nor clear output.",
"Switch to terminal panel when running tests.",
"Switch to test-results panel when running tests."
],
"description": "Specifies the predefined common outputConfig in a string form."
},
{
"type": "object",
"properties": {
"revealOn": {
"type": "string",
"enum": [
"run",
"error",
"demand"
],
"enumDescriptions": [
"Reveal the output upon test run.",
"Reveal the output upon test error.",
"Reveal the output on demand."
],
"default": "run",
"description": "Determines when to reveal the test run output. Default is 'run'."
},
"revealWithFocus": {
"type": "string",
"enum": [
"none",
"terminal",
"test-results"
],
"enumDescriptions": [
"Do not change focus when revealing output.",
"Switch to terminal when revealing output.",
"Switch to test-results panel when revealing output."
],
"default": "none",
"description": "Specifies which output panel, if any, to switch focus to when revealing. Default is 'none'."
},
"clearOnRun": {
"type": "string",
"enum": [
"none",
"both",
"terminal",
"test-results"
],
"enumDescriptions": [
"Do not automatically clear the output before each run.",
"Clear both the terminal and test results output before each run.",
"Clear the terminal output before each run.",
"Clear the test results output before each run."
],
"default": "none",
"description": "Specifies which output, if any, to be cleared before each run. Default is 'none'."
}
},
"description": "Specifies a custom output config in an object form."
}
]
},
"jest.runMode": {
"markdownDescription": "Control when to run jest tests and present the results. See details in [runMode](https://github.com/jest-community/vscode-jest#runmode)",
"default": null,
"scope": "resource",
"oneOf": [
{
"type": "string",
"enum": [
"watch",
"on-demand",
"on-save",
"deferred"
],
"markdownDescription": "A predefined Jest run mode. See details in [runMode](https://github.com/jest-community/vscode-jest#runmode)"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"watch",
"on-demand",
"on-save"
],
"description": "Specifies the jest run mode type."
},
"runAllTestsOnStartup": {
"type": "boolean",
"description": "Specifies whether to run all tests on startup."
},
"coverage": {
"type": "boolean",
"description": "Specifies whether to collect and report coverage information."
},
"showInlineError": {
"type": "boolean",
"description": "Specify if to enable inline error display in test file editor"
},
"deferred": {
"type": "boolean",
"description": "Specifies whether the run mode is deferred."
}
},
"required": [
"type"
],
"additionalProperties": true,
"if": {
"properties": {
"type": {
"const": "on-save"
}
}
},
"then": {
"properties": {
"testFileOnly": {
"type": "boolean",
"description": "if true, will run tests only when saving test files."
}
},
"additionalProperties": true
},
"else": {
"not": {
"required": [
"testFileOnly"
]
},
"errorMessage": "The property 'testFileOnly' should only be present when 'type' is 'on-save'.",
"additionalProperties": true
},
"markdownDescription": "A detailed runMode configuration. See details in [runMode](https://github.com/jest-community/vscode-jest#runmode)"
}
]
},
"jest.useJest30": {
"description": "Use Jest 30+ features",
"type": "boolean",
"default": null,
"scope": "resource"
}
}
},
"commands": [
{
"command": "io.orta.jest.start",
"title": "Jest: Start All Runners"
},
{
"command": "io.orta.jest.stop",
"title": "Jest: Stop All Runners"
},
{
"command": "io.orta.jest.toggle-coverage",
"title": "Jest: Toggle Coverage"
},
{
"command": "io.orta.jest.workspace.start",
"title": "Jest: Start Runner (Select Workspace)"
},
{
"command": "io.orta.jest.workspace.stop",
"title": "Jest: Stop Runner (Select Workspace)"
},
{
"command": "io.orta.jest.workspace.toggle-coverage",
"title": "Jest: Toggle Coverage (Select Workspace)"
},
{
"command": "io.orta.jest.workspace.run-all-tests",
"title": "Jest: Run All Tests (Select Workspace)"
},
{
"command": "io.orta.jest.workspace.save-run-mode",
"title": "Jest: Save Current RunMode"
},
{
"command": "io.orta.jest.save-output-config",
"title": "Jest: Save Current Output Config"
},
{
"command": "io.orta.jest.disable-auto-focus",
"title": "Jest: Disable Auto Focus Test Output"
},
{
"command": "io.orta.jest.run-all-tests",
"title": "Jest: Run All Tests"
},
{
"command": "io.orta.jest.editor.workspace.run-all-tests",
"title": "Jest: Run All Tests in Current Workspace"
},
{
"command": "io.orta.jest.editor.workspace.toggle-coverage",
"title": "Jest: Toggle Coverage for Current Workspace"
},
{
"command": "io.orta.jest.editor.run-all-tests",
"title": "Jest: Run Related Tests"
},
{
"command": "io.orta.jest.setup-extension",
"title": "Jest: Setup Extension"
},
{
"command": "io.orta.jest.test-item.run-mode.change",
"title": "Change RunMode",
"icon": "$(gear)"
},
{
"command": "io.orta.jest.test-item.reveal-output",
"title": "Reveal Test Output",
"icon": "$(terminal)"
},
{
"command": "io.orta.jest.test-item.view-snapshot",
"title": "View Snapshot",
"icon": "$(camera)"
},
{
"command": "io.orta.jest.test-item.update-snapshot",
"title": "Update Snapshot",
"icon": "$(export)"
}
],
"menus": {
"commandPalette": [
{
"command": "io.orta.jest.workspace.start",
"when": "jest.folderCount > 1"
},
{
"command": "io.orta.jest.workspace.stop",
"when": "jest.folderCount > 1"
},
{
"command": "io.orta.jest.workspace.toggle-coverage",
"when": "jest.folderCount > 1"
},
{
"command": "io.orta.jest.editor.workspace.toggle-coverage",
"when": "jest.folderCount > 1"
},
{
"command": "io.orta.jest.workspace.run-all-tests",
"when": "jest.folderCount > 1"
},
{
"command": "io.orta.jest.editor.workspace.run-all-tests",
"when": "jest.folderCount > 1"
},
{
"command": "io.orta.jest.editor.run-all-tests",
"when": "jest.never"
},
{
"command": "io.orta.jest.test-item.run-mode.change",
"when": "jest.never"
},
{
"command": "io.orta.jest.test-item.reveal-output",
"when": "jest.never"
},
{
"command": "io.orta.jest.test-item.view-snapshot",
"when": "jest.never"
},
{
"command": "io.orta.jest.test-item.update-snapshot",
"when": "jest.never"
}
],
"editor/context": [
{
"when": "editorLangId =~ /(javascript|javascriptreact|typescript|typescriptreact|vue)/ ",
"command": "io.orta.jest.editor.run-all-tests",
"group": "Jest"
}
],
"testing/item/context": [
{
"command": "io.orta.jest.test-item.run-mode.change",
"group": "inline@1",
"when": "testId in jest.runMode"
},
{
"command": "io.orta.jest.test-item.reveal-output",
"group": "inline@2",
"when": "testId in jest.workspaceRoot"
},
{
"command": "io.orta.jest.test-item.update-snapshot"
}
],
"testing/item/gutter": [
{
"command": "io.orta.jest.test-item.view-snapshot",
"when": "testId in jest.editor-view-snapshot"
},
{
"command": "io.orta.jest.test-item.update-snapshot",
"when": "testId in jest.editor-update-snapshot"
}
]
},
"keybindings": [
{
"command": "io.orta.jest.editor.run-all-tests",
"key": "ctrl+alt+t",
"mac": "ctrl+alt+t",
"when": "editorLangId =~ /(javascript|javascriptreact|typescript|typescriptreact|vue)/ "
}
],
"debuggers": [
{
"type": "vscode-jest-tests",
"label": "Debug Jest tests using vscode-jest",
"languages": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"configurationSnippets": [
{
"label": "Jest: Default jest configuration",
"description": "Running tests by directly running jest",
"body": {
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"program": "^\"\\${workspaceFolder}/node_modules/.bin/jest\"",
"args": [
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "^\"\\${workspaceFolder}\"",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "^\"\\${workspaceFolder}/node_modules/jest/bin/jest\""
}
}
},
{
"label": "Jest: create-react-app",
"description": "Running jest within apps bootstrapped by create-react-app (and similar); you may have to edit `runtimeExecutable`",
"body": {
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"runtimeExecutable": "^\"\\${workspaceFolder}/node_modules/.bin/react-scripts\"",
"args": [
"test",
"--env=jsdom",
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "^\"\\${workspaceFolder}\"",
"console": "integratedTerminal",
"protocol": "inspector",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true
}
},
{
"label": "Jest: create-react-app (ejected)",
"description": "Running jest within apps bootstrapped by create-react-app (and similar) after ejecting",
"body": {
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"program": "^\"\\${workspaceFolder}/scripts/test\"",
"args": [
"--env=jsdom",
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "^\"\\${workspaceFolder}\"",
"console": "integratedTerminal",
"protocol": "inspector",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true
}
},
{
"label": "Jest: Angular (with Yarn)",
"description": "Running tests by using 'yarn test'",
"body": {
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"runtimeExecutable": "yarn",
"args": [
"test",
"--run-in-band",
"--watch-all=false",
"--test-name-pattern",
"${jest.testNamePattern}",
"--test-path-pattern",
"${jest.testFilePattern}"
],
"cwd": "^\"\\${workspaceFolder}\"",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true
}
}
]
}
]
},
"scripts": {
"ci": "yarn lint && yarn test --coverage",
"clean-out": "rimraf ./out",
"vscode:prepublish": "yarn clean-out && yarn compile",
"compile": "webpack --config webpack/webpack.config.js --mode production",
"compile:dev": "webpack --config webpack/webpack.config.js --mode development",
"watch": "webpack --config webpack/webpack.config.js --mode development --watch --progress",
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"*.json\" \"*.js\" ",
"lint:fix": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"*.json\" \"*.js\" --fix",
"test": "jest",
"watch-test": "yarn test -- --watch",
"tsc": "tsc --noEmit",
"update-vscode-type": "npx vscode-dts main; mv ./vscode.d.ts ./typings",
"compare-coverage": "ts-node scripts/compare-coverage.ts "
},
"dependencies": {
"istanbul-lib-coverage": "^3.2.0",
"istanbul-lib-source-maps": "^4.0.1",
"jest-editor-support": "^32.0.0-beta.1"
},
"devDependencies": {
"@types/fs-extra": "^11.0.2",
"@types/istanbul-lib-coverage": "^2.0.4",
"@types/istanbul-lib-source-maps": "^4.0.1",
"@types/jest": "^29.5.6",
"@types/node": "^20.8.10",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@vscode/test-electron": "^2.2.2",
"eslint": "^8.31.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^5.0.1",
"fs-extra": "^11.1.1",
"jest": "^29.7",
"prettier": "^3.0.3",
"raw-loader": "^4.0.1",
"rimraf": "^5.0.5",
"ts-jest": "^29.0.3",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
"__metadata": {
"id": "7997a8ae-1fae-4022-b834-12f6318aeffd",
"publisherDisplayName": "Orta",
"publisherId": "c22b4001-1af3-48d1-87ed-490c6c3b747f"
}
}