Skip to content

Commit 8d21c85

Browse files
committed
smoke: uncomment debug suite
1 parent e77bbc0 commit 8d21c85

1 file changed

Lines changed: 49 additions & 49 deletions

File tree

test/smoke/src/areas/debug/debug.test.ts

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as assert from 'assert';
7-
// import * as http from 'http';
7+
import * as http from 'http';
88
import * as path from 'path';
99
import * as fs from 'fs';
1010
import * as stripJsonComments from 'strip-json-comments';
@@ -43,74 +43,74 @@ export function setup() {
4343
await app.workbench.debug.setBreakpointOnLine(6);
4444
});
4545

46-
// let port: number;
47-
// it('start debugging', async function () {
48-
// const app = this.app as Application;
46+
let port: number;
47+
it('start debugging', async function () {
48+
const app = this.app as Application;
4949

50-
// // TODO@isidor
51-
// await new Promise(c => setTimeout(c, 100));
50+
// TODO@isidor
51+
await new Promise(c => setTimeout(c, 100));
5252

53-
// port = await app.workbench.debug.startDebugging();
53+
port = await app.workbench.debug.startDebugging();
5454

55-
// await new Promise((c, e) => {
56-
// const request = http.get(`http://localhost:${port}`);
57-
// request.on('error', e);
58-
// app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 6, 'looking for index.js and line 6').then(c, e);
59-
// });
60-
// });
55+
await new Promise((c, e) => {
56+
const request = http.get(`http://localhost:${port}`);
57+
request.on('error', e);
58+
app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 6, 'looking for index.js and line 6').then(c, e);
59+
});
60+
});
6161

62-
// it('focus stack frames and variables', async function () {
63-
// const app = this.app as Application;
62+
it('focus stack frames and variables', async function () {
63+
const app = this.app as Application;
6464

65-
// await app.workbench.debug.waitForVariableCount(4);
65+
await app.workbench.debug.waitForVariableCount(4);
6666

67-
// await app.workbench.debug.focusStackFrame('layer.js', 'looking for layer.js');
68-
// await app.workbench.debug.waitForVariableCount(5);
67+
await app.workbench.debug.focusStackFrame('layer.js', 'looking for layer.js');
68+
await app.workbench.debug.waitForVariableCount(5);
6969

70-
// await app.workbench.debug.focusStackFrame('route.js', 'looking for route.js');
71-
// await app.workbench.debug.waitForVariableCount(3);
70+
await app.workbench.debug.focusStackFrame('route.js', 'looking for route.js');
71+
await app.workbench.debug.waitForVariableCount(3);
7272

73-
// await app.workbench.debug.focusStackFrame('index.js', 'looking for index.js');
74-
// await app.workbench.debug.waitForVariableCount(4);
75-
// });
73+
await app.workbench.debug.focusStackFrame('index.js', 'looking for index.js');
74+
await app.workbench.debug.waitForVariableCount(4);
75+
});
7676

77-
// it('stepOver, stepIn, stepOut', async function () {
78-
// const app = this.app as Application;
77+
it('stepOver, stepIn, stepOut', async function () {
78+
const app = this.app as Application;
7979

80-
// await app.workbench.debug.stepIn();
80+
await app.workbench.debug.stepIn();
8181

82-
// const first = await app.workbench.debug.waitForStackFrame(sf => sf.name === 'response.js', 'looking for response.js');
83-
// await app.workbench.debug.stepOver();
82+
const first = await app.workbench.debug.waitForStackFrame(sf => sf.name === 'response.js', 'looking for response.js');
83+
await app.workbench.debug.stepOver();
8484

85-
// await app.workbench.debug.waitForStackFrame(sf => sf.name === 'response.js' && sf.lineNumber === first.lineNumber + 1, `looking for response.js and line ${first.lineNumber + 1}`);
86-
// await app.workbench.debug.stepOut();
85+
await app.workbench.debug.waitForStackFrame(sf => sf.name === 'response.js' && sf.lineNumber === first.lineNumber + 1, `looking for response.js and line ${first.lineNumber + 1}`);
86+
await app.workbench.debug.stepOut();
8787

88-
// await app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 7, `looking for index.js and line 7`);
89-
// });
88+
await app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 7, `looking for index.js and line 7`);
89+
});
9090

91-
// it('continue', async function () {
92-
// const app = this.app as Application;
91+
it('continue', async function () {
92+
const app = this.app as Application;
9393

94-
// await app.workbench.debug.continue();
94+
await app.workbench.debug.continue();
9595

96-
// await new Promise((c, e) => {
97-
// const request = http.get(`http://localhost:${port}`);
98-
// request.on('error', e);
99-
// app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 6, `looking for index.js and line 6`).then(c, e);
100-
// });
96+
await new Promise((c, e) => {
97+
const request = http.get(`http://localhost:${port}`);
98+
request.on('error', e);
99+
app.workbench.debug.waitForStackFrame(sf => sf.name === 'index.js' && sf.lineNumber === 6, `looking for index.js and line 6`).then(c, e);
100+
});
101101

102-
// });
102+
});
103103

104-
// it('debug console', async function () {
105-
// const app = this.app as Application;
104+
it('debug console', async function () {
105+
const app = this.app as Application;
106106

107-
// await app.workbench.debug.waitForReplCommand('2 + 2', r => r === '4');
108-
// });
107+
await app.workbench.debug.waitForReplCommand('2 + 2', r => r === '4');
108+
});
109109

110-
// it('stop debugging', async function () {
111-
// const app = this.app as Application;
110+
it('stop debugging', async function () {
111+
const app = this.app as Application;
112112

113-
// await app.workbench.debug.stopDebugging();
114-
// });
113+
await app.workbench.debug.stopDebugging();
114+
});
115115
});
116116
}

0 commit comments

Comments
 (0)