Skip to content

Commit 9a039b5

Browse files
committed
migrate unit test.
1 parent ccc9354 commit 9a039b5

File tree

11 files changed

+587
-84
lines changed

11 files changed

+587
-84
lines changed

.vscode/launch.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@
1111
"stopOnEntry": false,
1212
"sourceMaps": true,
1313
"outDir": "${workspaceRoot}/out/src",
14-
"preLaunchTask": "npm"
14+
"preLaunchTask": "${defaultBuildTask}"
1515
},
1616
{
17-
"name": "Launch Tests",
17+
"name": "Extension Tests",
1818
"type": "extensionHost",
1919
"request": "launch",
2020
"runtimeExecutable": "${execPath}",
21-
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
22-
"stopOnEntry": false,
23-
"sourceMaps": true,
24-
"outDir": "${workspaceRoot}/out/test",
25-
"preLaunchTask": "npm"
26-
}
21+
"args": [
22+
"--extensionDevelopmentPath=${workspaceFolder}",
23+
"--extensionTestsPath=${workspaceFolder}/out/src/test/suite/index"
24+
],
25+
"outFiles": [
26+
"${workspaceFolder}/out/test/**/*.js"
27+
],
28+
"preLaunchTask": "${defaultBuildTask}"
29+
}
2730
]
2831
}

.vscode/tasks.json

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
1-
// Available variables which can be used inside of strings.
2-
// ${workspaceRoot}: the root folder of the team
3-
// ${file}: the current opened file
4-
// ${fileBasename}: the current opened file's basename
5-
// ${fileDirname}: the current opened file's dirname
6-
// ${fileExtname}: the current opened file's extension
7-
// ${cwd}: the current working directory of the spawned process
8-
9-
// A task runner that calls a custom npm script that compiles the extension.
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
103
{
11-
"version": "0.1.0",
12-
13-
// we want to run npm
14-
"command": "npm",
15-
16-
// the command is a shell script
17-
"isShellCommand": true,
18-
19-
// show the output window only if unrecognized errors occur.
20-
"showOutput": "silent",
21-
22-
// we run the custom script "compile" as defined in package.json
23-
"args": ["run", "compile", "--loglevel", "silent"],
24-
25-
// The tsc compiler is started in watching mode
26-
"isWatching": true,
27-
28-
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
29-
"problemMatcher": "$tsc-watch"
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "compile",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
3020
}

coverconfig.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
"enabled": true,
3+
"relativeSourcePath": "../..",
4+
"relativeCoverageDir": "../../../coverage",
5+
"ignorePatterns": [
6+
"**/node_modules/**"
7+
],
8+
"includePid": false,
9+
"reports": [
10+
"html",
11+
"lcov",
12+
"text-summary"
13+
],
14+
"verbose": false
15+
}

0 commit comments

Comments
 (0)