|
4 | 4 | { |
5 | 5 | "type": "node", |
6 | 6 | "request": "launch", |
7 | | - "name": "Jest Current File", |
8 | | - "program": "${workspaceFolder}/node_modules/.bin/jest", |
9 | | - "args": ["--testTimeout=100000", "--findRelatedTests", "${relativeFile}"], |
10 | | - "console": "integratedTerminal", |
11 | | - "internalConsoleOptions": "neverOpen", |
12 | | - "skipFiles": ["<node_internals>/**"] |
13 | | - }, |
14 | | - { |
15 | | - "type": "node", |
16 | | - "request": "launch", |
17 | | - "name": "Jest Watch Current File", |
| 7 | + "name": "Jest - run only related tests for current file", |
18 | 8 | "program": "${workspaceFolder}/node_modules/.bin/jest", |
19 | 9 | "args": [ |
20 | 10 | "--testTimeout=100000", |
21 | | - "--watch", |
22 | 11 | "--findRelatedTests", |
23 | | - "${relativeFile}" |
| 12 | + "--runInBand", |
| 13 | + "--verbose", |
| 14 | + "${relativeFile}", |
| 15 | + "${input:additionalJestArgs}" |
24 | 16 | ], |
25 | 17 | "console": "integratedTerminal", |
26 | 18 | "internalConsoleOptions": "neverOpen", |
27 | 19 | "skipFiles": ["<node_internals>/**"] |
28 | 20 | }, |
29 | 21 | { |
30 | | - "name": "Run Jest Tests for Current Package", |
| 22 | + "name": "Jest - run _all_ tests for current file's package", |
31 | 23 | "type": "node", |
32 | 24 | "request": "launch", |
33 | 25 | "program": "${workspaceFolder}/node_modules/.bin/jest", |
34 | | - "args": ["--testTimeout=100000"], |
35 | | - "console": "integratedTerminal", |
36 | | - "internalConsoleOptions": "neverOpen", |
37 | | - "cwd": "${fileDirname}" |
38 | | - }, |
39 | | - { |
40 | | - "type": "node", |
41 | | - "name": "Jest All", |
42 | | - "request": "launch", |
43 | | - "args": [ |
44 | | - "--testTimeout=100000", |
45 | | - "-c", |
46 | | - "${workspaceFolder}/jest.config.js" |
47 | | - ], |
48 | | - "cwd": "${workspaceFolder}", |
49 | | - "console": "integratedTerminal", |
50 | | - "internalConsoleOptions": "neverOpen", |
51 | | - "program": "${workspaceFolder}/node_modules/jest/bin/jest", |
52 | | - "skipFiles": ["<node_internals>/**"] |
53 | | - }, |
54 | | - { |
55 | | - "type": "node", |
56 | | - "name": "Jest All: Browser", |
57 | | - "request": "launch", |
58 | 26 | "args": [ |
59 | 27 | "--testTimeout=100000", |
60 | | - "-c", |
61 | | - "${workspaceFolder}/packages/browser/jest.config.js" |
| 28 | + "--runInBand", |
| 29 | + "${input:additionalJestArgs}" |
62 | 30 | ], |
63 | | - "cwd": "${workspaceFolder}", |
64 | 31 | "console": "integratedTerminal", |
65 | 32 | "internalConsoleOptions": "neverOpen", |
66 | | - "program": "${workspaceFolder}/node_modules/jest/bin/jest", |
67 | | - "skipFiles": ["<node_internals>/**"] |
| 33 | + "skipFiles": ["<node_internals>/**"], |
| 34 | + "cwd": "${fileDirname}" |
68 | 35 | }, |
69 | 36 | { |
70 | | - "name": "ts-node Current File", |
| 37 | + "name": "ts-node - execute current .ts file/script", |
71 | 38 | "type": "node", |
72 | 39 | "request": "launch", |
73 | 40 | "args": ["${relativeFile}"], |
74 | 41 | "runtimeArgs": ["-r", "ts-node/register"], |
75 | 42 | "cwd": "${workspaceRoot}", |
76 | 43 | "internalConsoleOptions": "openOnSessionStart" |
77 | 44 | } |
| 45 | + ], |
| 46 | + "inputs": [ |
| 47 | + { |
| 48 | + "id": "additionalJestArgs", |
| 49 | + "type": "pickString", |
| 50 | + "description": "(Optional) Select additional Jest arguments", |
| 51 | + "options": [ |
| 52 | + { "label": "none", "value": "" }, |
| 53 | + { "label": "", "value": "--watch" }, |
| 54 | + { "label": "", "value": "--updateSnapshot" }, |
| 55 | + { "label": "", "value": "--coverage" }, |
| 56 | + { "label": "", "value": "--runInBand" } |
| 57 | + ], |
| 58 | + "default": "" |
| 59 | + }, |
| 60 | + { |
| 61 | + "id": "packageName", |
| 62 | + "type": "pickString", |
| 63 | + "description": "Select a package to debug", |
| 64 | + "options": ["@segment/analytics-", "package-b", "package-c"] |
| 65 | + } |
78 | 66 | ] |
79 | 67 | } |
0 commit comments