diff --git a/.gitignore b/.gitignore index 598c8f2..282326e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ .DS_Store -node_modules/ -out/ -lib/ -*.vsix -vscode-chrome-debug.txt -typings/ .browse.VC.db +vscode-chrome-debug.txt +npm-debug.log +*.vsix + +lib/ +node_modules/ +/out/ +typings/ testapp/.vscode/chrome -npm-debug.log \ No newline at end of file +testapp/**/out/ \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 88baf8f..a3e62d5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -24,7 +24,8 @@ "args": [ "-u", "tdd", "--colors", - "out/test/**/*.test.js" + "out/test/**/*.test.js", + "--timeout", "1800000" ], "sourceMaps": true, "outFiles": ["${workspaceRoot}/out/**/*.js"] diff --git a/test/int/adapter.test.ts b/test/int/adapter.test.ts index cc2758c..779ba66 100644 --- a/test/int/adapter.test.ts +++ b/test/int/adapter.test.ts @@ -8,13 +8,11 @@ import * as path from 'path'; const {createServer} = require('http-server'); import {DebugClient} from 'vscode-debugadapter-testsupport'; -import {DebugProtocol} from 'vscode-debugprotocol'; import * as testUtils from './intTestUtils'; import * as testSetup from './testSetup'; const DATA_ROOT = testSetup.DATA_ROOT; -const THREAD_ID = testUtils.THREAD_ID; suite('Chrome Debug Adapter etc', () => { let dc: DebugClient; @@ -49,7 +47,7 @@ suite('Chrome Debug Adapter etc', () => { test('should stop on debugger statement in file:///', () => { const testProjectRoot = path.join(DATA_ROOT, 'intervalDebugger'); const launchFile = path.join(testProjectRoot, 'index.html'); - const breakFile = path.join(testProjectRoot, 'app.js'); + const breakFile = path.join(testProjectRoot, 'out/app.js'); const DEBUGGER_LINE = 2; return Promise.all([ @@ -61,18 +59,23 @@ suite('Chrome Debug Adapter etc', () => { test('should stop on debugger statement in http://localhost', () => { const testProjectRoot = path.join(DATA_ROOT, 'intervalDebugger'); - const breakFile = path.join(testProjectRoot, 'app.js'); + const breakFile = path.join(testProjectRoot, 'out/app.js'); const DEBUGGER_LINE = 2; - const server = createServer({ root: testProjectRoot }) - .listen(7890); + const server = createServer({ root: testProjectRoot }); + server.listen(7890); return Promise.all([ dc.configurationSequence(), - dc.launch({ url: 'http://localhost:7890' }), + dc.launch({ url: 'http://localhost:7890', webRoot: testProjectRoot }), dc.assertStoppedLocation('debugger statement', { path: breakFile, line: DEBUGGER_LINE } ) ]) - .then(() => server.close()); + .then( + () => server.close(), + e => { + server.close(); + throw e; + }); }); }); }); \ No newline at end of file diff --git a/testdata/intervalDebugger/index.html b/testdata/intervalDebugger/index.html index c41df5c..424fe48 100644 --- a/testdata/intervalDebugger/index.html +++ b/testdata/intervalDebugger/index.html @@ -1,8 +1,8 @@
- + -