Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
Make intervalDebugger testdata sourcemapped
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Dec 31, 2016
1 parent ff55b4e commit c63e5d3
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 17 deletions.
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.DS_Store
node_modules/
out/
lib/
*.vsix
.browse.VC.db
vscode-chrome-debug.txt
npm-debug.log
*.vsix

lib/
node_modules/
/out/
typings/
.browse.VC.db
testapp/.vscode/chrome
npm-debug.log
testapp/**/out/
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"args": [
"-u", "tdd",
"--colors",
"out/test/**/*.test.js"
"out/test/**/*.test.js",
"--timeout", "1800000"
],
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/**/*.js"]
Expand Down
19 changes: 11 additions & 8 deletions test/int/adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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([
Expand 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;
});
});
});
});
4 changes: 2 additions & 2 deletions testdata/intervalDebugger/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!doctype html>
<html>
<head>
<script src="app.js"></script>
<script src="out/app.js"></script>
<body>
<h1>Hello, world!</h1>
<h1>testdata/intervalDebugger</h1>
</body>
</html>
5 changes: 5 additions & 0 deletions testdata/intervalDebugger/out/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions testdata/intervalDebugger/out/app.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
6 changes: 6 additions & 0 deletions testdata/intervalDebugger/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"sourceMap": true,
"outDir": "out"
}
}

0 comments on commit c63e5d3

Please sign in to comment.