Skip to content

Commit 8a432c4

Browse files
committed
fix: bugs after copilot review
1 parent ccb229d commit 8a432c4

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/UDPClusterManager.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ export class UDPClusterManager extends ClusterManager {
370370
socket.close(() => {
371371
// unref may be missing or not a function on mocked sockets
372372
if (socket && typeof (socket as any).unref === 'function') {
373-
if (socket && hasUnref(socket)) {
374373
socket.unref();
375374
}
376375

test/profile.more.branches.spec.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,7 @@ describe('profile.ts additional branches', () => {
4040
const fakeLogger: any = {
4141
error: sinon.spy(),
4242
};
43-
it('logDebugInfo: should call logger.error on JSON.stringify error (explicit stub)', () => {
44-
const { logDebugInfo, LogLevel } = mock.reRequire('../src/profile');
45-
const fakeLogger: any = {
46-
error: sinon.spy(),
47-
};
48-
const args = [{ foo: 'bar' }];
49-
const jsonStringifyStub = sinon.stub(JSON, 'stringify').throws(new Error('Serialization failed'));
43+
const args = [BigInt(1)]; // JSON.stringify throws on BigInt
5044
const options = {
5145
debugTime: false,
5246
debugArgs: true,

0 commit comments

Comments
 (0)