Skip to content

Commit

Permalink
api tests: allow to run and debug them
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Nov 25, 2015
1 parent 5364452 commit 7754743
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"typescript/src/lib",
"typescript/out/lib",
"jshint",
"csharp-o"
"csharp-o",
"vscode-api-tests/node_modules"
]
}
17 changes: 17 additions & 0 deletions extensions/vscode-api-tests/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["${workspaceRoot}/../../", "${workspaceRoot}/testWorkspace", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out" ],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "out",
"preLaunchTask": "npm"
}
]
}
30 changes: 30 additions & 0 deletions extensions/vscode-api-tests/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process

// A task runner that calls a custom npm script that compiles the extension.
{
"version": "0.1.0",

// we want to run npm
"command": "npm",

// the command is a shell script
"isShellCommand": true,

// show the output window only if unrecognized errors occur.
"showOutput": "silent",

// we run the custom script "compile" as defined in package.json
"args": ["run", "compile", "--loglevel", "silent"],

// The tsc compiler is started in watching mode
"isWatching": true,

// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
}
2 changes: 2 additions & 0 deletions extensions/vscode-api-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"vscode": "*"
},
"scripts": {
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../gulpfile.plugins.js compile-plugin:vscode-api-tests ./tsconfig.json"
},
"devDependencies": {
"typescript": "^1.6.2",
"vscode": "next"
}
}

0 comments on commit 7754743

Please sign in to comment.