Skip to content

Commit b9068d9

Browse files
Update tests with API changes
1 parent 43eda6c commit b9068d9

4 files changed

Lines changed: 11 additions & 18 deletions

File tree

apps/client-e2e/src/tests/debugging/breakpoint-step-in-step-out.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,27 @@ export const BreakpointStepInStepOut: RunnerFunction = async (init) => {
6262
/** Run our file */
6363
await vscode.commands.executeCommand(IDL_COMMANDS.DEBUG.RUN);
6464
await Sleep(DEBUG_PAUSE);
65-
expect(init.debug.adapter.stopped?.stack?.line).toEqual(19);
65+
expect(init.debug.adapter._eventHelper.stopped?.stack?.line).toEqual(19);
6666

6767
// step in
6868
await vscode.commands.executeCommand(VSCODE_COMMANDS.DEBUG_STEP_INTO);
6969
await Sleep(DEBUG_PAUSE);
70-
expect(init.debug.adapter.stopped?.stack?.line).toEqual(9);
70+
expect(init.debug.adapter._eventHelper.stopped?.stack?.line).toEqual(9);
7171

7272
// step over
7373
await vscode.commands.executeCommand(VSCODE_COMMANDS.DEBUG_STEP_OVER);
7474
await Sleep(DEBUG_PAUSE);
75-
expect(init.debug.adapter.stopped?.stack?.line).toEqual(11);
75+
expect(init.debug.adapter._eventHelper.stopped?.stack?.line).toEqual(11);
7676

7777
// step in
7878
await vscode.commands.executeCommand(VSCODE_COMMANDS.DEBUG_STEP_OVER);
7979
await Sleep(DEBUG_PAUSE);
80-
expect(init.debug.adapter.stopped?.stack?.line).toEqual(12);
80+
expect(init.debug.adapter._eventHelper.stopped?.stack?.line).toEqual(12);
8181

8282
// step in
8383
await vscode.commands.executeCommand(VSCODE_COMMANDS.DEBUG_STEP_OUT);
8484
await Sleep(DEBUG_PAUSE);
85-
expect(init.debug.adapter.stopped?.stack?.line).toEqual(21);
85+
expect(init.debug.adapter._eventHelper.stopped?.stack?.line).toEqual(21);
8686

8787
// remove all breakpoints
8888
await init.debug.adapter._breakpoints.resetBreakpoints();

apps/client-e2e/src/tests/debugging/continue.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export const Continue: RunnerFunction = async (init) => {
6565
// verify all of our lines
6666
for (let i = 0; i < EXPECTED_LINES.length; i++) {
6767
// verify we are on the right line
68-
expect(init.debug.adapter.stopped?.stack?.line).toEqual(EXPECTED_LINES[i]);
68+
expect(init.debug.adapter._eventHelper.stopped?.stack?.line).toEqual(
69+
EXPECTED_LINES[i]
70+
);
6971

7072
// continue running
7173
await vscode.commands.executeCommand(VSCODE_COMMANDS.DEBUG_CONTINUE);

libs/vscode/debug/src/lib/idl-debug-adapter-event-helper.class.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import {
1212
} from './idl-debug-adapter.interface';
1313

1414
export class IDLDebugAdapterEventHelper {
15+
/** Track information about latest stop */
16+
stopped?: { reason: StopReason; stack: IDLCallStackItem };
17+
1518
/** Reference to the debug adapter */
1619
private adapter: IDLDebugAdapter;
1720

@@ -20,9 +23,6 @@ export class IDLDebugAdapterEventHelper {
2023
stopBlockers: 0,
2124
};
2225

23-
/** Track information about latest stop */
24-
private stopped?: { reason: StopReason; stack: IDLCallStackItem };
25-
2626
constructor(adapter: IDLDebugAdapter) {
2727
this.adapter = adapter;
2828
}

libs/vscode/debug/src/lib/idl-debug-adapter.class.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Sleep } from '@idl/shared/extension';
77
import { IDL_TRANSLATION } from '@idl/translation';
88
import {
99
IDL_EVENT_LOOKUP,
10-
IDLCallStackItem,
1110
REGEX_COMPILE_COMMAND,
1211
REGEX_COMPILE_EDIT_COMMAND,
1312
REGEX_COMPILED_MAIN,
@@ -16,7 +15,6 @@ import {
1615
REGEX_IDL_LINE_CONTINUATION,
1716
REGEX_IDL_RESTART,
1817
REGEX_IDL_RETALL,
19-
StopReason,
2018
} from '@idl/types/idl/idl-process';
2119
import { LINE_SEPARATOR } from '@idl/types/tokenizer';
2220
import { VSCODE_COMMANDS } from '@idl/types/vscode';
@@ -97,13 +95,6 @@ export class IDLDebugAdapter extends LoggingDebugSession {
9795
/** Are we listening to events from IDL or not? */
9896
listening = false;
9997

100-
/**
101-
* Current location we are stopped at, only set/updated when we stop
102-
*
103-
* Exposed as a helper for testing to make sure we are in the right place
104-
*/
105-
stopped?: { reason: StopReason; stack: IDLCallStackItem };
106-
10798
/** Event to fire when our configuration has been completed, from VSCode example */
10899
private readonly _configurationDone = new Subject();
109100

0 commit comments

Comments
 (0)