Skip to content

Commit 4998e0f

Browse files
committed
fixed tests
1 parent 4711c93 commit 4998e0f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

arduino-ide-extension/src/test/node/arduino-daemon-impl.test.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,22 @@ describe('arduino-daemon-impl', () => {
114114
// });
115115

116116
it('should parse the port address when the log format is json', async () => {
117-
const instance = await new SilentArduinoDaemonImpl(
117+
const { daemon, port } = await new SilentArduinoDaemonImpl(
118118
'json'
119119
).spawnDaemonProcess();
120-
expect(instance.port).not.to.be.undefined;
121-
expect(instance.port).not.to.be.equal('0');
120+
121+
expect(port).not.to.be.undefined;
122+
expect(port).not.to.be.equal('0');
123+
daemon.kill();
122124
});
123125

124126
it('should parse the port address when the log format is text', async () => {
125-
const instance = await new SilentArduinoDaemonImpl(
127+
const { daemon, port } = await new SilentArduinoDaemonImpl(
126128
'text'
127129
).spawnDaemonProcess();
128-
expect(instance.port).not.to.be.undefined;
129-
expect(instance.port).not.to.be.equal('0');
130+
131+
expect(port).not.to.be.undefined;
132+
expect(port).not.to.be.equal('0');
133+
daemon.kill();
130134
});
131135
});

0 commit comments

Comments
 (0)