Skip to content

Commit ca0eba2

Browse files
committed
Merge pull request #42 from NativeScript/buhov/debugadapter-tests
Add debug adapter tests
2 parents ae06b12 + cdc8d13 commit ca0eba2

File tree

77 files changed

+1488
-122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1488
-122
lines changed

.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
.DS_Store
22
out/
33
node_modules/
4-
typings/
5-
6-
nativescript-vscode-extension*.vsix
7-
4+
src/typings/
5+
src/tests/config/custom.json
6+
src/tests/testdata/JSApp
7+
src/tests/testdata/TSApp
8+
src/tests/testdata/**/node_modules
9+
src/tests/testdata/**/platforms
10+
npm-debug.log
11+
nativescript-*.vsix

.vscode/launch.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

.vscodeignore

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
**/*.ts
22
**/*.map
3-
.vscode/**
4-
typings/**
3+
node_modules/.bin/**
4+
src/**
5+
out/tests/**
56
images/screenshots/**
67
*.vsix
7-
gulpfile.js
8-
tsconfig.json
9-
tsd.json
10-
tslint.json
118
.gitignore
12-
13-
node_modules/.bin/**
9+
CHANGELOG.md
10+
CONTRIBUTING.md
11+
npm-debug.log

package.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,27 @@
2626
"license": "SEE LICENSE IN LICENSE.txt",
2727
"dependencies": {
2828
"source-map": "^0.5.3",
29-
"vscode-debugprotocol": "^1.6.1",
30-
"vscode-debugadapter": "^1.6.1"
29+
"vscode-debugprotocol": "^1.7.0",
30+
"vscode-debugadapter": "^1.7.0"
3131
},
3232
"devDependencies": {
33+
"mocha": "^2.4.5",
3334
"tslint": "^3.5.0",
3435
"typescript": "^1.8.2",
3536
"typings": "^0.7.9",
3637
"vsce": "^1.0.0",
37-
"vscode": "^0.11.x"
38+
"vscode": "^0.11.x",
39+
"vscode-debugadapter-testsupport": "^1.7.0"
3840
},
3941
"scripts": {
40-
"postinstall": "node ./node_modules/vscode/bin/install && typings install",
42+
"postinstall": "node ./node_modules/vscode/bin/install && cd src && typings install",
4143
"clean": "git clean -fdx",
42-
"build": "tsc",
43-
"package": "vsce package"
44+
"build": "tsc -p ./src",
45+
"package": "vsce package",
46+
"launch-as-server": "node --nolazy ./out/webkit/webKitDebug.js --server=4712",
47+
"test-mac": "mocha --opts ./src/tests/config/mocha.opts --config ../../src/tests/config/mac.json ./out/tests",
48+
"test-win": "mocha --opts ./src/tests/config/mocha.opts --config ../../src/tests/config/win.json ./out/tests",
49+
"test-custom": "mocha --opts ./src/tests/config/mocha.opts --config ../../src/tests/config/custom.json ./out/tests"
4450
},
4551
"main": "./out/nativescript/nsMain",
4652
"activationEvents": [

src/.vscode/launch.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"version": "0.1.0",
3+
"configurations": [
4+
{
5+
"name": "launch as server",
6+
"type": "node",
7+
"request": "launch",
8+
"program": "${workspaceRoot}/../out/webkit/webKitDebug.js",
9+
"runtimeArgs": ["--nolazy"],
10+
"args": [ "--server=4712" ],
11+
"stopOnEntry": false,
12+
"sourceMaps": true,
13+
"outDir": "${workspaceRoot}/../out",
14+
"cwd": "${workspaceRoot}"
15+
},
16+
{
17+
"name": "launch in extension host",
18+
"type": "extensionHost",
19+
"request": "launch",
20+
// Path to VSCode executable
21+
"runtimeExecutable": "${execPath}",
22+
"args": [
23+
"--extensionDevelopmentPath=${workspaceRoot}"
24+
],
25+
"stopOnEntry": false,
26+
"sourceMaps": true,
27+
"outDir": "${workspaceRoot}/../out",
28+
"cwd": "${workspaceRoot}"
29+
},
30+
{
31+
"name": "run tests on mac",
32+
"type": "node",
33+
"request": "launch",
34+
"program": "${workspaceRoot}/../node_modules/mocha/bin/_mocha",
35+
"runtimeArgs": [ "--nolazy" ],
36+
"args": [
37+
"--opts", "${workspaceRoot}/tests/config/mocha.opts",
38+
"--config", "${workspaceRoot}/tests/config/mac.json",
39+
"${workspaceRoot}/../out/tests/"
40+
],
41+
"stopOnEntry": false,
42+
"sourceMaps": true,
43+
"outDir": "${workspaceRoot}/../out",
44+
"cwd": "${workspaceRoot}"
45+
},
46+
{
47+
"name": "run tests on win",
48+
"type": "node",
49+
"request": "launch",
50+
"program": "${workspaceRoot}/../node_modules/mocha/bin/_mocha",
51+
"runtimeArgs": [ "--nolazy" ],
52+
"args": [
53+
"--opts", "${workspaceRoot}/tests/config/mocha.opts",
54+
"--config", "${workspaceRoot}/tests/config/win.json",
55+
"${workspaceRoot}/../out/tests/"
56+
],
57+
"stopOnEntry": false,
58+
"sourceMaps": true,
59+
"outDir": "${workspaceRoot}/../out",
60+
"cwd": "${workspaceRoot}"
61+
},
62+
{
63+
"name": "run tests (custom)",
64+
"type": "node",
65+
"request": "launch",
66+
"program": "${workspaceRoot}/../node_modules/mocha/bin/_mocha",
67+
"runtimeArgs": [ "--nolazy" ],
68+
"args": [
69+
"--opts", "${workspaceRoot}/tests/config/mocha.opts",
70+
"--config", "${workspaceRoot}/tests/config/custom.json",
71+
"${workspaceRoot}/../out/tests/"
72+
],
73+
"stopOnEntry": false,
74+
"sourceMaps": true,
75+
"outDir": "${workspaceRoot}/../out",
76+
"cwd": "${workspaceRoot}"
77+
}
78+
]
79+
}
File renamed without changes.

.vscode/tasks.json renamed to src/.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"version": "0.1.0",
33
"windows": {
4-
"command": ".\\node_modules\\.bin\\tsc"
4+
"command": "..\\node_modules\\.bin\\tsc"
55
},
6-
"command": "./node_modules/.bin/tsc",
6+
"command": "../node_modules/.bin/tsc",
77
"isShellCommand": true,
88
"args": ["-p", "."],
99
"problemMatcher": "$tsc"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)