Skip to content

Commit 6f496c5

Browse files
author
Akos Kitta
committed
fix: stricter assertion for optional programmer
Signed-off-by: Akos Kitta <[email protected]>
1 parent 53ab133 commit 6f496c5

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

arduino-ide-extension/src/test/browser/debug.test.ts

+17-14
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,23 @@ describe('debug', () => {
116116
);
117117
});
118118

119+
it('should resolve when no programmer is selected (arduino/arduino-cli#2540)', async () => {
120+
const copyData: Mutable<BoardsDataStore.Data> = deepClone(data);
121+
delete copyData.selectedProgrammer;
122+
await doesNotReject(
123+
isDebugEnabled(
124+
board,
125+
() => boardDetails,
126+
() => copyData,
127+
(fqbn) => fqbn,
128+
async (params) => {
129+
expect(params.programmer).to.be.undefined;
130+
return params.fqbn;
131+
}
132+
)
133+
);
134+
});
135+
119136
it('should error when it fails to get the debug info from the CLI', async () => {
120137
await rejects(
121138
isDebugEnabled(
@@ -133,20 +150,6 @@ describe('debug', () => {
133150
);
134151
});
135152

136-
it('should resolve when no programmer is selected (arduino/arduino-cli#2540)', async () => {
137-
const copyData: Mutable<BoardsDataStore.Data> = deepClone(data);
138-
delete copyData.selectedProgrammer;
139-
await doesNotReject(
140-
isDebugEnabled(
141-
board,
142-
() => boardDetails,
143-
() => copyData,
144-
(fqbn) => fqbn,
145-
async () => fqbn
146-
)
147-
);
148-
});
149-
150153
it('should resolve when debugging is supported', async () => {
151154
await doesNotReject(
152155
isDebugEnabled(

0 commit comments

Comments
 (0)