File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import * as path from "path";
44import { runTests } from "@vscode/test-electron" ;
55
66async function main ( ) {
7+ const tempRoot = fs . mkdtempSync (
8+ path . join ( os . tmpdir ( ) , "vscode-htmlhint-tests-" ) ,
9+ ) ;
10+
711 try {
812 // The folder containing the Extension Manifest package.json
913 // Passed to `--extensionDevelopmentPath`
@@ -12,9 +16,6 @@ async function main() {
1216 // The path to the test runner
1317 // Passed to --extensionTestsPath
1418 const extensionTestsPath = path . resolve ( __dirname , "./suite/index" ) ;
15- const tempRoot = fs . mkdtempSync (
16- path . join ( os . tmpdir ( ) , "vscode-htmlhint-tests-" ) ,
17- ) ;
1819 const extensionTestsEnvPath = path . join ( tempRoot , "extensions" ) ;
1920 const userDataDir = path . join ( tempRoot , "user-data" ) ;
2021 const extensionPackageJsonPath = path . resolve (
@@ -50,6 +51,8 @@ async function main() {
5051 } catch ( err ) {
5152 console . error ( "Failed to run tests" , err ) ;
5253 process . exit ( 1 ) ;
54+ } finally {
55+ fs . rmSync ( tempRoot , { recursive : true , force : true } ) ;
5356 }
5457}
5558
You can’t perform that action at this time.
0 commit comments