FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
VSpaceCode/src/test/runTest-node.ts at master · VSpaceCode/VSpaceCode · GitHub
VSpaceCode
/
VSpaceCode
Public
Notifications
You must be signed in to change notification settings
Fork
129
Star
1.5k
Code
Issues
66
Pull requests
13
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
VSpaceCode
/
src
/
test
/
runTest-node.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (44 loc) · 1.44 KB
Breadcrumbs
VSpaceCode
/
src
/
test
/
runTest-node.ts
Copy path
File metadata and controls
50 lines (44 loc) · 1.44 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
{
downloadAndUnzipVSCode
,
resolveCliArgsFromVSCodeExecutablePath
,
runTests
,
}
from
"@vscode/test-electron"
;
import
{
spawnSync
}
from
"child_process"
;
import
*
as
path
from
"path"
;
async
function
main
(
)
{
try
{
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const
extensionDevelopmentPath
=
path
.
resolve
(
__dirname
,
"../../"
)
;
// The path to test runner
// Passed to --extensionTestsPath
const
extensionTestsPath
=
path
.
resolve
(
__dirname
,
"./suite/index-node"
)
;
// Download vscode manually so we can install dependent extension
const
vscodeExecutablePath
=
await
downloadAndUnzipVSCode
(
"stable"
)
;
// Install dependent extension
const
[
cli
,
...
args
]
=
resolveCliArgsFromVSCodeExecutablePath
(
vscodeExecutablePath
)
;
spawnSync
(
cli
,
[
...
args
,
"--install-extension"
,
"VSpaceCode.whichkey"
]
,
{
encoding
:
"utf-8"
,
stdio
:
"inherit"
,
}
)
;
// Download VS Code, unzip it and run the integration test
await
runTests
(
{
vscodeExecutablePath
,
extensionDevelopmentPath
,
extensionTestsPath
,
}
)
;
}
catch
(
err
)
{
console
.
error
(
err
)
;
console
.
error
(
"Failed to run tests"
)
;
process
.
exit
(
1
)
;
}
}
main
(
)
;
Back
|
FazBrowse Home
|
New Git URL