Skip to content

Commit 9597ae8

Browse files
authored
Enable unit testing of the DF API (#262)
1 parent e6538a0 commit 9597ae8

29 files changed

+5311
-3787
lines changed

.vscode/extensions.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
{
2-
"recommendations": ["editorconfig.editorconfig", "eg2.vscode-npm-script", "esbenp.prettier-vscode"]
3-
}
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions",
4+
"editorconfig.editorconfig",
5+
"eg2.vscode-npm-script",
6+
"esbenp.prettier-vscode"
7+
]
8+
}

.vscode/launch.json

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
8-
97
{
108
"type": "node",
119
"request": "launch",
@@ -17,7 +15,7 @@
1715
"${workspaceRoot}/lib/**/*.js"
1816
],
1917
"env": {
20-
"DEBUG":"*"
18+
"DEBUG": "*"
2119
},
2220
"preLaunchTask": "build"
2321
},
@@ -33,7 +31,8 @@
3331
{
3432
"type": "node",
3533
"request": "attach",
36-
"name": "Attach","outFiles": [
34+
"name": "Attach",
35+
"outFiles": [
3736
"${workspaceRoot}/lib/**/*.js"
3837
],
3938
"port": 5858
@@ -75,6 +74,13 @@
7574
"${workspaceFolder}/lib/**"
7675
],
7776
"preLaunchTask": "build"
77+
},
78+
{
79+
"name": "Attach to Node Functions",
80+
"type": "node",
81+
"request": "attach",
82+
"port": 9229,
83+
"preLaunchTask": "func: host start"
7884
}
7985
]
8086
}

.vscode/settings.json

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
{
2-
"typescript.tsdk": "node_modules\\typescript\\lib"
2+
"typescript.tsdk": "node_modules\\typescript\\lib",
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true,
5+
"files.exclude": {
6+
"obj": true,
7+
"bin": true
8+
},
9+
"azureFunctions.deploySubpath": "samples",
10+
"azureFunctions.postDeployTask": "npm install",
11+
"azureFunctions.projectLanguage": "TypeScript",
12+
"azureFunctions.projectRuntime": "~3",
13+
"debug.internalConsoleOptions": "neverOpen",
14+
"azureFunctions.preDeployTask": "npm prune"
315
}

.vscode/tasks.json

+70-13
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,85 @@
11
{
22
// See https://go.microsoft.com/fwlink/?LinkId=733558
33
// for the documentation about the tasks.json format
4-
"version": "0.1.0",
4+
"version": "2.0.0",
55
"command": "npm",
6-
"isShellCommand": true,
7-
"showOutput": "silent",
8-
"suppressTaskName": true,
96
"tasks": [
107
{
11-
"taskName": "install",
12-
"args": ["install"]
8+
"label": "install",
9+
"type": "shell",
10+
"args": [
11+
"install"
12+
],
13+
"problemMatcher": []
1314
},
1415
{
15-
"taskName": "update",
16-
"args": ["update"]
16+
"label": "update",
17+
"type": "shell",
18+
"args": [
19+
"update"
20+
],
21+
"problemMatcher": []
1722
},
1823
{
19-
"taskName": "test",
20-
"args": ["run", "test"]
24+
"label": "test",
25+
"type": "shell",
26+
"args": [
27+
"run",
28+
"test"
29+
],
30+
"problemMatcher": [],
31+
"group": "test"
2132
},
2233
{
23-
"taskName": "build",
24-
"isBuildCommand": true,
25-
"args": ["run", "build"]
34+
"label": "build",
35+
"type": "shell",
36+
"args": [
37+
"run",
38+
"build"
39+
],
40+
"problemMatcher": [],
41+
"group": "build"
42+
},
43+
{
44+
"type": "func",
45+
"command": "host start",
46+
"problemMatcher": "$func-node-watch",
47+
"isBackground": true,
48+
"dependsOn": "npm build",
49+
"options": {
50+
"cwd": "${workspaceFolder}/samples"
51+
}
52+
},
53+
{
54+
"type": "shell",
55+
"label": "npm build",
56+
"command": "npm run build",
57+
"dependsOn": [
58+
"func: extensions install",
59+
"npm install"
60+
],
61+
"problemMatcher": "$tsc",
62+
"options": {
63+
"cwd": "${workspaceFolder}/samples"
64+
}
65+
},
66+
{
67+
"type": "shell",
68+
"label": "npm install",
69+
"command": "npm install",
70+
"options": {
71+
"cwd": "${workspaceFolder}/samples"
72+
}
73+
},
74+
{
75+
"type": "shell",
76+
"label": "npm prune",
77+
"command": "npm prune --production",
78+
"dependsOn": "npm build",
79+
"problemMatcher": [],
80+
"options": {
81+
"cwd": "${workspaceFolder}/samples"
82+
}
2683
}
2784
]
2885
}

0 commit comments

Comments
 (0)