-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpackage.json
275 lines (275 loc) · 10.2 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
{
"name": "nodejs-testing",
"displayName": "node:test runner",
"description": "Test integration for node:test native tests",
"publisher": "connor4312",
"version": "1.6.3",
"engines": {
"vscode": "^1.93.0"
},
"keywords": [
"node",
"node.js",
"nodejs"
],
"categories": [
"Testing"
],
"activationEvents": [
"workspaceContains:**/*.{js,cjs,mjs,ts,cts,mts}",
"onCommand:nodejs-testing.get-controllers-for-test"
],
"icon": "icon.png",
"contributes": {
"configuration": [
{
"title": "Node.js Test Runner",
"properties": {
"nodejs-testing.nodejsPath": {
"type": "string",
"default": "node",
"description": "Path to the Node.js binary used to run tests"
},
"nodejs-testing.nodejsParameters": {
"type": "array",
"deprecationMessage": "Use nodejs-testing.extensions instead!",
"markdownDescription": "Additional Parameters that will be passed onto the worker node process. Each parameter is a separate item in the array. \n\n To get for example `node --import /abs/path/to/file.js` you need 2 entries \n 1. `--import` \n 2. `${workspaceFolder}/to/file.js`. Attention, this process does not initiate the unit tests. The parameters for the process that starts the unit tests are defined using the `extensions` data structure.",
"default": [],
"items": {
"type": "string"
}
},
"nodejs-testing.include": {
"type": "array",
"markdownDescription": "Directories which to find tests, relative to your workspace folder. Files that match the [Node.js test patterns](https://nodejs.org/api/test.html#test-runner-execution-model) will be included.\n\nNote: if you compile your code, this should point to the location of your compiled files, not your source files.",
"default": [
"./"
],
"items": {
"type": "string"
}
},
"nodejs-testing.exclude": {
"type": "array",
"markdownDescription": "Paths to exclude from test discovery. Defaults to the [Node.js default pattern](https://nodejs.org/api/test.html#test-runner-execution-model).",
"default": [
"**/node_modules/**"
],
"items": {
"type": "string"
}
},
"nodejs-testing.concurrency": {
"type": "number",
"format": "integer",
"description": "How many test files to run in parallel. Setting it to 0 (default) will use the number of CPU cores - 1.",
"default": 0
},
"nodejs-testing.verbose": {
"type": "boolean",
"description": "Print raw events received from the test runner. Useful for debugging and filing issues.",
"default": false
},
"nodejs-testing.style": {
"enum": [
"dot",
"spec"
],
"description": "The style of the test output.",
"default": "spec"
},
"nodejs-testing.pretest": {
"type": "array",
"items": {
"type": "string"
},
"description": "A command to run in your terminal before tests are run.",
"examples": [
[
"npm",
"run",
"pretest"
]
]
},
"nodejs-testing.extensions": {
"type": "array",
"markdownDescription": "A list of test extensions to search for, and optional additional Node.js parameters to pass when running those test files. It defaults to\n\n```json\n[\n {\n \"extensions\": [\"mjs\", \"cjs\", \"js\"],\n \"parameters\": []\n }\n]\n```\n\n...but is useful for configuring loaders for other file types. For example, to run TypeScript tests, you could use\n\n```json\n{\n \"nodejs-testing.extensions\": [\n {\n \"extensions\": [\"mjs\", \"cjs\", \"js\"],\n \"parameters\": []\n },\n {\n \"extensions\": [\"mts\", \"cts\", \"ts\"],\n \"parameters\": [\"--loader\", \"tsx\"]\n }\n ]\n}\n```\n\nYou can also import other helpers by adding parameters like `[\"--import\", \"${workspaceFolder}/path/to/file.js\"]`. See the [Node.js command line API](https://nodejs.org/api/cli.html) for a full list of options.",
"default": [
{
"extensions": [
"mjs",
"cjs",
"js"
],
"parameters": []
}
],
"items": {
"type": "object",
"default": {
"extensions": [
"mts",
"cts",
"ts"
],
"parameters": [
"--loader",
"tsx"
]
},
"required": [
"extensions",
"parameters"
],
"properties": {
"extensions": {
"type": "array",
"markdownDescription": "Extensions. For example [\"ts\"]",
"items": {
"type": "string"
}
},
"filePatterns": {
"type": "array",
"markdownDescription": "Glob pattern to match files. Defaults to the default [naming scheme](https://nodejs.org/docs/latest-v20.x/api/test.html#running-tests-from-the-command-line) of the Node.js test runner CLI. For example `[\"**/*.spec.ts\"]`.",
"items": {
"type": "string"
}
},
"parameters": {
"type": "array",
"markdownDescription": "Additional parameters can be defined here, which are passed to the process, that executes the unit tests. For example [\"--loader\", \"tsx\"]",
"items": {
"type": "string"
}
}
}
}
},
"nodejs-testing.envFile": {
"type": "string",
"markdownDescription": "Absolute path to a file containing environment variable definitions.\n\nNote: template parameters like ${workspaceFolder} will be resolved.",
"default": ""
},
"nodejs-testing.env": {
"type": "object",
"markdownDescription": "Environment variables passed to the program. The value null removes the variable from the environment.\n\nNote: This takes precedence over envFile.",
"additionalProperties": {
"type": "string"
},
"default": {}
},
"nodejs-testing.debugOptions": {
"type": "object",
"markdownDescription": "Options used for debugging, normally found in your launch.json. [See documentation here](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-attributes).",
"examples": [
{
"skipFiles": [
"**/node_modules/**",
"<node_internals>/**"
]
}
],
"default": {}
}
}
}
],
"commands": [
{
"title": "Create Snapshot File",
"command": "nodejs-testing.rerunWithSnapshot"
},
{
"title": "Update Snapshot File",
"command": "nodejs-testing.rerunWithSnapshot2"
}
],
"menus": {
"commandPalette": [
{
"command": "nodejs-testing.rerunWithSnapshot",
"when": "false"
},
{
"command": "nodejs-testing.rerunWithSnapshot2",
"when": "false"
}
],
"testing/message/content": [
{
"command": "nodejs-testing.rerunWithSnapshot",
"when": "testMessage == isNodejsSnapshotMissing && !testResultOutdated"
},
{
"command": "nodejs-testing.rerunWithSnapshot2",
"when": "testMessage == isNodejsSnapshotOutdated && !testResultOutdated"
}
]
}
},
"repository": {
"type": "git",
"url": "https://github.com/connor4312/nodejs-testing.git"
},
"bugs": {
"url": "https://github.com/connor4312/nodejs-testing/issues"
},
"homepage": "https://github.com/connor4312/nodejs-testing#readme",
"main": "./out/extension.js",
"scripts": {
"package": "npx -y @vscode/vsce package --no-dependencies",
"vscode:prepublish": "node .esbuild.js --minify",
"compile": "node .esbuild.js --minify",
"watch": "node .esbuild.js --watch",
"compile:testcases": "node testCases/.esbuild.js",
"test": "npm run test:unit && npm run test:integration",
"test:unit": "tsc --noEmit && vitest run",
"test:integration": "node .esbuild.js --no-minify && node out/test/run",
"fmt": "prettier --write src *.md"
},
"devDependencies": {
"@types/estree": "^1.0.5",
"@types/istanbul-lib-report": "^3.0.3",
"@types/mocha": "^10.0.6",
"@types/node": "20.x",
"@types/picomatch": "^3.0.1",
"@types/sinon": "^17.0.3",
"@types/split2": "^4.2.3",
"@types/vscode": "^1.93.0",
"@types/ws": "^8.5.10",
"@vscode/test-electron": "^2.3.9",
"acorn": "^8.11.3",
"chalk": "^5.3.0",
"esbuild": "^0.24.0",
"mocha": "^10.3.0",
"prettier": "^3.2.5",
"sinon": "^17.0.1",
"tsx": "^4.7.3",
"typescript": "^5.7.2",
"vitest": "^2.1.1"
},
"prettier": {
"printWidth": 100
},
"dependencies": {
"@c4312/vscode-variables": "^1.0.0",
"@hediet/json-rpc": "^0.3.0",
"@hediet/json-rpc-streams": "https://gitpkg.now.sh/hediet/typed-json-rpc/json-rpc-streams?d4d660cf19acd424ef4f782822efc34c01f97c1a",
"@jridgewell/trace-mapping": "^0.3.23",
"acorn-loose": "^8.4.0",
"ansi-colors": "^4.1.3",
"c8": "9.1.0",
"data-uri-to-buffer": "^6.0.2",
"dotenv": "^16.4.5",
"eslint-visitor-keys": "^4.1.0",
"istanbul-lib-report": "^3.0.1",
"istanbul-to-vscode": "^2.0.1",
"picomatch": "^4.0.1",
"pretty-format": "^29.7.0",
"split2": "^4.2.0",
"stacktrace-parser": "^0.1.10",
"ws": "^8.16.0"
}
}